Dear all,
I'd like to ask your advice on a problem that occurs in a harvesting job that we are running. The job is harvesting metadata records from a server that is running GeoNetwork. However, when the following request is issued by GeoNetwork, a Java exception is thrown and harvesting stops:
The stacktrace:
java.lang.IllegalArgumentException: Invalid ISO date : 2011
at org.fao.geonet.util.ISODate.setDate(ISODate.java:116)
at org.fao.geonet.util.ISODate.<init>(ISODate.java:82)
at org.fao.geonet.kernel.harvest.harvester.RecordInfo.isMoreRecentThan(RecordInfo.java:76)
at org.fao.geonet.kernel.harvest.harvester.csw.Aligner.updateMetadata(Aligner.java:270)
at org.fao.geonet.kernel.harvest.harvester.csw.Aligner.align(Aligner.java:154)
at org.fao.geonet.kernel.harvest.harvester.csw.Harvester.harvest(Harvester.java:101)
at org.fao.geonet.kernel.harvest.harvester.csw.CswHarvester.doHarvest(CswHarvester.java:212)
at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester$HarvestWithIndexProcessor.process(AbstractHarvester.java:379)
at org.fao.geonet.kernel.MetadataIndexerProcessor.processWithFastIndexing(MetadataIndexerProcessor.java:39)
at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester.harvest(AbstractHarvester.java:406)
at org.fao.geonet.kernel.harvest.harvester.Executor.run(Executor.java:87)
The record, represented by the above request, indeed contains a gco:date field which contains only the year (which is not a valid ISO date). Now, I have two questions:
1. the metadata guide of the Dutch Georegister states that a year is allowed as a gco:date value. Is this true? If so, why does GeoNetwork throw an exception?
2. why does the harvest job stop when an exception is thrown because of an error in one metadata record? Can this behavior be changed?
Thanks in advance for your cooperation and greetings!
Jan