Java Doc for IdentifiedObjectFinder.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » factory » 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.factory 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.referencing.factory.IdentifiedObjectFinder

IdentifiedObjectFinder
public class IdentifiedObjectFinder (Code)
Looks up an object from an which is , to the specified object. The main purpose of this class is to get a fully from an incomplete one, for example from an object without or " AUTHORITY[...] " element in Well Known Text terminology.
since:
   2.4
version:
   $Id: IdentifiedObjectFinder.java 27862 2007-11-12 19:51:19Z desruisseaux $
author:
   Martin Desruisseaux

Inner Class :static class Adapter extends IdentifiedObjectFinder

Field Summary
final  AuthorityFactoryProxyproxy
     The proxy for object creation.

Constructor Summary
 IdentifiedObjectFinder(IdentifiedObjectFinder finder)
     Creates a finder using the same proxy than the specified finder.
protected  IdentifiedObjectFinder(AuthorityFactory factory, Class type)
     Creates a finder using the specified factory.

Method Summary
final  IdentifiedObjectcreateFromCodes(IdentifiedObject object)
     Creates an object , to the specified object.
final  IdentifiedObjectcreateFromIdentifiers(IdentifiedObject object)
     Creates an object , to the specified object using only the . If no such object is found, returns null .

This method may be used in order to get a fully identified object from a partially identified one.
Parameters:
  object - The object looked up.

final  IdentifiedObjectcreateFromNames(IdentifiedObject object)
     Creates an object , to the specified object using only the and .
protected  IdentifiedObjectderiveEquivalent(IdentifiedObject candidate, IdentifiedObject model)
     Returns candidate , or an object derived from candidate , if it is to the specified model.
public  IdentifiedObjectfind(IdentifiedObject object)
     Lookups an object which is , to the specified object.
public  StringfindIdentifier(IdentifiedObject object)
     Returns the identifier of the specified object, or null if none.
protected  SetgetCodeCandidates(IdentifiedObject object)
     Returns a set of authority codes that may identify the same object than the specified one.
final  StringgetIdentifier(IdentifiedObject object)
     Returns the identifier for the specified object.
public  booleanisFullScanAllowed()
     If true , an exhaustive full scan against all registered objects will be performed (may be slow).
public  voidsetFullScanAllowed(boolean fullScan)
     Set whatever an exhaustive scan against all registered objects is allowed.
public  StringtoString()
     Returns a string representation of this finder, for debugging purpose only.

Field Detail
proxy
final AuthorityFactoryProxy proxy(Code)
The proxy for object creation.




Constructor Detail
IdentifiedObjectFinder
IdentifiedObjectFinder(IdentifiedObjectFinder finder)(Code)
Creates a finder using the same proxy than the specified finder.



IdentifiedObjectFinder
protected IdentifiedObjectFinder(AuthorityFactory factory, Class type)(Code)
Creates a finder using the specified factory. This constructor is protected because instances of this class should not be created directly. Use AbstractAuthorityFactory.getIdentifiedObjectFinder instead.
Parameters:
  factory - The factory to scan for the identified objects.
Parameters:
  type - The type of objects to lookup.




Method Detail
createFromCodes
final IdentifiedObject createFromCodes(IdentifiedObject object) throws FactoryException(Code)
Creates an object , to the specified object. This method scans the , create the objects and returns the first one which is equals to the specified object in the sense of CRS.equalsIgnoreMetadata equalsIgnoreMetadata .

This method may be used in order to get a fully from an object without .

Scaning the whole set of authority codes may be slow. Users should try (object) and/or (object) before to fallback on this method.
Parameters:
  object - The object looked up. The identified object, or null if not found.
throws:
  FactoryException - if an error occured while scanning through authority codes.
See Also:   IdentifiedObjectFinder.createFromIdentifiers
See Also:   IdentifiedObjectFinder.createFromNames




