Class Code
java.lang.Object
org.apache.sis.internal.jaxb.referencing.Code
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 Summary
Modifier and TypeMethodDescriptionstatic CodeforIdentifiedObject(Class<?> type, Iterable<? extends org.opengis.referencing.ReferenceIdentifier> identifiers) Returns a<gml:identifier>for the given identified object, ornullif none.org.opengis.referencing.ReferenceIdentifierReturns the identifier for this value.
-
Method Details
-
getIdentifier
public org.opengis.referencing.ReferenceIdentifier getIdentifier()Returns the identifier for this value. This method is the converse of the constructor. If thecodeSpacecontains 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
nullif none.
-
forIdentifiedObject
public static Code forIdentifiedObject(Class<?> type, Iterable<? extends org.opengis.referencing.ReferenceIdentifier> identifiers) Returns a<gml:identifier>for the given identified object, ornullif 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, ornullif none.- Returns:
- the
<gml:identifier>as aCodeinstance, ornullif none.
- The first identifier having a code that begin with
-