Java Doc for AbstractIdentifiedObject.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.referencing.wkt.Formattable
      org.geotools.referencing.AbstractIdentifiedObject

All known Subclasses:   org.geotools.referencing.datum.AbstractDatum,  org.geotools.referencing.operation.DefaultOperationMethod,  org.geotools.referencing.datum.DefaultPrimeMeridian,  org.geotools.referencing.operation.AbstractCoordinateOperation,  org.geotools.referencing.datum.DefaultEllipsoid,  org.geotools.referencing.AbstractReferenceSystem,  org.geotools.referencing.cs.AbstractCS,  org.geotools.referencing.cs.DefaultCoordinateSystemAxis,  org.geotools.parameter.AbstractParameterDescriptor,
AbstractIdentifiedObject
public class AbstractIdentifiedObject extends Formattable implements IdentifiedObject,Serializable(Code)
A base class for metadata applicable to reference system objects. When AuthorityFactory is used to create an object, the and values are set to the authority name of the factory object, and the authority code supplied by the client, respectively. When ObjectFactory creates an object, the is set to the value supplied by the client and all of the other metadata items are left empty.

This class is conceptually abstract, even if it is technically possible to instantiate it. Typical applications should create instances of the most specific subclass with Default prefix instead. An exception to this rule may occurs when it is not possible to identify the exact type. For example it is not possible to infer the exact coordinate system from Well Known Text is some cases (e.g. in a LOCAL_CS element). In such exceptional situation, a plain org.geotools.referencing.cs.AbstractCS object may be instantiated.
since:
   2.1
version:
   $Id: AbstractIdentifiedObject.java 28264 2007-12-05 21:53:08Z desruisseaux $
author:
   Martin Desruisseaux



Field Summary
final public static  GenericName[]EMPTY_ALIAS_ARRAY
     An empty array of alias.
final public static  ReferenceIdentifier[]EMPTY_IDENTIFIER_ARRAY
     An empty array of identifiers.
final public static  ComparatorIDENTIFIER_COMPARATOR
     A comparator for sorting identified objects by .
final public static  ComparatorNAME_COMPARATOR
     A comparator for sorting identified objects by .
final public static  ComparatorREMARKS_COMPARATOR
     A comparator for sorting identified objects by .

Constructor Summary
public  AbstractIdentifiedObject(IdentifiedObject object)
     Constructs a new identified object with the same values than the specified one. This copy constructor provides a way to wrap an arbitrary implementation into a Geotools one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.
public  AbstractIdentifiedObject(Map properties)
     Constructs an object from a set of properties.
protected  AbstractIdentifiedObject(Map properties, Map subProperties, String[] localizables)
     Constructs an object from a set of properties and copy unrecognized properties in the specified map.

Method Summary
protected static  SetasSet(Object[] array)
     Returns the specified array as an immutable set, or null if the array is empty or null.
protected static  voidensureAngularUnit(Unit unit)
     Makes sure that the specified unit is an angular one.
protected static  voidensureLinearUnit(Unit unit)
     Makes sure that the specified unit is a linear one.
protected static  voidensureNonNull(String name, Object object)
     Makes sure that an argument is non-null.
protected static  voidensureNonNull(String name, Object[] array, int index)
     Makes sure an array element is non-null.
protected static  voidensureTimeUnit(Unit unit)
     Makes sure that the specified unit is a temporal one.
final public  booleanequals(Object object)
     Compares the specified object with this object for equality.
Parameters:
  object - The other object (may be null ).
public  booleanequals(AbstractIdentifiedObject object, boolean compareMetadata)
     Compares this object with the specified object for equality. If compareMetadata is true , then all available properties are compared including , , , etc. If compareMetadata is false , then this method compare only the properties needed for computing transformations.
static  booleanequals(AbstractIdentifiedObject object1, AbstractIdentifiedObject object2, boolean compareMetadata)
     Compares two Geotools's AbstractIdentifiedObject objects for equality.
