deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.crs
Class Identifiable

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

public class Identifiable
extends java.lang.Object
implements java.io.Serializable

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

Version:
$Revision: 21456 $, $Date: 2009-12-15 15:17:33 +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(java.lang.String id)
           
Identifiable(java.lang.String[] identifiers)
          Creates arrays fromt the given identifier and name without setting the versions, descriptions and areasOfUse.
Identifiable(java.lang.String[] identifiers, java.lang.String[] names, java.lang.String[] versions, java.lang.String[] descriptions, java.lang.String[] areasOfUse)
           
 
Method Summary
static void checkForNullObject(java.lang.Object[] toBeChecked, java.lang.String message)
          throws an IllegalArgumentException if the given object array is null or empty
protected  void checkForNullObject(java.lang.Object toBeChecked, java.lang.String message)
          throws an InvalidParameterException if the given object is null
static void checkForNullObject(java.lang.Object toBeChecked, java.lang.String functionName, java.lang.String paramName)
          throws an InvalidParameterException if the given object is null
 boolean equals(java.lang.Object other)
           
 java.lang.String getAreaOfUse()
           
 double[] getAreaOfUseBBox()
          Returns the area of use, i.e. the domain where this Identifiable is valid.
 java.lang.String[] getAreasOfUse()
           
 java.lang.String getDescription()
           
 java.lang.String[] getDescriptions()
           
 java.lang.String getIdAndName()
           
 java.lang.String getIdentifier()
           
 java.lang.String[] getIdentifiers()
           
 java.lang.String getName()
           
 java.lang.String[] getNames()
           
 java.lang.String getVersion()
           
 java.lang.String[] getVersions()
           
 boolean hasID(java.lang.String id)
           
 java.lang.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(java.lang.String[] identifiers,
                    java.lang.String[] names,
                    java.lang.String[] versions,
                    java.lang.String[] descriptions,
                    java.lang.String[] areasOfUse)
Parameters:
identifiers -
names - the human readable names of the object.
versions -
descriptions -
areasOfUse -
Throws:
java.lang.IllegalArgumentException - if no identifier(s) was/were given.

Identifiable

public Identifiable(java.lang.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(java.lang.String id)
Parameters:
id - of the Identifier
Method Detail

getAreaOfUse

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

getDescription

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

getIdentifier

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

getName

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

getVersion

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

checkForNullObject

protected void checkForNullObject(java.lang.Object toBeChecked,
                                  java.lang.String message)
                           throws java.lang.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:
java.lang.IllegalArgumentException - if the given object is null.

checkForNullObject

public static void checkForNullObject(java.lang.Object toBeChecked,
                                      java.lang.String functionName,
                                      java.lang.String paramName)
                               throws java.lang.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:
java.lang.IllegalArgumentException - if the given object is null.

checkForNullObject

public static void checkForNullObject(java.lang.Object[] toBeChecked,
                                      java.lang.String message)
                               throws java.lang.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:
java.lang.IllegalArgumentException - if the given object array is null or empty.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getIdAndName

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

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getAreasOfUse

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

getDescriptions

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

getIdentifiers

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

getNames

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

getVersions

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

hasID

public boolean hasID(java.lang.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.5 (2011/06/29 09:44 build-8-official)

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