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
- Author:
- Guilhem Legal (Geomatys), Martin Desruisseaux (Geomatys)
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new GML object with no ID.protectedGMLAdapter(Object wrapped) Creates a new GML object wrapping the given GeoAPI implementation. -
Method Summary
-
Constructor Details
-
GMLAdapter
protected GMLAdapter()Creates a new GML object with no ID. This constructor is typically invoked at unmarshalling time. Theidvalue 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
idvalue 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 theidvalue (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.
-