Class MD_CharacterSetCode
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<MD_CharacterSetCode,Charset>
org.apache.sis.internal.jaxb.code.MD_CharacterSetCode
JAXB adapter for
Charset
in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
See package documentation for more information about the handling of CodeList in ISO 19115-3.- Since:
- 0.3
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.opengis.metadata.identification.CharacterSetfromCharset(Charset cs) Converts the given Java Character Set toCharacterSet.Invoked by JAXB on marshalling.final MD_CharacterSetCodeSubstitutes the code list by the adapter to be marshalled into an XML file or stream.voidsetElement(CodeListUID value) Invoked by JAXB on unmarshalling.final Charsetunmarshal(MD_CharacterSetCode adapter) Substitutes the adapter value read from an XML stream by the object which will contains the value.
-
Field Details
-
identifier
The value of theCodeList.
-
-
Constructor Details
-
MD_CharacterSetCode
public MD_CharacterSetCode()Empty constructor for JAXB only.
-
-
Method Details
-
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<MD_CharacterSetCode,Charset> - Parameters:
adapter- the adapter for this metadata value.- Returns:
- a code list which represents the metadata value.
- Throws:
IllegalCharsetNameException
-
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<MD_CharacterSetCode,Charset> - Parameters:
value- the code list value.- Returns:
- the adapter for the given code list.
-
getElement
Invoked by JAXB on marshalling.- Returns:
- the value to be marshalled.
-
setElement
Invoked by JAXB on unmarshalling.- Parameters:
value- the unmarshalled value.
-
fromCharset
Converts the given Java Character Set toCharacterSet.- Parameters:
cs- the character set, or .- Returns:
- a code list for the given character set, or
nullif the givencswas null.
-