Class EnumAdapter<ValueType extends EnumAdapter<ValueType,BoundType>,BoundType extends Enum<BoundType>>

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.apache.sis.internal.jaxb.cat.EnumAdapter<ValueType,BoundType>
Type Parameters:
ValueType - the subclass implementing this adapter.
BoundType - the enum being adapted.
Direct Known Subclasses:
MD_ObligationCode

public abstract class EnumAdapter<ValueType extends EnumAdapter<ValueType,BoundType>,BoundType extends Enum<BoundType>> extends XmlAdapter<ValueType,BoundType>
An adapter for Enum, in order to implement the ISO 19115-3 standard. Example:
Since:
0.5
Version:
1.0
  • Constructor Details

    • EnumAdapter

      protected EnumAdapter()
      For subclass constructors.
  • Method Details

    • name

      protected static String name(String value)
      Converts the given XML value to an enumeration constant name.
      Parameters:
      value - the text in the XML element.
      Returns:
      the presumed enumeration constant name.
    • value

      protected static String value(Enum<?> e)
      Returns the text to write in the XML element for the given enumeration constant.
      Parameters:
      e - the enumeration constant.
      Returns:
      the text to write in the XML element.