Class MD_RestrictionCode

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
org.apache.sis.internal.jaxb.cat.CodeListAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
org.apache.sis.internal.jaxb.code.MD_RestrictionCode

public final class MD_RestrictionCode extends CodeListAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
JAXB adapter for Restriction 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
  • Constructor Details

    • MD_RestrictionCode

      public MD_RestrictionCode()
      Empty constructor for JAXB only.
    • MD_RestrictionCode

      private MD_RestrictionCode(CodeListUID value)
      Creates a new adapter for the given value.
  • Method Details

    • wrap

      protected MD_RestrictionCode wrap(CodeListUID value)
      Fix the spelling of words that changed between ISO 19115:2003 and ISO 19115:2014, then wraps the value into an adapter.

      The spelling of "license" was changed to "licence" in latest standard, but XML marshalling shall use the previous spelling until XML schema are updated.

      Specified by:
      wrap in class CodeListAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
      Parameters:
      value - the value version of CodeList, to be marshalled.
      Returns:
      the wrapper for the code list value.
    • getCodeListClass

      protected Class<org.opengis.metadata.constraint.Restriction> getCodeListClass()
      Returns the class of code list wrapped by this adapter.
      Specified by:
      getCodeListClass in class CodeListAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
      Returns:
      the code list class.
    • getElement

      public CodeListUID getElement()
      Invoked by JAXB on marshalling.
      Specified by:
      getElement in class CodeListAdapter<MD_RestrictionCode,org.opengis.metadata.constraint.Restriction>
      Returns:
      the value to be marshalled.
    • setElement

      public void setElement(CodeListUID value)
      Invoked by JAXB on unmarshalling.
      Parameters:
      value - the unmarshalled value.