protected static  booleanequals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)
     Compares two OpenGIS's IdentifiedObject objects for equality.
protected static  booleanequals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)
     Compares two arrays of OpenGIS's IdentifiedObject objects for equality.
protected static  booleanequals(Collection collection1, Collection collection2, boolean compareMetadata)
     Compares two collectionss of OpenGIS's IdentifiedObject objects for equality. The comparaison take order in account, which make it more appropriate for List or LinkedHashSet comparaisons.
public  CollectiongetAlias()
     An alternative name by which this object is identified.
public  ReferenceIdentifiergetIdentifier(Citation authority)
     Returns an identifier according the given authority.
public static  ReferenceIdentifiergetIdentifier(IdentifiedObject info, Citation authority)
     Returns an identifier according the given authority.
public  SetgetIdentifiers()
     An identifier which references elsewhere the object's defining information.
public  ReferenceIdentifiergetName()
     The primary name by which this object is identified.
public  StringgetName(Citation authority)
     Returns this object's name according the given authority.
public static  StringgetName(IdentifiedObject info, Citation authority)
     Returns an object's name according the given authority.
public static  MapgetProperties(IdentifiedObject info)
     Returns the informations provided in the specified indentified object as a map of properties.
public static  MapgetProperties(IdentifiedObject info, Citation authority)
     Returns the properties to be given to an identified object derived from the specified one. This method is typically used for creating a new CRS identical to an existing one except for axis units.
public  InternationalStringgetRemarks()
     Comments on or information about this object, including data source information.
public  inthashCode()
     Returns a hash value for this identified object.
public  booleannameMatches(String name)
     Returns true if either the or at least one matches the specified string.
public static  booleannameMatches(IdentifiedObject object, String name)
     Returns true if either the or at least one matches the specified string.
public static  booleannameMatches(IdentifiedObject o1, IdentifiedObject o2)
     Returns true if the of an object matches the primary name of one of the other object.

Field Detail
EMPTY_ALIAS_ARRAY
final public static GenericName[] EMPTY_ALIAS_ARRAY(Code)
An empty array of alias. This is usefull for fetching alias as an array, using the following idiom:
 .toArray(EMPTY_ALIAS_ARRAY);
 



EMPTY_IDENTIFIER_ARRAY
final public static ReferenceIdentifier[] EMPTY_IDENTIFIER_ARRAY(Code)
An empty array of identifiers. This is usefull for fetching identifiers as an array, using the following idiom:
 .toArray(EMPTY_IDENTIFIER_ARRAY);
 



IDENTIFIER_COMPARATOR
final public static Comparator IDENTIFIER_COMPARATOR(Code)
A comparator for sorting identified objects by .



NAME_COMPARATOR
final public static Comparator NAME_COMPARATOR(Code)
A comparator for sorting identified objects by .



REMARKS_COMPARATOR
final public static Comparator REMARKS_COMPARATOR(Code)
A comparator for sorting identified objects by .




Constructor Detail
AbstractIdentifiedObject
public AbstractIdentifiedObject(IdentifiedObject object)(Code)
Constructs a new identified object with the same values than the specified one. This copy constructor provides a way to wrap an arbitrary implementation into a Geotools one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.



AbstractIdentifiedObject
public AbstractIdentifiedObject(Map properties) throws IllegalArgumentException(Code)
Constructs an object from a set of properties. Keys are strings from the table below. Key are case-insensitive, and leading and trailing spaces are ignored. The map given in argument shall contains at least a "name" property. Other properties listed in the table below are optional.

