Hello Emmanuel

Yes, you can configure the SIS marshaller for producing the
<gco:CharacterString> element instead than the gmx one. The
org.apache.sis.xml.XML class defines a number of properties, among them
there is:

http://sis.apache.org/apidocs/org/apache/sis/xml/XML.html#STRING_SUBSTITUTES

For example if you want to substitute <gmx:FileName> and <gmx:MimeType>
by <gco:CharacterString> elements, one can write:

Result out = ...; // Where to write the XML (Writer, OutputStream, etc.).
Map<String,Object> properties = new HashMap<>();
properties.put(XML.STRING_SUBSTITUTES, new String[] {"filename",
"mimetype"});
XML.marshal(metadata, out, properties);

You may take the opportunity for configuring other properties if desired
(locale, timezone, etc.). The class javadoc of the XML class lists them.

    Martin



Le 12/02/15 19:49, Emmanuel Blondel a écrit :
> Hello,
>
> I'm currently migrating a project metadata module to Apache SIS (soft
> transition using Geotoolkit artifacts), and checking consistency with
> the metadata i had before. I've seen a difference for MD_BrowseGraphic
> (filename, file mime type), referenced here:
> https://issues.apache.org/jira/browse/SIS-119
>
> I'm publishing the metadata in a GeoNetwork catalogue.
> I see the gmx tags introduced with Apache SIS are not interpreted by
> Geonetwork, which seems to require gco:CharacterString to correctly
> display the thumbnail. Unfortunately, i've no flexibility on the
> geonetwork side, neither possible application of a patch, nor any
> support from the IT corporate that maintains this catalogue. :-/
>
> I'm wondering if there is some flexibility on Apache SIS that would me
> to keep <gco:CharacterString>, or if i could do a simple workaround.
>
> Many thanks in advance for your advice
> Emmanuel

Reply via email to