deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.crs
Class Identifiable

java.lang.Object
  extended by org.deegree.crs.Identifiable
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CoordinateSystem, Datum, Ellipsoid, PrimeMeridian, Projection, Transformation, Unit

public class Identifiable
extends Object
implements Serializable

The Identifiable class can be used to identify a crs, ellipsoid, Datum and primemeridian

Version:
$Revision: 21454 $, $Date: 2009-12-15 15:10:55 +0100 (Di, 15. Dez 2009) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $
See Also:
Serialized Form

Constructor Summary
Identifiable(Identifiable other)
          Takes the references of the other object and stores them in this Identifiable Object.
Identifiable(String id)
           
Identifiable(String[] identifiers)
          Creates arrays fromt the given identifier and name without setting the versions, descriptions and areasOfUse.
Identifiable(String[] identifiers, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)
           
 
Method Summary
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 Identifiable is valid.
 String[] getAreasOfUse()
           
 String getDescription()
           
 String[] getDescriptions()
           
 String getIdAndName()
           
 String getIdentifier()
           
 String[] getIdentifiers()
           
 String getName()
           
 String[] getNames()
           
 String getVersion()
           
 String[] getVersions()
           
 boolean hasID(String id)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Identifiable

public Identifiable(Identifiable other)
Takes the references of the other object and stores them in this Identifiable Object.

Parameters:
other - identifiable object.

Identifiable

public Identifiable(String[] identifiers,
                    String[] names,
                    String[] versions,
                    String[] descriptions,
                    String[] areasOfUse)
Parameters:
identifiers -
names - the human readable names of the object.
versions -
descriptions -
areasOfUse -
Throws:
IllegalArgumentException - if no identifier(s) was/were given.

Identifiable

public Identifiable(String[] identifiers)
Creates arrays fromt the given identifier and name without setting the versions, descriptions and areasOfUse.

Parameters:
identifiers - of the object.

Identifiable

public Identifiable(String id)
Parameters:
id - of the Identifier
Method Detail

getAreaOfUse

public final String getAreaOfUse()
Returns:
the first of all areasOfUse or null if no areasOfUse were given.

getDescription

public final String getDescription()
Returns:
the first of all descriptions or null if no descriptions were given.

getIdentifier

public final String getIdentifier()
Returns:
the first of all identifiers.

getName

public final String getName()
Returns:
the first of all names or null if no names were given.

getVersion

public final String getVersion()
Returns:
the first of all versions or null if no versions were given.

checkForNullObject

protected void checkForNullObject(Object toBeChecked,
                                  String message)
                           throws IllegalArgumentException
throws an InvalidParameterException if the given object is null

Parameters:
toBeChecked - for null
message - to put into the exception. If absent, the default message (CRS_INVALID_NULL_PARAMETER) will be inserted.
Throws:
IllegalArgumentException - if the given object is null.

checkForNullObject

public static void checkForNullObject(Object toBeChecked,
                                      String functionName,
                                      String paramName)
                               throws IllegalArgumentException
throws an InvalidParameterException if the given object is null

Parameters:
toBeChecked - for null
functionName - of the caller
paramName - of the parameter to be checked.
Throws:
IllegalArgumentException - if the given object is null.

checkForNullObject

public static void checkForNullObject(Object[] toBeChecked,
                                      String message)
                               throws IllegalArgumentException
throws an IllegalArgumentException if the given object array is null or empty

Parameters:
toBeChecked - for null or empty
message - to put into the exception. If absent, the default message (CRS_INVALID_NULL_PARAMETER) will be inserted.
Throws:
IllegalArgumentException - if the given object array is null or empty.

toString

public String toString()
Overrides:
toString in class Object

getIdAndName

public String getIdAndName()
Returns:
the first id and the name (if given) as id: id, name: name.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

getAreasOfUse

public final String[] getAreasOfUse()
Returns:
the areasOfUse or null if no areasOfUse were given.

getDescriptions

public final String[] getDescriptions()
Returns:
the descriptions or null if no descriptions were given.

getIdentifiers

public final String[] getIdentifiers()
Returns:
the identifiers, each identifiable object has atleast one id.

getNames

public final String[] getNames()
Returns:
the names or null if no names were given.

getVersions

public final String[] getVersions()
Returns:
the versions or null if no versions were given.

hasID

public boolean hasID(String id)
Parameters:
id - a string which could match this identifiable.
Returns:
true if this identifiable can be identified with the given string, false otherwise.

getAreaOfUseBBox

public double[] getAreaOfUseBBox()
Returns the area of use, i.e. the domain where this Identifiable is valid.

Returns:
the domain of validity (EPSG:4326 coordinates), order: minX, minY, maxX, maxY, never null (-180,-90,180,90) if no such information is available

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org