createFromIdentifiers
final IdentifiedObject createFromIdentifiers(IdentifiedObject object) throws FactoryException(Code)
Creates an object , to the specified object using only the . If no such object is found, returns null .

This method may be used in order to get a fully identified object from a partially identified one.
Parameters:
  object - The object looked up. The identified object, or null if not found.
See Also:   IdentifiedObjectFinder.createFromCodes
See Also:   IdentifiedObjectFinder.createFromNames
throws:
  FactoryException - if an error occured while creating an object.




createFromNames
final IdentifiedObject createFromNames(IdentifiedObject object) throws FactoryException(Code)
Creates an object , to the specified object using only the and . If no such object is found, returns null .

This method may be used with some implementations like the one backed by the EPSG database, which are capable to find an object from its name when the identifier is unknown.
Parameters:
  object - The object looked up. The identified object, or null if not found.
See Also:   IdentifiedObjectFinder.createFromCodes
See Also:   IdentifiedObjectFinder.createFromIdentifiers
throws:
  FactoryException - if an error occured while creating an object.




deriveEquivalent
protected IdentifiedObject deriveEquivalent(IdentifiedObject candidate, IdentifiedObject model) throws FactoryException(Code)
Returns candidate , or an object derived from candidate , if it is to the specified model. Otherwise returns null .

This method is overriden by factories that may test many flavors of candidate , for example TransformedAuthorityFactory .
Parameters:
  candidate - An object created by the factory specified at construction time. candidate , or an object derived from candidate (for example with axisorder forced to (longitude, latitude), or null if noneof the above is to thespecified model.
throws:
  FactoryException - if an error occured while creating a derived object.




find
public IdentifiedObject find(IdentifiedObject object) throws FactoryException(Code)
Lookups an object which is , to the specified object. The default implementation tries to instantiate some from the authority factory specified at construction time, in the following order:

  • If the specified object contains associated to the same authority than the factory, then those identifiers are used for to be tested.
  • If the authority factory can create objects from their in addition of identifiers, then the name and are used for creating objects to be tested.
  • If , then full are used for creating objects to be tested.

The first of the above created objects which is equals to the specified object in the the sense of CRS.equalsIgnoreMetadata equalsIgnoreMetadata is returned.
Parameters:
  object - The object looked up. The identified object, or null if not found.
throws:
  FactoryException - if an error occured while creating an object.




findIdentifier
public String findIdentifier(IdentifiedObject object) throws FactoryException(Code)
Returns the identifier of the specified object, or null if none. The default implementation invokes (object) and extracts the code from the returned .



getCodeCandidates
protected Set getCodeCandidates(IdentifiedObject object) throws FactoryException(Code)
Returns a set of authority codes that may identify the same object than the specified one. The returned set must contains the code of every objects that are , to the specified one. However the set is not required to contains only the codes of those objects; it may conservatively contains the code for more objects if an exact search is too expensive.

This method is invoked by the default IdentifiedObjectFinder.find find method implementation. The caller may iterates through every returned codes, instantiate the objects and compare them with the specified one in order to determine which codes are really applicable.

The default implementation returns the same set than (type) where type is the interface specified at construction type. Subclasses should override this method in order to return a smaller set, if they can.
Parameters:
  object - The object looked up. A set of code candidates.
throws:
  FactoryException - if an error occured while fetching the set of code candidates.




getIdentifier
final String getIdentifier(IdentifiedObject object)(Code)
Returns the identifier for the specified object.



isFullScanAllowed
public boolean isFullScanAllowed()(Code)
If true , an exhaustive full scan against all registered objects will be performed (may be slow). Otherwise only a fast lookup based on embedded identifiers and names will be performed. The default value is true .



setFullScanAllowed
public void setFullScanAllowed(boolean fullScan)(Code)
Set whatever an exhaustive scan against all registered objects is allowed. The default value is true .



toString
public String toString()(Code)
Returns a string representation of this finder, for debugging purpose only.



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.