Package org.geotoolkit.xml

Provides methods for marshalling and unmarshalling Geotk objects in XML.

See:
          Description

Interface Summary
IdentifiedObject The interface for all Geotk objects having identifiers.
IdentifierMap A map view of some or all identifiers in an identified object.
IdentifierSpace<T> Some identifier namespaces that are handled in a special way.
NilObject A marker interface for empty XML elements.
 

Class Summary
MarshallerPool Creates and configures Marshaller or Unmarshaller objects for use with Geotk.
Namespaces List some namespaces URLs used by JAXB when (un)marshalling.
NilReason Explanation for a missing XML element.
ObjectConverters Performs conversions of objects encountered during XML (un)marshalling.
ObjectLinker Invoked by the unmarshaller when xlink or uuidref attributes are found instead of object definition.
XLink The XML attributes defined by OGC in the xlink schema.
XML Provides convenience methods for marshalling and unmarshalling Geotk objects.
 

Enum Summary
XLink.Actuate Communicates the desired timing of traversal from the starting resource to the ending resource.
XLink.Show Communicates the desired presentation of the ending resource on traversal from the starting resource.
XLink.Type The type of a xlink.
 

Package org.geotoolkit.xml Description

Provides methods for marshalling and unmarshalling Geotk objects in XML. The XML format is compliant with ISO 19139 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"?>
<gmd:CI_Citation xmlns:gmd="http://www.isotc211.org/2005/gmd"
                 xmlns:gco="http://www.isotc211.org/2005/gco">
  <gmd:title>
    <gco:CharacterString>Open Geospatial Consortium</gco:CharacterString>
  </gmd:title>
  ... much more XML below this point ...
</gmd:CI_Citation>


Customizing the XML
In order to parse and format ISO 19139 compliant documents, Geotk needs its own Marshaller and Unmarshaller instances (which are actually wrappers around standard instances). Those instances are created and cached by MarshallerPool, which is used internally by the above-cited XML class. However developers can instantiate their own MarshallerPool 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 ObjectConverters class.

Since:
3.00
Version:
3.18
Author:
Cédric Briançon (Geomatys), Guilhem Legal (Geomatys), Martin Desruisseaux (Geomatys)
Module:
utility/geotk-xml-base (download)


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.