public class Identifier extends Object implements Identifiable
Identifier encapsulates all identification info of Identifiable
objects in a special instance to make object creation clearer.
Identifier also offers new unique ids for every object created in the LOCAL namespace.
Identifiable,
IdentifiableComponentDEFAULT, LOCAL, UNKNOWN| Constructor and Description |
|---|
Identifier(Class clazz)
Creates a local identifier.
|
Identifier(Class clazz,
String name)
Create a local identifier.
|
Identifier(Class clazz,
String name,
String shortName)
Create a local identifier.
|
Identifier(Class clazz,
String name,
String shortName,
List<Identifiable> aliases)
Create a local identifier.
|
Identifier(String authorityName,
String authorityKey,
String name)
Creates a complete identifier.
|
Identifier(String authorityName,
String authorityKey,
String name,
String shortName)
Creates a complete identifier.
|
Identifier(String authorityName,
String authorityKey,
String name,
String shortName,
String remarks,
List<Identifiable> aliases)
Creates a complete identifier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAlias(Identifiable alias)
Add an alias
|
void |
addRemark(String new_remark)
Add remarks.
|
boolean |
equals(Object object)
Returns true if object is equals to this.
|
List<Identifiable> |
getAliases()
Get aliases
|
String |
getAuthorityKey()
Returns the key of this identifier (id must be unique inside the
authority name).
|
String |
getAuthorityName()
Return the authority name of this identifier (ex.
|
String |
getCode()
Returns a code formed with a namespace, ':' and the id value of
identifier (ex.
|
String |
getName()
Returns a string used to identify clearly the object.
|
static int |
getNewId()
Return an identifier which is unique for this program session.
|
String |
getRemarks()
Returns remarks.
|
String |
getShortName()
Returns a short string used to identify unambiguously the object.
|
int |
hashCode()
Returns the hash code for this Identifier.
|
void |
setRemarks(String remarks)
Change the remarks.
|
void |
setShortName(String shortName)
Change the short string used to identify unambiguously the object.
|
String |
toString()
Returns a String representation of this identifier.
|
String |
toWKT()
Returns a WKT representation of the identifier.
|
public Identifier(String authorityName, String authorityKey, String name, String shortName, String remarks, List<Identifiable> aliases)
authorityName - namespace of the identifier ie EPSG, IGNFauthorityKey - unique key in the namespacename - name or descriptionshortName - short name used for user interfacesremarks - remarks containing additionnal information on the objectaliases - synonyms of this Identifiablepublic Identifier(Class clazz)
clazz - the class of the identified objectpublic Identifier(Class clazz, String name)
clazz - the class of the identified objectname - the name of the identified objectpublic Identifier(Class clazz, String name, String shortName)
clazz - the class of the identified objectname - the name of the identified objectshortName - the short name of the identified objectpublic Identifier(Class clazz, String name, String shortName, List<Identifiable> aliases)
clazz - the class of the identified objectname - the name of the identified objectshortName - the short name of the identified objectaliases - synonyms of this Identifiablepublic Identifier(String authorityName, String authorityKey, String name)
authorityName - ie EPSG, IGNFauthorityKey - ie 4326, LAMBname - public static int getNewId()
public String getAuthorityName()
getAuthorityName in interface Identifiablepublic String getAuthorityKey()
getAuthorityKey in interface Identifiablepublic String getCode()
getCode in interface Identifiablepublic String getName()
getName in interface Identifiablepublic String getShortName()
getShortName in interface Identifiablepublic void setShortName(String shortName)
setShortName in interface IdentifiableshortName - the new short name for the Identifierpublic String getRemarks()
getRemarks in interface Identifiablepublic void setRemarks(String remarks)
setRemarks in interface Identifiableremarks - the new remarks on this identifierpublic void addRemark(String new_remark)
addRemark in interface Identifiablenew_remark - the remark to add to the Identifier's remarkspublic List<Identifiable> getAliases()
getAliases in interface Identifiablepublic boolean addAlias(Identifiable alias)
addAlias in interface Identifiablealias - an alias for this objectpublic String toWKT()
public boolean equals(Object object)
public int hashCode()
Copyright © 2019 CNRS. All rights reserved.