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


org.geotools.referencing.factory.DeferredAuthorityFactory
   org.geotools.referencing.factory.epsg.FactoryUsingWKT

All known Subclasses:   org.geotools.referencing.factory.epsg.UnnamedExtension,  org.geotools.referencing.factory.epsg.EsriExtension,
FactoryUsingWKT
public class FactoryUsingWKT extends DeferredAuthorityFactory implements CRSAuthorityFactory(Code)
Authority factory for beyong the one defined in the EPSG database. This factory is used as a fallback when a requested code is not found in the EPSG database, or when there is no connection at all to the EPSG database. The additional CRS are defined as Well Known Text in a property file located by default in the org.geotools.referencing.factory.epsg package, and whose name should be . If no property file is found, the factory won't be activated. The property file can also be located in a custom directory; See FactoryUsingWKT.getDefinitionsURL() for more details.

This factory can also be used to provide custom extensions or overrides to a main EPSG factory. In order to provide a custom extension file, override the FactoryUsingWKT.getDefinitionsURL() method. In order to make the factory be an override, change the default priority by using the two arguments constructor (this factory defaults to ThreadedEpsgFactory.PRIORITY - 10, so it's used as an extension).
since:
   2.1
version:
   $Id: FactoryUsingWKT.java 27848 2007-11-12 13:10:32Z desruisseaux $
author:
   Martin Desruisseaux
author:
   Jody Garnett
author:
   Rueben Schulz
author:
   Andrea Aime



Field Summary
final public static  StringCRS_DIRECTORY_KEY
     The key for setting the directory where to search for the file.
final protected static  intDEFAULT_PRIORITY
     Default priority for this factory.
final public static  StringFILENAME
     The default filename to read.

Constructor Summary
public  FactoryUsingWKT()
     Constructs an authority factory using the default set of factories.
public  FactoryUsingWKT(Hints userHints)
     Constructs an authority factory using a set of factories created from the specified hints.
protected  FactoryUsingWKT(Hints userHints, int priority)
     Constructs an authority factory using the specified hints and priority.

Method Summary
protected  AbstractAuthorityFactorycreateBackingStore()
     Creates the backing store authority factory.
protected  Citation[]getAuthorities()
     Returns the set of authorities to use as for the CRS to be created.
public  CitationgetAuthority()
     Returns the authority.
protected  URLgetDefinitionsURL()
     Returns the URL to the property file that contains CRS definitions.
public static  voidmain(String[] args)
     Prints a list of codes that duplicate the ones provided in the ThreadedEpsgFactory . The factory tested is the one registered in ReferencingFactoryFinder .
static  voidmain(String[] args, Class type)
     Implementation of the FactoryUsingWKT.main method, shared by subclasses.
protected  SetreportDuplicatedCodes(PrintWriter out)
     Prints a list of codes that duplicate the ones provided by ThreadedEpsgFactory . This is used for implementation of in order to check the content of the file (or whatever property file used as backing store for this factory) from the command line.
Parameters:
  out - The writer where to print the report.
protected  SetreportInstantiationFailures(PrintWriter out)
     Prints a list of CRS that can't be instantiated.

Field Detail
CRS_DIRECTORY_KEY
final public static String CRS_DIRECTORY_KEY(Code)
The key for setting the directory where to search for the file.
since:
   2.4GeoTools.CRS_AUTHORITY_EXTRA_DIRECTORY



DEFAULT_PRIORITY
final protected static int DEFAULT_PRIORITY(Code)
Default priority for this factory.
since:
   2.4



FILENAME
final public static String FILENAME(Code)
The default filename to read. The default FactoryUsingWKT implementation will search for the first occurence of this file in the following places:

  • In the directory specified by the system property.
  • In every org/geotools/referencing/factory/espg directories found on the classpath.

The filename part before the extension ( "epsg" ) denotes the authority namespace where to register the content of this file. The user-directory given by the system property may contains other property files for other authorities, like "esri.properties" , but those additional authorities are not handled by the default FactoryUsingWKT class.
See Also:   FactoryUsingWKT.getDefinitionsURL





Constructor Detail
FactoryUsingWKT
public FactoryUsingWKT()(Code)
Constructs an authority factory using the default set of factories.



FactoryUsingWKT
public FactoryUsingWKT(Hints userHints)(Code)
Constructs an authority factory using a set of factories created from the specified hints. This constructor recognizes the Hints.CRS_FACTORY CRS , Hints.CS_FACTORY CS , Hints.DATUM_FACTORY DATUM and Hints.MATH_TRANSFORM_FACTORY MATH_TRANSFORM FACTORY hints.



FactoryUsingWKT
protected FactoryUsingWKT(Hints userHints, int priority)(Code)
Constructs an authority factory using the specified hints and priority.




Method Detail
createBackingStore
protected AbstractAuthorityFactory createBackingStore() throws FactoryException(Code)
Creates the backing store authority factory. The backing store to uses in createXXX(...) methods.
throws:
  FactoryNotFoundException - if the no epsg.properties file has been found.
throws:
  FactoryException - if the constructor failed to find or read the file.This exception usually has an IOException as its cause.



getAuthorities
protected Citation[] getAuthorities()(Code)
Returns the set of authorities to use as for the CRS to be created. This set is given to the .

The default implementation returns a singleton containing only . Subclasses should override this method in order to enumerate all relevant authorities, with in last position. For example EsriExtension returns { , }.
since:
   2.4




getAuthority
public Citation getAuthority()(Code)
Returns the authority. The default implementation returns the first citation returned by FactoryUsingWKT.getAuthorities() , with the addition of identifiers from all additional authorities returned by the above method.
See Also:   FactoryUsingWKT.getAuthorities



getDefinitionsURL
protected URL getDefinitionsURL()(Code)
Returns the URL to the property file that contains CRS definitions. The default implementation performs the following search path:
  • If a value is set for the system property key, then the file will be searched in this directory.
  • If no value is set for the above-cited system property, or if no file was found in that directory, then the first file found in any org/geotools/referencing/factory/epsg directory on the classpath will be used.
  • If no file was found on the classpath neither, then this factory will be disabled.
The URL, or null if none.



main
public static void main(String[] args) throws FactoryException(Code)
Prints a list of codes that duplicate the ones provided in the ThreadedEpsgFactory . The factory tested is the one registered in ReferencingFactoryFinder . By default, this is this FactoryUsingWKT class backed by the property file. This method can be invoked from the command line in order to check the content of the property file. Valid arguments are:

-test Try to instantiate all CRS and reports any failure to do so.
-duplicated List all codes from the WKT factory that are duplicating a code from the SQL factory.

Parameters:
  args - Command line arguments.
throws:
  FactoryException - if an error occured.
since:
   2.4




main
static void main(String[] args, Class type) throws FactoryException(Code)
Implementation of the FactoryUsingWKT.main method, shared by subclasses.



reportDuplicatedCodes
protected Set reportDuplicatedCodes(PrintWriter out) throws FactoryException(Code)
Prints a list of codes that duplicate the ones provided by ThreadedEpsgFactory . This is used for implementation of in order to check the content of the file (or whatever property file used as backing store for this factory) from the command line.
Parameters:
  out - The writer where to print the report. The set of duplicated codes.
throws:
  FactoryException - if an error occured.
since:
   2.4



reportInstantiationFailures
protected Set reportInstantiationFailures(PrintWriter out) throws FactoryException(Code)
Prints a list of CRS that can't be instantiated. This is used for implementation of in order to check the content of the file (or whatever property file used as backing store for this factory) from the command line.
Parameters:
  out - The writer where to print the report. The set of codes that can't be instantiated.
throws:
  FactoryException - if an error occured while.
since:
   2.4



Methods inherited from org.geotools.referencing.factory.DeferredAuthorityFactory
protected boolean canDisposeBackingStore(AbstractAuthorityFactory backingStore)(Code)(Java Doc)
abstract protected AbstractAuthorityFactory createBackingStore() throws FactoryException(Code)(Java Doc)
public synchronized void dispose() throws FactoryException(Code)(Java Doc)
public boolean isAvailable()(Code)(Java Doc)
public synchronized boolean isConnected()(Code)(Java Doc)
public synchronized void setTimeout(long delay)(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.