|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.cs.CRSIdentifiable
public class CRSIdentifiable
The CRSIdentifiable class can be used to identify Coordinate system components.
| Constructor Summary | |
|---|---|
CRSIdentifiable(CRSCodeType id)
|
|
CRSIdentifiable(CRSCodeType[] identifiers)
Creates arrays fromt the given identifier and name without setting the versions, descriptions and areasOfUse. |
|
CRSIdentifiable(CRSCodeType[] codes,
String[] names,
String[] versions,
String[] descriptions,
String[] areasOfUse)
|
|
CRSIdentifiable(CRSResource other)
Takes the references of the other object and stores them in this CRSIdentifiable Object. |
|
| Method Summary | |
|---|---|
void |
addAreaOfUse(String areaOfUse)
|
void |
addName(String name)
|
static void |
checkForNullObject(Object[] toBeChecked,
String message)
throws an IllegalArgumentException if the given object array is null or empty |
protected void |
checkForNullObject(Object toBeChecked,
String message)
throws an InvalidParameterException if the given object is null |
static void |
checkForNullObject(Object toBeChecked,
String functionName,
String paramName)
throws an InvalidParameterException if the given object is null |
boolean |
equals(Object other)
|
String |
getAreaOfUse()
|
double[] |
getAreaOfUseBBox()
Returns the area of use, i.e. the domain where this CRSIdentifiable is valid. |
String[] |
getAreasOfUse()
|
CRSCodeType |
getCode()
|
String |
getCodeAndName()
|
CRSCodeType[] |
getCodes()
|
String |
getDescription()
|
String[] |
getDescriptions()
|
String |
getId()
Returns the id of the object. |
String |
getName()
|
String[] |
getNames()
|
String[] |
getOrignalCodeStrings()
|
String |
getVersion()
|
String[] |
getVersions()
|
boolean |
hasCode(CRSCodeType id)
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
boolean |
hasId(String id,
boolean caseSensitive,
boolean exact)
|
boolean |
hasIdOrName(String idOrName,
boolean caseSensitive,
boolean exact)
Iterates over all Ids (code type originals) and Names and tests if either one matches the given string. |
void |
setDefaultAreaOfUse(double[] bbox)
|
void |
setDefaultDescription(String newDescription,
boolean override)
|
void |
setDefaultId(CRSCodeType newCodeType,
boolean override)
|
void |
setDefaultName(String defaultName,
boolean override)
|
void |
setDefaultVersion(String newVersion,
boolean override)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CRSIdentifiable(CRSResource other)
other - identifiable object.
public CRSIdentifiable(CRSCodeType[] codes,
String[] names,
String[] versions,
String[] descriptions,
String[] areasOfUse)
codes - names - the human readable names of the object.versions - descriptions - areasOfUse -
IllegalArgumentException - if no identifier(s) was/were given.public CRSIdentifiable(CRSCodeType[] identifiers)
identifiers - of the object.public CRSIdentifiable(CRSCodeType id)
id - of the Identifier| Method Detail |
|---|
public final String getAreaOfUse()
getAreaOfUse in interface CRSResourcenull if no areasOfUse were given.public final String getDescription()
getDescription in interface CRSResourcenull if no descriptions were given.public final CRSCodeType getCode()
getCode in interface CRSResourcepublic final String getName()
getName in interface CRSResourcenull if no names were given.public final String getVersion()
getVersion in interface CRSResourcenull if no versions were given.
protected void checkForNullObject(Object toBeChecked,
String message)
throws IllegalArgumentException
toBeChecked - for nullmessage - to put into the exception. If absent, the default message (CRS_INVALID_NULL_PARAMETER) will be
inserted.
IllegalArgumentException - if the given object is null.
public static void checkForNullObject(Object toBeChecked,
String functionName,
String paramName)
throws IllegalArgumentException
toBeChecked - for nullfunctionName - of the callerparamName - of the parameter to be checked.
IllegalArgumentException - if the given object is null.
public static void checkForNullObject(Object[] toBeChecked,
String message)
throws IllegalArgumentException
toBeChecked - for null or emptymessage - to put into the exception. If absent, the default message (CRS_INVALID_NULL_PARAMETER) will be
inserted.
IllegalArgumentException - if the given object array is null or empty.public String toString()
toString in class Objectpublic String getCodeAndName()
getCodeAndName in interface CRSResourcepublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode in class ObjectObject.hashCode()public final String[] getAreasOfUse()
getAreasOfUse in interface CRSResourcenull if no areasOfUse were given.public final String[] getDescriptions()
getDescriptions in interface CRSResourcenull if no descriptions were given.public final CRSCodeType[] getCodes()
getCodes in interface CRSResourcepublic final String[] getOrignalCodeStrings()
getOrignalCodeStrings in interface CRSResourcepublic final String[] getNames()
getNames in interface CRSResourcenull if no names were given.public final String[] getVersions()
getVersions in interface CRSResourcenull if no versions were given.public boolean hasCode(CRSCodeType id)
hasCode in interface CRSResourceid - a string which could match this identifiable.
public boolean hasIdOrName(String idOrName,
boolean caseSensitive,
boolean exact)
hasIdOrName in interface CRSResourceidOrName - a String which might be an id or a name.caseSensitive - should the match me case sensitiveexact - should the names and ids contain the given string or match exact.
public boolean hasId(String id,
boolean caseSensitive,
boolean exact)
hasId in interface CRSResourceid - caseSensitive - exact -
public double[] getAreaOfUseBBox()
CRSIdentifiable is valid.
getAreaOfUseBBox in interface CRSResourcenull
(-180,-90,180,90) if no such information is available
public void setDefaultId(CRSCodeType newCodeType,
boolean override)
setDefaultId in interface CRSResourcenewCodeType - override - public void setDefaultAreaOfUse(double[] bbox)
setDefaultAreaOfUse in interface CRSResourcebbox - an envelope of validity in epsg:4326 coordinates, min(lon,lat) max(lon,lat);public void addAreaOfUse(String areaOfUse)
addAreaOfUse in interface CRSResourceareaOfUse - public void addName(String name)
addName in interface CRSResourcename -
public void setDefaultName(String defaultName,
boolean override)
setDefaultName in interface CRSResourcedefaultName - the new default nameoverride - true if the new name should override the name currently at position 0
public void setDefaultDescription(String newDescription,
boolean override)
setDefaultDescription in interface CRSResourcenewDescription - the new default descriptionoverride - true if the new description should override the description currently at position 0
public void setDefaultVersion(String newVersion,
boolean override)
setDefaultVersion in interface CRSResourcenewVersion - the new default versionoverride - true if the new version should override the version currently at position 0public String getId()
Object
getId in interface Objectnull if it doesn't have an id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||