java.lang.Object
org.apache.sis.internal.jaxb.referencing.Code

public final class Code extends Object
The gml:CodeType, which is made of a code space and a code value.
Since:
0.4
Version:
0.7
Author:
Guilhem Legal (Geomatys), Cédric Briançon (Geomatys), Martin Desruisseaux (Geomatys)
  • Method Details

    • getIdentifier

      public org.opengis.referencing.ReferenceIdentifier getIdentifier()
      Returns the identifier for this value. This method is the converse of the constructor. If the codeSpace contains a semicolon, then the part after the last semicolon will be taken as the authority version number. This is for consistency with what the constructor does.
      Returns:
      the identifier, or null if none.
    • forIdentifiedObject

      public static Code forIdentifiedObject(Class<?> type, Iterable<? extends org.opengis.referencing.ReferenceIdentifier> identifiers)
      Returns a <gml:identifier> for the given identified object, or null if none. This method searches for the following identifiers, in preference order:
      • The first identifier having a code that begin with "urn:".
      • The first identifier having a code that begin with "http:".
      • The first identifier in the "EPSG" codespace, converted to the "urn: syntax.
      • The first identifier in other codespace, converted to the "urn: syntax if possible.
      Parameters:
      type - the type of the identified object.
      identifiers - the object identifiers, or null if none.
      Returns:
      the <gml:identifier> as a Code instance, or null if none.