Property name Value type Value given to
  AbstractIdentifiedObject.NAME_KEY "name"     String or ReferenceIdentifier     AbstractIdentifiedObject.getName()
  AbstractIdentifiedObject.ALIAS_KEY "alias"     String , [], GenericName or []    AbstractIdentifiedObject.getAlias
  ReferenceIdentifier.AUTHORITY_KEY "authority"     String or Citation     ReferenceIdentifier.getAuthority on the
  ReferenceIdentifier.CODESPACE_KEY "version"     String     ReferenceIdentifier.getCodeSpace on the
  ReferenceIdentifier.VERSION_KEY "version"     String     ReferenceIdentifier.getVersion on the
  AbstractIdentifiedObject.IDENTIFIERS_KEY "identifiers"     ReferenceIdentifier or []    AbstractIdentifiedObject.getIdentifiers
  AbstractIdentifiedObject.REMARKS_KEY "remarks"     String or InternationalString     AbstractIdentifiedObject.getRemarks

Additionally, all localizable attributes like "remarks" may have a language and country code suffix. For example the "remarks_fr" property stands for remarks in and the "remarks_fr_CA" property stands for remarks in .

Note that the "authority" and "version" properties are ignored if the "name" property is already a Citation object instead of a String .
throws:
  InvalidParameterValueException - if a property has an invalid value.
throws:
  IllegalArgumentException - if a property is invalid for some other reason.




AbstractIdentifiedObject
protected AbstractIdentifiedObject(Map properties, Map subProperties, String[] localizables) throws IllegalArgumentException(Code)
Constructs an object from a set of properties and copy unrecognized properties in the specified map. The properties argument is treated as in the . All properties unknow to this AbstractIdentifiedObject constructor are copied in the subProperties map, after their key has been normalized (usually lower case, leading and trailing space removed).

If localizables is non-null, then all keys listed in this argument are treated as localizable one (i.e. may have a suffix like "_fr", "_de", etc.). Localizable properties are stored in the subProperties map as InternationalString objects.


Parameters:
  properties - Set of properties. Should contains at least "name" .
Parameters:
  subProperties - The map in which to copy unrecognized properties.
Parameters:
  localizables - Optional list of localized properties.
throws:
  InvalidParameterValueException - if a property has an invalid value.
throws:
  IllegalArgumentException - if a property is invalid for some other reason.




Method Detail
asSet
protected static Set asSet(Object[] array)(Code)
Returns the specified array as an immutable set, or null if the array is empty or null. This is a convenience method for sub-classes constructors.
Parameters:
  array - The array to copy in a set. May be null . A set containing the array elements, or null if none or empty.



ensureAngularUnit
protected static void ensureAngularUnit(Unit unit) throws IllegalArgumentException(Code)
Makes sure that the specified unit is an angular one. This is a convenience method for subclass constructors.
Parameters:
  unit - Unit to check.
throws:
  IllegalArgumentException - if unit is not an angular unit.



ensureLinearUnit
protected static void ensureLinearUnit(Unit unit) throws IllegalArgumentException(Code)
Makes sure that the specified unit is a linear one. This is a convenience method for subclass constructors.
Parameters:
  unit - Unit to check.
throws:
  IllegalArgumentException - if unit is not a linear unit.



ensureNonNull
protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)
Makes sure that an argument is non-null. This is a convenience method for subclass constructors.
Parameters:
  name - Argument name.
Parameters:
  object - User argument.
throws:
  InvalidParameterValueException - if object is null.



ensureNonNull
protected static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)
Makes sure an array element is non-null. This is a convenience method for subclass constructors.
Parameters:
  name - Argument name.
Parameters:
  array - User argument.
Parameters:
  index - Index of the element to check.
throws:
  InvalidParameterValueException - if array[i] is null.



ensureTimeUnit
protected static void ensureTimeUnit(Unit unit) throws IllegalArgumentException(Code)
Makes sure that the specified unit is a temporal one. This is a convenience method for subclass constructors.
Parameters:
  unit - Unit to check.
throws:
  IllegalArgumentException - if unit is not a temporal unit.



equals
final public boolean equals(Object object)(Code)
Compares the specified object with this object for equality.
Parameters:
  object - The other object (may be null ). true if both objects are equal.



