Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

Harvesting ISO 19115-2 metadata fails on "Publication Date" #130

Open birdage opened 9 years ago

birdage commented 9 years ago

Hi all,

im having an issue when trying to harvest an xml file with iso 191551-2 metadata in it. Basically the error im receiving is as below. The xml metadata file was generated using nciso from thredds 4.3, a netcdf4 file. im using geoportal server 1.2.5

screen shot 2014-12-19 at 1 31 18 pm

now according to the iso spec (below), you need a creation, revision or issued (publication date)

screen shot 2014-12-19 at 1 29 13 pm

now these are available in my meta data file and im still receiving the error, any ideas?

<gmd:identificationInfo>
    <gmd:MD_DataIdentification id="DataIdentification">
      <gmd:citation>
        <gmd:CI_Citation>
          <gmd:title>
            <gco:CharacterString>SG61020140715T1400</gco:CharacterString>
          </gmd:title>
          <gmd:date>
            <gmd:CI_Date>
              <gmd:date>
                <gco:DateTime>2014-11-19T18:11:57Z</gco:DateTime>
              </gmd:date>
              <gmd:dateType>
                <gmd:CI_DateTypeCode codeList="http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"
                                             codeListValue="creation">creation</gmd:CI_DateTypeCode>
                ...
              <gmd:CI_DateTypeCode codeList="http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"
                                             codeListValue="issued">issued</gmd:CI_DateTypeCode>
               ...
               <gmd:CI_DateTypeCode codeList="http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"
                                             codeListValue="revision">revision</gmd:CI_DateTypeCode>
birdage commented 9 years ago

to backup the fact that this information is in there i ran the newest version of nc iso standalone jar app and did the meta data coverage report and it showed that information in there, and i did get the same error. The one missing out of that list is (8/9) is acknowledgment which is not the error

screen shot 2014-12-19 at 3 01 14 pm

birdage commented 9 years ago

tried adding the following....didnt work...

 <gmd:date>
  <gmd:CI_Date>
     <gmd:date>
        <gco:DateTime>2014-12-19T10:40:39</gco:DateTime>
     </gmd:date>
     <gmd:dateType>
        <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" codeSpace="002">publication</gmd:CI_DateTypeCode>
     </gmd:dateType>
  </gmd:CI_Date>
</gmd:date>
birdage commented 9 years ago

Another test... This file works and can be validated, however this file cannot validated and ingested....it fails with the same error.....

mhogeweg commented 9 years ago

uh, both links go to the same file I think

birdage commented 9 years ago

@mhogeweg thanks, ive updated the links. also i tried ingesting an entry from NGDC and it fails with the same error, this is a valid entry....

mhogeweg commented 9 years ago

update:

I found that in the ISO 19115-2 definition we were looking for gmd:MD_Metadata...gco:DateTime instead of gmi:MI_Metadata.

There is also something to look at in the Date_PropertyType.xml down in the belly of the metadata editor where the user interface elements are defined. You'll see there a definition (and some to do work...) to allow for selection of either Date or DateTime entry.

Final thing: in the 2nd entry I had to comment out the srv:SV_ServiceIdentification section as it was generating the following error:

Line 328 Column 48 cvc-complex-type.2.4.a: Invalid content was found starting with element 'srv:SV_ServiceIdentification'. One of '{"http://www.isotc211.org/2005/gmd":AbstractMD_Identification}' is expected.

this is a schema error that I'll have to look in a bit more.

with the above change to the ISO 19115-2 definition file and commenting out the srv element I was able to publish the document.

birdage commented 9 years ago

@mhogeweg thanks for looking in to that for me, so the end result is that the error is not with metadata im trying to put in but with the schema on the new version on geoportal, as it seems to work on ngdc's current version (NGDC v.1.8.8 (ESRI 1.2.4))?. is there any way to force geoportal to process and ingest the meta data with out changing either the metadata or schema? The reason i ask is that the metadata files are automatically generated from THREDDS (via nciso), large quantities of iso xml files are generated, and as an example i might not have access to the geoportal server.

birdage commented 9 years ago

@mhogeweg yeah as you said changing if from DateTime to date results in the service identification throwing an error, and if you remove the service identification information you can get it to validate, but my aim is to have those services listed in the geoportal entry so like NGDC the services are listed

birdage commented 9 years ago

@mhogeweg after reviewing https://github.com/Esri/geoportal-server/wiki/Customize%20Metadata%20Validation it seems i could modify the metadata rules for the validation? and remove that section?

birdage commented 9 years ago

@mhogeweg any chance you know what i should change in the definition.xml or associated files to get it to accept the above?

mhogeweg commented 9 years ago

here's another suggestion:

birdage commented 9 years ago

@mhogeweg so rather than trying to validate a single iso file generated by the iso services i used the thredds ingestion tool, through the admin>Register resource on the network>thredds>catalog.xml and it seems to be working with the XSD validation removed, and using dates, not date times...

Top is after changes, Bottom is before... screen shot 2014-12-31 at 1 51 54 pm

mhogeweg commented 9 years ago

glad that worked!

birdage commented 9 years ago

@Yuanjie0913 do you have any input on this?

birdage commented 9 years ago

it looks like this issue is related to https://github.com/Esri/geoportal-server/issues/121