sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Commented] (SIS-119) Support <gmx:FileName> and <gmx:MimeFileType> elements
Date Thu, 12 Feb 2015 19:25:12 GMT


Martin Desruisseaux commented on SIS-119:

Note that it is still possible to configure the SIS marshaller for producing the {{<gco:CharacterString>}}
elements instead than the gmx one if desired. The {{org.apache.sis.xml.XML}} class defines
a number of properties, among them there is: [XML.STRING_SUBSTITUTES|]

For example if one wants to substitute {{<gmx:FileName>}} and {{<gmx:MimeType>}}
by {{<gco:CharacterString>)) elements, he 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);

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

> Support <gmx:FileName> and <gmx:MimeFileType> elements
> ------------------------------------------------------
>                 Key: SIS-119
>                 URL:
>             Project: Spatial Information Systems
>          Issue Type: Improvement
>          Components: Metadata
>    Affects Versions: 0.3
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>             Fix For: 0.4
> The {{<gco:CharacterString>}} XML elements can sometime be replaced by {{<gmx:FileName>}}
elements are marshalling time. The later contains a {{src}} attribute, which may contains
an absolute path. Example from ISO 19139:
> {code:xml}
> <fileName>
>    <gmx:FileName src="../path/wkj98723.jpg">Overview</gmx:FileName>
> </fileName>
> {code}
> Likewise for {{<gmx:MimeFileType>}}:
> {code:xml}
> <fileType>
>    <gmx:MimeFileType type="image/tiff"> Graphic TIFF </gmx:MimeFileType>
> </fileType>
> {code}
> The main usage for those elements seem to be in {{MD_BrowseGraphic}}.

This message was sent by Atlassian JIRA

View raw message