Class DeprecatedName
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.ImmutableIdentifier
org.apache.sis.referencing.NamedIdentifier
org.apache.sis.internal.referencing.DeprecatedName
- All Implemented Interfaces:
Serializable
,Comparable<org.opengis.util.GenericName>
,Deprecable
,org.opengis.metadata.Identifier
,org.opengis.referencing.ReferenceIdentifier
,org.opengis.util.GenericName
A deprecated name.
This is used mostly for names which were used in legacy versions of the EPSG database.
Implementation note:
this class opportunistically recycles the description property into a
remarks property. This is a lazy way to inherit
NamedIdentifier.equals(Object)
and NamedIdentifier.hashCode()
implementations without adding code in this class for taking in account a
new field.- Since:
- 0.6
- Version:
- 0.7
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.referencing.ImmutableIdentifier
DESCRIPTION_KEY
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
ConstructorsConstructorDescriptionDeprecatedName
(org.opengis.metadata.citation.Citation authority, String codeSpace, CharSequence code, String version, org.opengis.util.InternationalString remarks) Creates a new deprecated EPSG name. -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.util.InternationalString
Returnsnull
, since we used the description for the superseded information.org.opengis.util.InternationalString
Information about the replacement for this name.boolean
Returnstrue
since this name is deprecated.Methods inherited from class org.apache.sis.referencing.NamedIdentifier
castOrCopy, castOrCopy, compareTo, depth, equals, getParsedNames, hashCode, head, push, scope, tip, toFullyQualifiedName, toInternationalString, toString
Methods inherited from class org.apache.sis.referencing.ImmutableIdentifier
formatTo, getAuthority, getCode, getCodeSpace, getVersion
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
DeprecatedName
public DeprecatedName(org.opengis.metadata.citation.Citation authority, String codeSpace, CharSequence code, String version, org.opengis.util.InternationalString remarks) Creates a new deprecated EPSG name.- Parameters:
authority
- Organization or party responsible for definition and maintenance of the name.codeSpace
- Name or identifier of the person or organization responsible for namespace.code
- Name, optionally from a controlled list or pattern defined by a namespace.version
- The version of the associated namespace or name as specified by the code authority, ornull
if none.remarks
- Comments on or information about why this name is deprecated, ornull
if none.
-
-
Method Details
-
isDeprecated
public boolean isDeprecated()Returnstrue
since this name is deprecated.- Specified by:
isDeprecated
in interfaceDeprecable
- Returns:
true
.
-
getRemarks
public org.opengis.util.InternationalString getRemarks()Information about the replacement for this name.Example: "superseded by code XYZ".- Specified by:
getRemarks
in interfaceDeprecable
- Returns:
- information about the replacement for this name, or
null
if none.
-
getDescription
public org.opengis.util.InternationalString getDescription()Returnsnull
, since we used the description for the superseded information. See "Implementation note" in class javadoc.- Overrides:
getDescription
in classImmutableIdentifier
- Returns:
null
.
-