equals
public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code)
Compares this object with the specified object for equality. If compareMetadata is true , then all available properties are compared including , , , etc. If compareMetadata is false , then this method compare only the properties needed for computing transformations. In other words, sourceCS.equals(targetCS, false) returns true only if the transformation from sourceCS to targetCS is the identity transform, no matter what AbstractIdentifiedObject.getName() saids.

Some subclasses (especially org.geotools.referencing.datum.AbstractDatum and org.geotools.parameter.AbstractParameterDescriptor ) will test for the , since objects with different name have completly different meaning. For example nothing differentiate the "semi_major" and "semi_minor" parameters except the name. The name comparaison may be loose however, i.e. we may accept a name matching an alias.
Parameters:
  object - The object to compare to this .
Parameters:
  compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal.




equals
static boolean equals(AbstractIdentifiedObject object1, AbstractIdentifiedObject object2, boolean compareMetadata)(Code)
Compares two Geotools's AbstractIdentifiedObject objects for equality. This method is equivalent to object1.equals(object2, compareMetadata) except that one or both arguments may be null. This convenience method is provided for implementation of equals in subclasses.
Parameters:
  object1 - The first object to compare (may be null ).
Parameters:
  object2 - The second object to compare (may be null ).
Parameters:
  compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal.



equals
protected static boolean equals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)(Code)
Compares two OpenGIS's IdentifiedObject objects for equality. This convenience method is provided for implementation of equals in subclasses.
Parameters:
  object1 - The first object to compare (may be null ).
Parameters:
  object2 - The second object to compare (may be null ).
Parameters:
  compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal.



equals
protected static boolean equals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)(Code)
Compares two arrays of OpenGIS's IdentifiedObject objects for equality. This convenience method is provided for implementation of equals method in subclasses.
Parameters:
  array1 - The first array to compare (may be null ).
Parameters:
  array2 - The second array to compare (may be null ).
Parameters:
  compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both arrays are equal.



equals
protected static boolean equals(Collection collection1, Collection collection2, boolean compareMetadata)(Code)
Compares two collectionss of OpenGIS's IdentifiedObject objects for equality. The comparaison take order in account, which make it more appropriate for List or LinkedHashSet comparaisons. This convenience method is provided for implementation of equals method in subclasses.
Parameters:
  collection1 - The first collection to compare (may be null ).
Parameters:
  collection2 - The second collection to compare (may be null ).
Parameters:
  compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both collections are equal.



getAlias
public Collection getAlias()(Code)
An alternative name by which this object is identified. The aliases, or an empty array if there is none.
See Also:   AbstractIdentifiedObject.getName(Citation)



getIdentifier
public ReferenceIdentifier getIdentifier(Citation authority)(Code)
Returns an identifier according the given authority. This method first checks all in their iteration order. It returns the first identifier with an citation the specified authority.
Parameters:
  authority - The authority for the identifier to return, or null forthe first identifier regarless its authority. The object's identifier, or null if no identifier matching the specifiedauthority was found.
since:
   2.2



getIdentifier
public static ReferenceIdentifier getIdentifier(IdentifiedObject info, Citation authority)(Code)
Returns an identifier according the given authority. This method performs the same search than AbstractIdentifiedObject.getIdentifier(Citation) on arbitrary implementations of GeoAPI interface.
Parameters:
  info - The object to get the identifier from.
Parameters:
  authority - The authority for the identifier to return, or null forthe first identifier regarless its authority. The object's identifier, or null if no identifier matching the specifiedauthority was found.
since:
   2.2



getIdentifiers
public Set getIdentifiers()(Code)
An identifier which references elsewhere the object's defining information. Alternatively an identifier by which this object can be referenced. This object identifiers, or an empty array if there is none.
See Also:   AbstractIdentifiedObject.getIdentifier(Citation)



getName
public ReferenceIdentifier getName()(Code)
The primary name by which this object is identified.
See Also:   AbstractIdentifiedObject.getName(Citation)



