deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.cs
Class Info

java.lang.Object
  extended by org.deegree.model.csct.cs.Info
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CoordinateSystem, CoordinateTransformation, Datum, Ellipsoid, PrimeMeridian, Projection

public class Info
extends Object
implements Serializable

A base class for metadata applicable to coordinate system objects. The metadata items "Abbreviation", "Alias", "Authority", "AuthorityCode", "Name" and "Remarks" were specified in the Simple Features interfaces, so they have been kept here. This specification does not dictate what the contents of these items should be. However, the following guidelines are suggested:

Version:
1.00, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux, last edited by: $Author: bezema $
See Also:
"org.opengis.cs.CS_Info", Serialized Form

Field Summary
(package private) static WeakHashSet pool
          Set of weak references to existing coordinate systems.
 
Constructor Summary
Info(Map properties)
          Create an object with the specified properties.
Info(String name)
          Create an object with the specified name.
 
Method Summary
(package private)  String addString()
          Add more information inside the "[...]" part of toString().
(package private)  void addUnit(StringBuffer buffer, Unit unit)
          Add a unit in WKT form.
(package private) static void ensureAngularUnit(Unit unit)
          Make sure that the specified unit is an angular one.
(package private) static void ensureLinearUnit(Unit unit)
          Make sure that the specified unit is a linear one.
protected static void ensureNonNull(String name, Object object)
          Make sure an argument is non-null.
(package private) static void ensureNonNull(String name, Object[] array, int index)
          Make sure an array element is non-null.
(package private) static void ensureTimeUnit(Unit unit)
          Make sure that the specified unit is a temporal one.
 boolean equals(Object object)
          Compares the specified object with this info for equality.
 String getAbbreviation()
          Gets the abbreviation, or null if there is none.
 String getAlias()
          Gets the alias, or null if there is none.
 String getAuthority()
          Gets the authority name, or null if unspecified.
 String getAuthorityCode()
          Gets the authority-specific identification code, or null if unspecified.
 String getName()
          Gets the name of this object.
 String getRemarks()
          Gets the provider-supplied remarks, or null if there is none.
 int hashCode()
          Returns a hash value for this info.
(package private)  Object readResolve()
          Returns a reference to an unique instance of this Info.
 String toString()
          Returns a Well Know Text (WKT) for this info.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

pool

static final WeakHashSet pool
Set of weak references to existing coordinate systems. This set is used in order to return pre-existing object instead of creating new one.

Constructor Detail

Info

public Info(String name)
Create an object with the specified name.

Parameters:
name - This object name.

Info

Info(Map properties)
Create an object with the specified properties. Property keys are any of the following strings: Values are usually String, or may be null if a particular property is not defined. The "name" property is mandatory.

Parameters:
properties - The set of properties.
Method Detail

getName

public String getName()
Gets the name of this object. The default implementation returns the non-localized name given at construction time.

Parameters:
locale - The desired locale, or null for a default locale. If no string is available for the specified locale, an arbitrary locale is used.
Returns:
the name of this object.
See Also:
"org.opengis.cs.CS_Info#getName()"

getAuthority

public String getAuthority()
Gets the authority name, or null if unspecified. An Authority is an organization that maintains definitions of Authority Codes. For example the European Petroleum Survey Group (EPSG) maintains a database of coordinate systems, and other spatial referencing objects, where each object has a code number ID. For example, the EPSG code for a WGS84 Lat/Lon coordinate system is '4326'.

Returns:
the authority name, or null if unspecified.
See Also:
"org.opengis.cs.CS_Info#getAuthority()"

getAuthorityCode

public String getAuthorityCode()
Gets the authority-specific identification code, or null if unspecified. The AuthorityCode is a compact string defined by an Authority to reference a particular spatial reference object. For example, the European Survey Group (EPSG) authority uses 32 bit integers to reference coordinate systems, so all their code strings will consist of a few digits. The EPSG code for WGS84 Lat/Lon is '4326'.

Returns:
the authority-specific identification code, or null if unspecified.
See Also:
"org.opengis.cs.CS_Info#getAuthorityCode()"

getAlias

public String getAlias()
Gets the alias, or null if there is none.

Returns:
he alias, or null if there is none.
See Also:
"org.opengis.cs.CS_Info#getAlias()"

getAbbreviation

public String getAbbreviation()
Gets the abbreviation, or null if there is none.

Returns:
the abbreviation, or null if there is none.
See Also:
"org.opengis.cs.CS_Info#getAbbreviation()"

getRemarks

public String getRemarks()
Gets the provider-supplied remarks, or null if there is none.

Returns:
the provider-supplied remarks, or null if there is none.
See Also:
"org.opengis.cs.CS_Info#getRemarks()"

hashCode

public int hashCode()
Returns a hash value for this info.

Overrides:
hashCode in class Object
Returns:
a hash value for this info.

equals

public boolean equals(Object object)
Compares the specified object with this info for equality.

Overrides:
equals in class Object
Returns:

toString

public String toString()
Returns a Well Know Text (WKT) for this info. "Well know text" are part of OpenGIS's specification.

Overrides:
toString in class Object
Returns:
a Well Know Text (WKT) for this info.

addString

String addString()
Add more information inside the "[...]" part of toString(). The default implementation add nothing. Subclasses will override this method in order to complete string representation.

Returns:
The WKT code name (e.g. "GEOGCS").

addUnit

final void addUnit(StringBuffer buffer,
                   Unit unit)
Add a unit in WKT form.

Parameters:
buffer -
unit -

ensureNonNull

protected static void ensureNonNull(String name,
                                    Object object)
                             throws IllegalArgumentException
Make sure an argument is non-null. This is a convenience method for subclasses constructors.

Parameters:
name - Argument name.
object - User argument.
Throws:
IllegalArgumentException - if object is null.

ensureNonNull

static void ensureNonNull(String name,
                          Object[] array,
                          int index)
                   throws IllegalArgumentException
Make sure an array element is non-null.

Parameters:
name - Argument name.
array - User argument.
index - Element to check.
Throws:
IllegalArgumentException - if array[i] is null.

ensureTimeUnit

static void ensureTimeUnit(Unit unit)
                    throws IllegalArgumentException
Make sure that the specified unit is a temporal one.

Parameters:
unit - Unit to check.
Throws:
IllegalArgumentException - if unit is not a temporal unit.

ensureLinearUnit

static void ensureLinearUnit(Unit unit)
                      throws IllegalArgumentException
Make sure that the specified unit is a linear one.

Parameters:
unit - Unit to check.
Throws:
IllegalArgumentException - if unit is not a linear unit.

ensureAngularUnit

static void ensureAngularUnit(Unit unit)
                       throws IllegalArgumentException
Make sure that the specified unit is an angular one.

Parameters:
unit - Unit to check.
Throws:
IllegalArgumentException - if unit is not an angular unit.

readResolve

Object readResolve()
Returns a reference to an unique instance of this Info. This method is automatically invoked during deserialization. NOTE ABOUT ACCESS-MODIFIER: This method can't be private, because it would prevent it from being invoked from subclasses in this package (e.g. CoordinateSystem). This method will not be invoked for classes outside this package, unless we give it protected access. TODO: Would it be a good idea?

Returns:
a reference to an unique instance of this Info.

deegree 2.1 (2007/11/08 09:57 build-328-official)

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