Package org.apache.sis.internal.jaxb.gml
Class GMLAdapter
java.lang.Object
org.apache.sis.internal.jaxb.gml.GMLAdapter
- Direct Known Subclasses:
TimeInstant
,TimePeriod
Base class for GML objects that are wrappers around a GeoAPI implementation.
Every GML object to be marshalled have an ID attribute, which is mandatory.
If no ID is explicitly set, a default one will be created from the wrapped object.
Note:
This class is somewhat temporary. It assigns the ID to the wrapped object.
In a future SIS version, we should assign the ID to the object itself.
- Since:
- 0.3
- Version:
- 0.4
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new GML object with no ID.protected
GMLAdapter
(Object wrapped) Creates a new GML object wrapping the given GeoAPI implementation. -
Method Summary
-
Field Details
-
id
The period identifier, ornull
if undefined. This element is part of GML 3.1.1 specification.Difference between
gco:uuid
andgml:id
id
is a standard GML attribute available on every object-with-identity. It has type="xs:ID"
- i.e. it is a fragment identifier, unique within document scope only, for internal cross-references. It is not useful by itself as a persistent unique identifier.uuid
is an optional attribute available on every object-with-identity, provided in the GMD schemas that implement ISO 19115 in XML. May be used as a persistent unique identifier, but only available within GMD context.
- See Also:
-
-
Constructor Details
-
GMLAdapter
protected GMLAdapter()Creates a new GML object with no ID. This constructor is typically invoked at unmarshalling time. Theid
value will then be set by JAXB.- See Also:
-
GMLAdapter
Creates a new GML object wrapping the given GeoAPI implementation. The ID will be determined from the given object.This constructor is typically invoked at marshalling time. The
id
value set by this constructor will be used by JAXB for producing the XML.- Parameters:
wrapped
- an instance of a GeoAPI interface to be wrapped.
-
-
Method Details
-
copyIdTo
Assigns theid
value (if non-null) to the given object. This method is typically invoked at unmarshalling time in order to assign the ID of this temporary wrapper to the "real" GeoAPI implementation instance.- Parameters:
wrapped
- the GeoAPI implementation for which to assign the ID.
-