geonetwork / geonetwork/core-geonetwork
harvester not handling gml:TimePosition correctly
- Dominant language
- Java
- Stars
- 521
- Forks
- 514
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
gml:TimePosition is defined with data type `` 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:
```
geoTime: Jurassic, Cretaceous
Base Early Jurassic
160
.... 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.
Contributor guide
Research direction
Start in DateUtil.java at parseISODateTimes (line 149) and convertToISOZuluDateTime (line 106), then compare their assumptions with the gml:TimePosition example in the issue. Reproduce harvesting with the numeric value 160 and verify that numeric or URI values are accepted without the ISO date-time error or a stalled harvest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100