Ok, so for the order of tags, i simply removed the EPSG authority citation.. and it solved my issue. No more schema validation issues.

For the INSPIRE validation issue on CRS, i realized by looking to the data specifications that EPSG:4326 is not anymore in the list of default CRS, hence it raises a validation issue with the metadata validator which doesn't seem to be permissive and restrains the list of default CRS provided by INSPIRE, this in spite it seems INSPIRE forsees exceptions for specific data themes and data that go beyond Europe.

In order to align better with the INSPIRE specs (although because of EPSG:4326, i might still have the same validation issue), I was then playing with the ReferenceSystem and tried to specify an anchor instead of a CharacterString:

<gmx:Anchor xlink:href="http://www.opengis.net/def/crs/EPSG/0/4326"; xlink:title="WGS84">4326</gmx:Anchor>

instead of:

<gco:CharacterString>4326</gco:CharacterString>

but then it raised an exception in /ImmutableIdentifier:

/java.lang.IllegalArgumentException: Aucune valeur n’a été définie pour la propriété « code ». at org.apache.sis.metadata.iso.ImmutableIdentifier.validate(ImmutableIdentifier.java:350) at org.apache.sis.metadata.iso.ImmutableIdentifier.<init>(ImmutableIdentifier.java:251) at org.apache.sis.referencing.NamedIdentifier.<init>(NamedIdentifier.java:203) at org.fao.fi.gems.metaobject.GeographicMetadata.<init>(GeographicMetadata.java:170) at org.fao.fi.gems.metaobject.GeographicMetaObjectImpl.metadata(GeographicMetaObjectImpl.java:522) at org.fao.fi.gems.publisher.MetadataPublisher.publishMetadata(MetadataPublisher.java:108)
    at org.fao.fi.gems.publisher.Publisher.publish(Publisher.java:137)
    at org.fao.fi.gems.application.Gems.main(Gems.java:226)/

/Is there any objection not to allow anchors at this level?

Thanks again
Emmanuel


Le 29/07/2015 20:18, Martin Desruisseaux a écrit :
Le 29/07/15 19:56, Emmanuel Blondel a écrit :
However, can you clarify how it is specified the order of tags in the marshalled XML?

In the beginning of each class there is a @XmlType annotation with a propOrder value. The later controls the order of property. Those values were wrote partially by hand, so we may very well have done some errors in property order.

Could you try to open the DefaultIdentifier and DefaultCitation classes, edit the @XmlType(propOrder = "...") value and see if it fixes the issue?


I also got an error (but INSPIRE specific this time), saying that the ReferenceSystem code should be an URI, and not a string:

 *
    The required metadata element "Coordinate Reference System" is
    present, but does not contain any of the coordinate reference
    system identifiers (EPSG URIs) required by the Technical Guidelines

Which value do you currently see in ReferenceSystem code?


By chance would you know a better validation tool?
I validate mostly against the XSD (but didn't tested everything). OGC's CITE tests also have a validator performing more checks beyond what can be done with XSD, but I didn't experimented it yet. I do not know how the CITE validator compare with the INSPIRE validator. Actually I would not be surprised if the INSPIRE validator was derived from the CITE one.

Does Apache SIS bring with a validator for ISO / INSPIRE ?
We do not have any validator at this time. But we could probably use the CITE's "teamengine" for this purpose. Maybe https://github.com/opengeospatial/teamengine could be a good starting point.

    Martin


--
*Emmanuel Blondel*
International Consultant | CEO
/Geographic Information Systems in Agronomy, Environment, Fishery & Marine Sciences/
41, Avenue du Vacayrial
81370 Saint Sulpice la Pointe, France
Tel: +33 (0) 6 45 97 87 52
Email: [email protected] <mailto:[email protected]>

Reply via email to