Package org.apache.sis.xml


package org.apache.sis.xml
Provides methods for marshalling and unmarshalling SIS objects in XML. The XML format is compliant with ISO 19115-3 specification for metadata, and compliant with GML for referencing objects.

The main class in this package is XML, which provides property keys that can be used for configuring (un)marshallers and convenience static methods. For example, the following code:

XML.marshal(Citations.OGC, System.out);
will produce a string like below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cit:CI_Citation xmlns:gmd="http://www.isotc211.org/2005/gmd"
                 xmlns:gco="http://www.isotc211.org/2005/gco">
  <cit:title>
    <gco:CharacterString>Open Geospatial Consortium</gco:CharacterString>
  </cit:title>
  ... much more XML below this point ...
</cit:CI_Citation>

Customizing the XML

In order to parse and format ISO 19115-3 compliant documents, SIS needs its own Marshaller and Unmarshaller instances (which are actually wrappers around standard instances). Those instances are created and cached by Marshaller­Pool, which is used internally by the above-cited XML class. However, developers can instantiate their own Marshaller­Pool in order to get more control on the marshalling and unmarshalling processes, including the namespace URLs and the errors handling.

The most common namespace URLs are defined in the Namespaces class. The parsing of some objects like URL and UUID, together with the behavior in case of parsing error, can be specified by the Value­Converter class.

Since:
0.3
  • Class
    Description
    The interface for all SIS objects having identifiers.
    A map view of some or all identifiers in an identified object.
    Some identifier namespaces that are handled in a special way.
    Context of a marshalling or unmarshalling process.
    Creates and configures Marshaller or Unmarshaller objects for use with SIS.
    Lists some namespaces URLs used by JAXB when (un)marshalling.
    A marker interface for nil XML elements providing an explanation about why the information is absent.
    Explanation for a missing XML element.
    Controls the (un)marshaller behavior regarding the xlink or uuidref attributes.
    Performs conversions of XML element or attribute values encountered during XML (un)marshalling.
    The XML attributes defined by OGC in the xlink schema.
    Communicates the desired timing of traversal from the starting resource to the ending resource.
    Communicates the desired presentation of the ending resource on traversal from the starting resource.
    The type of a xlink.
    Provides convenience methods for marshalling and unmarshalling SIS objects.