Class UnsupportedCodeListAdapter<ValueType extends UnsupportedCodeListAdapter<ValueType>>
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,org.opengis.util.CodeList<?>>
org.apache.sis.internal.geoapi.evolution.UnsupportedCodeListAdapter<ValueType>
- Type Parameters:
ValueType- The subclass implementing this adapter.
- Direct Known Subclasses:
CI_TelephoneTypeCode,DCPList,SV_CouplingType
public abstract class UnsupportedCodeListAdapter<ValueType extends UnsupportedCodeListAdapter<ValueType>>
extends XmlAdapter<ValueType,org.opengis.util.CodeList<?>>
An adapter for
UnsupportedCodeList, in order to implement the ISO 19115-3 standard.
See CodeListAdapter for more information.- Since:
- 0.5
- Version:
- 0.5
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmpty constructor for subclasses only.protectedCreates a wrapper for aCodeList, in order to handle the format specified in ISO-19139. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringReturns the name of the code list class.abstract CodeListUIDInvoked by JAXB on marshalling.final ValueTypemarshal(org.opengis.util.CodeList<?> value) Substitutes the code list by the adapter to be marshalled into an XML file or stream.protected StringtoIdentifier(String name, StringBuilder buffer, boolean isValue) Converts the given Java constant name to something hopefully close to the UML identifier, or close to the textual value to put in the XML.final org.opengis.util.CodeList<?>Substitutes the adapter value read from an XML stream by the object which will contains the value.protected abstract ValueTypewrap(CodeListUID value) Wraps the code into an adapter.
-
Field Details
-
identifier
The value of theCodeList.
-
-
Constructor Details
-
UnsupportedCodeListAdapter
protected UnsupportedCodeListAdapter()Empty constructor for subclasses only. -
UnsupportedCodeListAdapter
Creates a wrapper for aCodeList, in order to handle the format specified in ISO-19139.- Parameters:
value- the value of theCodeListto be marshalled.
-
-
Method Details
-
wrap
Wraps the code into an adapter. Most implementations will be like below:- Parameters:
value- the value ofCodeListto be marshalled.- Returns:
- the wrapper for the code list value.
-
getCodeListName
Returns the name of the code list class.- Returns:
- the code list class name.
-
unmarshal
Substitutes the adapter value read from an XML stream by the object which will contains the value. JAXB calls automatically this method at unmarshalling time.- Specified by:
unmarshalin classXmlAdapter<ValueType extends UnsupportedCodeListAdapter<ValueType>,org.opengis.util.CodeList<?>> - Parameters:
adapter- the adapter for this metadata value.- Returns:
- a code list which represents the metadata value.
-
marshal
Substitutes the code list by the adapter to be marshalled into an XML file or stream. JAXB calls automatically this method at marshalling time.- Specified by:
marshalin classXmlAdapter<ValueType extends UnsupportedCodeListAdapter<ValueType>,org.opengis.util.CodeList<?>> - Parameters:
value- the code list value.- Returns:
- the adapter for the given code list.
-
toIdentifier
Converts the given Java constant name to something hopefully close to the UML identifier, or close to the textual value to put in the XML. This method convert the Java constant name to camel case ifisValueistrue, or to lower cases with word separated by spaces ifisValueistrue.- Parameters:
name- The Java constant name (e.g.WEB_SERVICES).buffer- An initially empty buffer to use for creating the identifier.isValue-falsefor thecodeListValueattribute, ortruefor the XML value.- Returns:
- The identifier (e.g.
"webServices"or"Web services").
-
getElement
Invoked by JAXB on marshalling. Subclasses must override this method with the appropriate@XmlElementannotation.- Returns:
- The
CodeListvalue to be marshalled.
-