|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.cs.Info
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:
CoordinateSystemAuthorityFactory
is used to create an object, the "Authority" and "AuthorityCode"
values should be set to the authority name of the factory object,
and the authority code supplied by the client, respectively. The
other values may or may not be set. (If the authority is EPSG,
the implementer may consider using the corresponding metadata values
in the EPSG tables.)CoordinateSystemFactory
creates an
object, the "Name" should be set to the value supplied by the client.
All of the other metadata items should be left empty.
CS_Info
,
Serialized FormNested Class Summary | |
(package private) class |
Info.AngularUnit
OpenGIS angular unit. |
(package private) class |
Info.Export
Wrap a Info object for use with OpenGIS. |
(package private) class |
Info.LinearUnit
OpenGIS linear unit. |
Field Summary | |
private java.lang.String |
name
The non-localized object name. |
(package private) static WeakHashSet |
pool
Set of weak references to existing coordinate systems. |
private java.util.Map |
properties
Properties for all methods except getName(java.util.Locale) . |
private java.lang.Object |
proxy
OpenGIS object returned by cachedOpenGIS(java.lang.Object) .
|
private static long |
serialVersionUID
Serial number for interoperability with different versions. |
Constructor Summary | |
(package private) |
Info(java.util.Map properties)
Create an object with the specified properties. |
|
Info(java.lang.String name)
Create an object with the specified name. |
Method Summary | |
(package private) java.lang.String |
addString(java.lang.StringBuffer buffer)
Add more information inside the "[...]" part of toString() .
|
(package private) void |
addUnit(java.lang.StringBuffer buffer,
Unit unit)
Add a unit in WKT form. |
(package private) java.lang.Object |
cachedOpenGIS(java.lang.Object adapters)
Returns an OpenGIS interface for this info. |
(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(java.lang.String name,
java.lang.Object object)
Make sure an argument is non-null. |
(package private) static void |
ensureNonNull(java.lang.String name,
java.lang.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(java.lang.Object object)
Compares the specified object with this info for equality. |
java.lang.String |
getAbbreviation(java.util.Locale locale)
Gets the abbreviation, or null if there is none. |
java.lang.String |
getAlias(java.util.Locale locale)
Gets the alias, or null if there is none. |
java.lang.String |
getAuthority(java.util.Locale locale)
Gets the authority name, or null if unspecified.
|
java.lang.String |
getAuthorityCode(java.util.Locale locale)
Gets the authority-specific identification code, or null if unspecified.
|
java.lang.String |
getName(java.util.Locale locale)
Gets the name of this object. |
java.lang.String |
getRemarks(java.util.Locale locale)
Gets the provider-supplied remarks, or null if there is none. |
int |
hashCode()
Returns a hash value for this info. |
(package private) java.lang.Object |
readResolve()
Returns a reference to an unique instance of this Info .
|
(package private) java.lang.Object |
toOpenGIS(java.lang.Object adapters)
Returns an OpenGIS interface for this info. |
java.lang.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 |
private static final long serialVersionUID
static final WeakHashSet pool
private final java.lang.String name
private final java.util.Map properties
getName(java.util.Locale)
. For
example the method getAuthorityCode(java.util.Locale)
returns the
value of property "authorityCode"
. May be
null if there is no properties for this object.
private transient java.lang.Object proxy
cachedOpenGIS(java.lang.Object)
.
It may be a hard or a weak reference.
Constructor Detail |
public Info(java.lang.String name)
name
- This object name.Info(java.util.Map properties)
String
, or may be null
if a particular property is not defined. The "name" property
is mandatory.
properties
- The set of properties.Method Detail |
public java.lang.String getName(java.util.Locale locale)
locale
- The desired locale, or null
for a default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getName()
public java.lang.String getAuthority(java.util.Locale locale)
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'.
locale
- The desired locale, or null
for the default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getAuthority()
public java.lang.String getAuthorityCode(java.util.Locale locale)
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'.
locale
- The desired locale, or null
for the default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getAuthorityCode()
public java.lang.String getAlias(java.util.Locale locale)
null
if there is none.
locale
- The desired locale, or null
for the default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getAlias()
public java.lang.String getAbbreviation(java.util.Locale locale)
null
if there is none.
locale
- The desired locale, or null
for the default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getAbbreviation()
public java.lang.String getRemarks(java.util.Locale locale)
null
if there is none.
locale
- The desired locale, or null
for the default locale.
If no string is available for the specified locale, an arbitrary locale
is used.CS_Info.getRemarks()
public int hashCode()
public boolean equals(java.lang.Object object)
public java.lang.String toString()
java.lang.String addString(java.lang.StringBuffer buffer)
toString()
.
The default implementation add nothing. Subclasses will override
this method in order to complete string representation.
buffer
- The buffer to add string to.
final void addUnit(java.lang.StringBuffer buffer, Unit unit)
protected static void ensureNonNull(java.lang.String name, java.lang.Object object) throws java.lang.IllegalArgumentException
name
- Argument name.object
- User argument.
java.lang.IllegalArgumentException
- if object
is null.static void ensureNonNull(java.lang.String name, java.lang.Object[] array, int index) throws java.lang.IllegalArgumentException
name
- Argument name.array
- User argument.index
- Element to check.
java.lang.IllegalArgumentException
- if array[i]
is null.static void ensureTimeUnit(Unit unit) throws java.lang.IllegalArgumentException
unit
- Unit to check.
java.lang.IllegalArgumentException
- if unit
is not a temporal unit.static void ensureLinearUnit(Unit unit) throws java.lang.IllegalArgumentException
unit
- Unit to check.
java.lang.IllegalArgumentException
- if unit
is not a linear unit.static void ensureAngularUnit(Unit unit) throws java.lang.IllegalArgumentException
unit
- Unit to check.
java.lang.IllegalArgumentException
- if unit
is not an angular unit.java.lang.Object readResolve() throws java.io.ObjectStreamException
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?
java.io.ObjectStreamException
java.lang.Object toOpenGIS(java.lang.Object adapters)
Object
in order
to avoid too early class loading of OpenGIS interface.
final java.lang.Object cachedOpenGIS(java.lang.Object adapters)
adapters
- The originating Adapters
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |