public class DefaultIdentifier extends ISOMetadata implements Identifier
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
,
Serialized FormDefined in the sis-metadata
module
identifiers, LOGGER
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()
Organization or party responsible for definition and maintenance of the
code.
|
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()
Identifier of the version of the associated code, as specified by the code space or
code authority.
|
void |
setAuthority(Citation newValue)
Sets the organization or party responsible for definition and maintenance of the
code.
|
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 an identifier of the version of the associated code.
|
getIdentifierMap, getIdentifiers, getStandard
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, 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
- The organization or party responsible for definition and maintenance
of the code, or null
if none.code
- The alphanumeric value identifying an instance in the namespace,
or null
if none.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 String getCode()
getCode
in interface Identifier
public void setCode(String newValue)
newValue
- The new code, or null
.public String getCodeSpace()
null
if none.public void setCodeSpace(String newValue)
newValue
- The new code space, or null
if none.public String getVersion()
null
if not available.public void setVersion(String newValue)
newValue
- The new version.public InternationalString getDescription()
null
if none.public void setDescription(InternationalString newValue)
newValue
- The new natural language description, or null
if none.public Citation getAuthority()
getAuthority
in interface Identifier
null
if not available.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.