|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 IdentifierMethod Detail |
---|
public final String getAreaOfUse()
getAreaOfUse
in interface CRSResource
null
if no areasOfUse were given.public final String getDescription()
getDescription
in interface CRSResource
null
if no descriptions were given.public final CRSCodeType getCode()
getCode
in interface CRSResource
public final String getName()
getName
in interface CRSResource
null
if no names were given.public final String getVersion()
getVersion
in interface CRSResource
null
if no versions were given.protected void checkForNullObject(Object toBeChecked, String message) throws IllegalArgumentException
toBeChecked
- for null
message
- 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 null
functionName
- 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 Object
public String getCodeAndName()
getCodeAndName
in interface CRSResource
public boolean equals(Object other)
equals
in class Object
public int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode
in class Object
Object.hashCode()
public final String[] getAreasOfUse()
getAreasOfUse
in interface CRSResource
null
if no areasOfUse were given.public final String[] getDescriptions()
getDescriptions
in interface CRSResource
null
if no descriptions were given.public final CRSCodeType[] getCodes()
getCodes
in interface CRSResource
public final String[] getOrignalCodeStrings()
getOrignalCodeStrings
in interface CRSResource
public final String[] getNames()
getNames
in interface CRSResource
null
if no names were given.public final String[] getVersions()
getVersions
in interface CRSResource
null
if no versions were given.public boolean hasCode(CRSCodeType id)
hasCode
in interface CRSResource
id
- a string which could match this identifiable.
public boolean hasIdOrName(String idOrName, boolean caseSensitive, boolean exact)
hasIdOrName
in interface CRSResource
idOrName
- 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 CRSResource
id
- caseSensitive
- exact
-
public double[] getAreaOfUseBBox()
CRSIdentifiable
is valid.
getAreaOfUseBBox
in interface CRSResource
null
(-180,-90,180,90) if no such information is availablepublic void setDefaultId(CRSCodeType newCodeType, boolean override)
setDefaultId
in interface CRSResource
newCodeType
- override
- public void setDefaultAreaOfUse(double[] bbox)
setDefaultAreaOfUse
in interface CRSResource
bbox
- an envelope of validity in epsg:4326 coordinates, min(lon,lat) max(lon,lat);public void addAreaOfUse(String areaOfUse)
addAreaOfUse
in interface CRSResource
areaOfUse
- public void addName(String name)
addName
in interface CRSResource
name
- public void setDefaultName(String defaultName, boolean override)
setDefaultName
in interface CRSResource
defaultName
- the new default nameoverride
- true if the new name should override the name currently at position 0public void setDefaultDescription(String newDescription, boolean override)
setDefaultDescription
in interface CRSResource
newDescription
- the new default descriptionoverride
- true if the new description should override the description currently at position 0public void setDefaultVersion(String newVersion, boolean override)
setDefaultVersion
in interface CRSResource
newVersion
- the new default versionoverride
- true if the new version should override the version currently at position 0public String getId()
Object
getId
in interface Object
null
if it doesn't have an id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |