@TitleProperty(name="code") public class DefaultIdentifier extends ISOMetadata implements Identifier
MD_Identifier
└─code……………
Alphanumeric value identifying an instance in the namespace.Identifier
instances can be associated to some metadata objects like
operation,
platform,
instrument,
event,
processing,
source,
image description,
geographic description
and more.
Referencing objects like
coordinate system axis,
geodetic datum,
geographic CRS and more
rather use the ImmutableIdentifier
implementation, which is a class unrelated to the usual
org.apache.metadata
hierarchy because of the immutable nature of referencing objects.
DefaultIdentifier
is similar to the ImmutableIdentifier
one except for the "MD_"
prefix. Example:
<gmd:MD_Identifier <gmd:code> <gco:CharacterString>4326</gco:CharacterString> </gmd:code> <gmd:authority> <gmd:CI_Citation> <gmd:title> <gco:CharacterString>EPSG</gco:CharacterString> </gmd:title> </gmd:CI_Citation> </gmd:authority> </gmd:MD_Identifier>
XML
instead.ImmutableIdentifier
,
IdentifiedObjects.toURN(Class, Identifier)
,
Serialized FormDefined in the sis-metadata
module
identifiers
AUTHORITY_KEY, CODE_KEY
Constructor and Description |
---|
DefaultIdentifier()
Construct an initially empty identifier.
|
DefaultIdentifier(Citation authority,
String code)
Creates an identifier initialized to the given authority and code.
|
DefaultIdentifier(Identifier object)
Constructs a new instance initialized with the values from the specified metadata object.
|
DefaultIdentifier(String code)
Creates an identifier initialized to the given code.
|
Modifier and Type | Method and Description |
---|---|
static DefaultIdentifier |
castOrCopy(Identifier object)
Returns a SIS metadata implementation with the values of the given arbitrary implementation.
|
Citation |
getAuthority()
Returns the person or party responsible for maintenance of the namespace.
|
String |
getCode()
Returns the alphanumeric value identifying an instance in the namespace.
|
String |
getCodeSpace()
Returns the identifier or namespace in which the code is valid.
|
InternationalString |
getDescription()
Returns the natural language description of the meaning of the code value.
|
String |
getVersion()
Returns the version identifier for the namespace, as specified by the code authority.
|
void |
setAuthority(Citation newValue)
Sets the person or party responsible for maintenance of the namespace.
|
void |
setCode(String newValue)
Sets the alphanumeric value identifying an instance in the namespace.
|
void |
setCodeSpace(String newValue)
Sets the identifier or namespace in which the code is valid.
|
void |
setDescription(InternationalString newValue)
Sets the natural language description of the meaning of the code value.
|
void |
setVersion(String newValue)
Sets the version identifier for the namespace.
|
freeze, getIdentifierMap, getIdentifiers, getStandard
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, isModifiable, nonNullCollection, nonNullList, nonNullSet, singleton, unmodifiable, writeCollection, writeList, writeSet
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
public DefaultIdentifier()
public DefaultIdentifier(String code)
code
- the alphanumeric value identifying an instance in the namespace, or null
if none.public DefaultIdentifier(Citation authority, String code)
authority
, if a suitable value can be found. This constructor proceeds by searching
for the first suitable property in the following list:
IdentifierSpace.getName()
.authority
- the the person or party responsible for maintenance of the namespace, or null
if none.code
- the alphanumeric value identifying an instance in the namespace, or null
if none.Citations.getUnicodeIdentifier(Citation)
public DefaultIdentifier(Identifier object)
object
- the metadata to copy values from, or null
if none.castOrCopy(Identifier)
public static DefaultIdentifier castOrCopy(Identifier object)
null
, then this method returns null
.DefaultIdentifier
, then it is returned unchanged.DefaultIdentifier
instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
metadata contained in the given object are not recursively copied.object
- the object to get as a SIS implementation, or null
if none.null
if the argument was null.public Citation getAuthority()
getAuthority
in interface Identifier
null
if not available.public void setAuthority(Citation newValue)
newValue
- the new authority.public String getCode()
"4326"
.DefaultIdentifier
implementation does not enforce this restriction.getCode
in interface Identifier
public void setCode(String newValue)
newValue
- the new code, or null
.@UML(identifier="codeSpace", obligation=OPTIONAL, specification=ISO_19115) public String getCodeSpace()
"EPSG"
.null
if none.public void setCodeSpace(String newValue)
newValue
- the new code space, or null
if none.@UML(identifier="version", obligation=OPTIONAL, specification=ISO_19115) public String getVersion()
null
if none.public void setVersion(String newValue)
newValue
- the new version, or null
if none.@UML(identifier="description", obligation=OPTIONAL, specification=ISO_19115) public InternationalString getDescription()
null
if none.public void setDescription(InternationalString newValue)
newValue
- the new natural language description, or null
if none.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.