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.CitationOrganization or party responsible for definition and maintenance of the code, ornullif none.protected final StringAlphanumeric value identifying an instance in the namespace.protected final booleantrueif this identifier is deprecated.private static final longFor cross-version compatibility.Fields inherited from interface org.opengis.metadata.Identifier
AUTHORITY_KEY, CODE_KEYFields 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 voidappendStringTo(StringBuilder buffer) Invoked bytoString()in order to allow subclasses to add additional information.booleanReturnstrueif the given object is of the same class than thisSimpleIdentifierand has the same values.org.opengis.metadata.citation.CitationReturns the organization or party responsible for definition and maintenance of the code, ornullif none.getCode()Returns the alphanumeric value identifying an instance in the namespace.Returns the identifier or namespace in which the code is valid, ornullif none.org.opengis.util.InternationalStringReturns a natural language description of the meaning of the code value.org.opengis.util.InternationalStringAn optional free text.Version identifier for the namespace, as specified by the code authority.inthashCode()Returns a hash code value for this identifier.booleantrueif this identifier is deprecated.final StringtoString()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, ornullif 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 isDeprecatedtrueif 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-trueif 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, ornullif 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:
getAuthorityin interfaceorg.opengis.metadata.Identifier- Returns:
- the authority given at construction time, or
nullif none.
-
getCodeSpace
Returns the identifier or namespace in which the code is valid, ornullif none. The default implementation returns the shortest identifier of the authority, if any.- Specified by:
getCodeSpacein interfaceorg.opengis.referencing.ReferenceIdentifier- Returns:
- a code space inferred from the authority given at construction time, or
nullif 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:
getCodein interfaceorg.opengis.metadata.Identifier- Returns:
- the code given at construction time, or
nullif 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:
getVersionin interfaceorg.opengis.referencing.ReferenceIdentifier- Returns:
- a version inferred from the authority given at construction time, or
nullif 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
nullif none. - Since:
- 0.5
-
getRemarks
public org.opengis.util.InternationalString getRemarks()An optional free text.- Specified by:
getRemarksin interfaceDeprecable- Returns:
- comments about this instance, or
nullif none. Shall be the reason for deprecation or the alternative to use if this instance is deprecated. - Since:
- 0.6
-
isDeprecated
public boolean isDeprecated()trueif this identifier is deprecated.- Specified by:
isDeprecatedin interfaceDeprecable- Returns:
trueif this instance is deprecated.- Since:
- 0.6
-
equals
Returnstrueif the given object is of the same class than thisSimpleIdentifierand 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.
-