Package org.apache.sis.internal.simple
Class SimpleIdentifier
java.lang.Object
org.apache.sis.internal.simple.SimpleIdentifier
- All Implemented Interfaces:
Serializable
,Deprecable
,org.opengis.metadata.Identifier
,org.opengis.referencing.ReferenceIdentifier
- Direct Known Subclasses:
PropertyInformation
public class SimpleIdentifier
extends Object
implements org.opengis.referencing.ReferenceIdentifier, Deprecable, Serializable
An implementation of
ReferenceIdentifier
as a wrapper around a Citation
.- Since:
- 0.3
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opengis.metadata.citation.Citation
Organization or party responsible for definition and maintenance of the code, ornull
if none.protected final String
Alphanumeric value identifying an instance in the namespace.protected final boolean
true
if this identifier is deprecated.private static final long
For cross-version compatibility.Fields inherited from interface org.opengis.metadata.Identifier
AUTHORITY_KEY, CODE_KEY
Fields inherited from interface org.opengis.referencing.ReferenceIdentifier
CODESPACE_KEY, VERSION_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleIdentifier
(org.opengis.metadata.citation.Citation authority, String code, boolean isDeprecated) Creates a new reference identifier. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendStringTo
(StringBuilder buffer) Invoked bytoString()
in order to allow subclasses to add additional information.boolean
Returnstrue
if the given object is of the same class than thisSimpleIdentifier
and has the same values.org.opengis.metadata.citation.Citation
Returns the organization or party responsible for definition and maintenance of the code, ornull
if none.getCode()
Returns the alphanumeric value identifying an instance in the namespace.Returns the identifier or namespace in which the code is valid, ornull
if none.org.opengis.util.InternationalString
Returns a natural language description of the meaning of the code value.org.opengis.util.InternationalString
An optional free text.Version identifier for the namespace, as specified by the code authority.int
hashCode()
Returns a hash code value for this identifier.boolean
true
if this identifier is deprecated.final String
toString()
Returns a string representation of this identifier.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
authority
protected final org.opengis.metadata.citation.Citation authorityOrganization or party responsible for definition and maintenance of the code, ornull
if none. It can be a bibliographical reference to an international standard such as ISO 19115.- See Also:
-
code
Alphanumeric value identifying an instance in the namespace. It can be for example the name of a class defined by the international standard referenced by the authority citation.- See Also:
-
isDeprecated
protected final boolean isDeprecatedtrue
if this identifier is deprecated.
-
-
Constructor Details
-
SimpleIdentifier
public SimpleIdentifier(org.opengis.metadata.citation.Citation authority, String code, boolean isDeprecated) Creates a new reference identifier.- Parameters:
authority
- responsible party for definition and maintenance of the code, or null.code
- alphanumeric value identifying an instance in the namespace.isDeprecated
-true
if this identifier is deprecated.
-
-
Method Details
-
getAuthority
public org.opengis.metadata.citation.Citation getAuthority()Returns the organization or party responsible for definition and maintenance of the code, ornull
if none. It can be a bibliographical reference to an international standard such as ISO 19115.The default implementation returns the citation specified at construction time.
- Specified by:
getAuthority
in interfaceorg.opengis.metadata.Identifier
- Returns:
- the authority given at construction time, or
null
if none.
-
getCodeSpace
Returns the identifier or namespace in which the code is valid, ornull
if none. The default implementation returns the shortest identifier of the authority, if any.- Specified by:
getCodeSpace
in interfaceorg.opengis.referencing.ReferenceIdentifier
- Returns:
- a code space inferred from the authority given at construction time, or
null
if none.
-
getCode
Returns the alphanumeric value identifying an instance in the namespace. It can be for example the name of a class defined by the international standard referenced by the authority citation.The default implementation returns the code specified at construction time.
- Specified by:
getCode
in interfaceorg.opengis.metadata.Identifier
- Returns:
- the code given at construction time, or
null
if none.
-
getVersion
Version identifier for the namespace, as specified by the code authority. When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.- Specified by:
getVersion
in interfaceorg.opengis.referencing.ReferenceIdentifier
- Returns:
- a version inferred from the authority given at construction time, or
null
if none.
-
getDescription
public org.opengis.util.InternationalString getDescription()Returns a natural language description of the meaning of the code value.- Returns:
- natural language description, or
null
if none. - Since:
- 0.5
-
getRemarks
public org.opengis.util.InternationalString getRemarks()An optional free text.- Specified by:
getRemarks
in interfaceDeprecable
- Returns:
- comments about this instance, or
null
if none. Shall be the reason for deprecation or the alternative to use if this instance is deprecated. - Since:
- 0.6
-
isDeprecated
public boolean isDeprecated()true
if this identifier is deprecated.- Specified by:
isDeprecated
in interfaceDeprecable
- Returns:
true
if this instance is deprecated.- Since:
- 0.6
-
equals
Returnstrue
if the given object is of the same class than thisSimpleIdentifier
and has the same values. -
hashCode
public int hashCode()Returns a hash code value for this identifier. -
toString
Returns a string representation of this identifier.For customizing this string representation, see
appendStringTo(StringBuilder)
. -
appendStringTo
Invoked bytoString()
in order to allow subclasses to add additional information. This method is invoked just before the final']'
is appended to the buffer.- Parameters:
buffer
- a buffer filled with thetoString()
characters, that subclasses can update.
-