getName
public String getName(Citation authority)(Code)
Returns this object's name according the given authority. This method checks first the , then all in their iteration order.
  • If the name or alias implements the ReferenceIdentifier interface, then this method compares the against the specified citation using the Citations.identifierMatches(CitationCitation) identifierMatches method. If a matching is found, then this method returns the of this object.

  • Otherwise, if the alias implements the GenericName interface, then this method compares the against the specified citation using the method. If a matching is found, then this method returns the of this object.

Note that alias may implement both the ReferenceIdentifier and GenericName interfaces (for example NamedIdentifier ). In such cases, the identifier view has precedence.
Parameters:
  authority - The authority for the name to return. The object's name (either a or a ), or null ifno name matching the specified authority was found.
See Also:   AbstractIdentifiedObject.getName()
See Also:   AbstractIdentifiedObject.getAlias()
since:
   2.2



getName
public static String getName(IdentifiedObject info, Citation authority)(Code)
Returns an object's name according the given authority. This method performs the same search than AbstractIdentifiedObject.getName(Citation) on arbitrary implementations of GeoAPI interface.
Parameters:
  info - The object to get the name from.
Parameters:
  authority - The authority for the name to return. The object's name (either a or a ), or null ifno name matching the specified authority was found.
since:
   2.2



getProperties
public static Map getProperties(IdentifiedObject info)(Code)
Returns the informations provided in the specified indentified object as a map of properties. The returned map contains key such as AbstractIdentifiedObject.NAME_KEY NAME_KEY , and values from methods such as AbstractIdentifiedObject.getName .
Parameters:
  info - The identified object to view as a properties map. An view of the identified object as an immutable map.



getProperties
public static Map getProperties(IdentifiedObject info, Citation authority)(Code)
Returns the properties to be given to an identified object derived from the specified one. This method is typically used for creating a new CRS identical to an existing one except for axis units. This method returns the same properties than the supplied argument (as of (info)), except for the following:

  • The 's authority is replaced by the specified one.
  • All are removed, because the new object to be created is probably not endorsed by the original authority.

This method returns a mutable map. Consequently, callers can add their own identifiers directly to this map if they wish.
Parameters:
  info - The identified object to view as a properties map.
Parameters:
  authority - The new authority for the object to be created, or null if itis not going to have any declared authority. An view of the identified object as a mutable map.




getRemarks
public InternationalString getRemarks()(Code)
Comments on or information about this object, including data source information.



hashCode
public int hashCode()(Code)
Returns a hash value for this identified object. , and are not taken in account. In other words, two identified objects will return the same hash value if they are equal in the sense of (AbstractIdentifiedObject, false). The hash code value. This value doesn't need to be the samein past or future versions of this class.



nameMatches
public boolean nameMatches(String name)(Code)
Returns true if either the or at least one matches the specified string. This method performs the search in the following order, regardless of any authority:
  • The of this object
  • The of an alias
  • The of an alias

Parameters:
  name - The name to compare. true if the primary name of at least one aliasmatches the specified name .



nameMatches
public static boolean nameMatches(IdentifiedObject object, String name)(Code)
Returns true if either the or at least one matches the specified string. This method performs the same check than the on arbitrary object implementing the GeoAPI interface.
Parameters:
  object - The object to check.
Parameters:
  name - The name. true if the primary name of at least one aliasmatches the specified name .



nameMatches
public static boolean nameMatches(IdentifiedObject o1, IdentifiedObject o2)(Code)
Returns true if the of an object matches the primary name of one of the other object.
Parameters:
  o1 - The first object to compare by name.
Parameters:
  o2 - The second object to compare by name.
since:
   2.4



Methods inherited from org.geotools.referencing.wkt.Formattable
protected String formatWKT(Formatter formatter)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toWKT() throws UnformattableObjectException(Code)(Java Doc)
public String toWKT(int indentation) throws UnformattableObjectException(Code)(Java Doc)
public String toWKT(Citation authority, int indentation) throws UnformattableObjectException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.