Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harvester not handling gml:TimePosition correctly #7928

Open
smrgeoinfo opened this issue Apr 4, 2024 · 1 comment
Open

harvester not handling gml:TimePosition correctly #7928

smrgeoinfo opened this issue Apr 4, 2024 · 1 comment

Comments

@smrgeoinfo
Copy link

gml:TimePosition is defined with data type <union memberTypes="gml:CalDate time dateTime anyURI decimal"/> in gml/3.2.1/termporal.xsd. I have data that uses gml:TimePosition to report geologic ages, i.e. a decimal number, which is a valid data type in this union, but when I try to harvest those records there is an error and the record is not harvested. In fact it appears that the harvest process hangs...

here is the error message:

2024-04-04T21:40:29,810 ERROR [geonetwork.domain] - Error parsing ISO DateTimes '160'. Error is: null
java.lang.NullPointerException: null
        at org.fao.geonet.utils.DateUtil.parseISODateTimes(DateUtil.java:149) ~[classes/:?]
        at org.fao.geonet.utils.DateUtil.convertToISOZuluDateTime(DateUtil.java:106) ~[classes/:?]

Here is a snippet from the xml being harvested:

<gex:temporalElement>
      <gex:EX_TemporalExtent>
         <gex:extent>
            <gml:TimePeriod>
               <gml:description>geoTime: Jurassic, Cretaceous</gml:description>
               <gml:begin>
                  <gml:TimeInstant>
                     <gml:name>Base Early Jurassic</gml:name>
                     <gml:timePosition  frame="Ma before present" >160</gml:timePosition>
                  </gml:TimeInstant>
               </gml:begin>
               <gml:end>.... like begin

The processor should not assume that gml:timePosition is an ISODateTime-- it needs to check for a URI or numeric value and allow those.

@fxprunayre
Copy link
Member

Probably something to improve around here https://github.com/geonetwork/core-geonetwork/blob/main/web/src/main/webapp/xslt/common/index-utils.xsl#L605-L642
and then display information in the record view
https://github.com/geonetwork/core-geonetwork/blob/main/web-ui/src/main/resources/catalog/views/default/templates/recordView/summary.html#L12-L21

The parsing error during indexing should not be something making the harvester hanging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants