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


java.lang.Object
   org.geotools.factory.GeoTools

GeoTools
final public class GeoTools (Code)
Static methods relative to the global GeoTools configuration. GeoTools can be configured in a system-wide basis through , some of them are declared as String constants in this class.

There are two aspects to the configuration of GeoTools:

  • Default Settings: Are handled as the Hints returned by getDefaultHints() , the default values can be provided by your code, or specified using system properties.
  • Integration JNDI: Telling the GeoTools library about the facilities of your application, or application container takes several forms. This class provides the initContext( InitialContext ) method allowing you to tell GeoTools about the JNDI context you would like it to use.
  • Intergration Plugins: If you are hosting GeoTools in a alternate plugin system such as Spring or OSGi you will need to hunt down the FactoryFinders and register additional "FactoryIterators" you would like GeoTools to search using the addFactoryIteratorProvider method.

JNDI Integration

This class provides a for Java Naming and Directory Interfaces (JNDI) in Geotools. This classes provides a central place where initial context can been found for the Geotools library. This context is used for example by the in order to find connection parameters to an EPSG database. Using JNDI, such connection parameters can be set in a J2EE environment.
since:
   2.4
version:
   $Id: GeoTools.java 29058 2008-02-03 17:47:07Z desruisseaux $
author:
   Jody Garnett
author:
   Martin Desruisseaux


Field Summary
final public static  StringCRS_AUTHORITY_EXTRA_DIRECTORY
     The key for the default value to be assigned to the Hints.CRS_AUTHORITY_EXTRA_DIRECTORY CRS_AUTHORITY_EXTRA_DIRECTORY hint.
final public static  StringEPSG_DATA_SOURCE
     The key for the default value to be assigned to the Hints.EPSG_DATA_SOURCE EPSG_DATA_SOURCE hint.
final public static  StringFORCE_LONGITUDE_FIRST_AXIS_ORDER
     The key for the default value to be assigned to the Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDERFORCE_LONGITUDE_FIRST_AXIS_ORDER hint. This setting can provide a transition path for projects expecting a (longitude, latitude) axis order on a system-wide level.


Method Summary
public static  voidaddChangeListener(ChangeListener listener)
     Adds the specified listener to the list of objects to inform when system-wide configuration changed.
public static  voidaddFactoryIteratorProvider(FactoryIteratorProvider provider)
     Adds an alternative way to search for factory implementations.
public static  voidfireConfigurationChanged()
     Informs every listeners that system-wide configuration changed.
public static  HintsgetDefaultHints()
     Returns the default set of hints used for the various utility classes. This default set is determined by:

  • The available.
public static synchronized  InitialContextgetInitialContext(Hints hints)
     Returns the default initial context.
Parameters:
  hints - An optional set of hints, or null if none.
public static  VersiongetVersion()
     Reports back the version of GeoTools being used.
public static  voidinit(Hints hints)
     Initializes GeoTools for use.
public static synchronized  voidinit(InitialContext applicationContext)
     Forces the initial context for test cases, or as needed.
public static  voidmain(String[] args)
     Reports the GeoTools number to the .
public static  voidremoveChangeListener(ChangeListener listener)
     Removes the specified listener from the list of objects to inform when system-wide configuration changed.
public static  voidremoveFactoryIteratorProvider(FactoryIteratorProvider provider)
     Removes a provider that was previously .
static  booleanscanForSystemHints(Hints hints)
     Scans for any property keys defined in this class, and add their values to the specified map of hints.
public  voidsetLoggerFactory(LoggerFactory factory)
     Sets the global . This method is the same as Logging.GEOTOOLS.setLoggerFactory(factory) . GeoTools ships with support for Commons-logging and log4j.

Field Detail
CRS_AUTHORITY_EXTRA_DIRECTORY
final public static String CRS_AUTHORITY_EXTRA_DIRECTORY(Code)
The key for the default value to be assigned to the Hints.CRS_AUTHORITY_EXTRA_DIRECTORY CRS_AUTHORITY_EXTRA_DIRECTORY hint.
See Also:   Hints.CRS_AUTHORITY_EXTRA_DIRECTORY
See Also:   GeoTools.getDefaultHints



EPSG_DATA_SOURCE
final public static String EPSG_DATA_SOURCE(Code)
The key for the default value to be assigned to the Hints.EPSG_DATA_SOURCE EPSG_DATA_SOURCE hint.
See Also:   Hints.EPSG_DATA_SOURCE
See Also:   GeoTools.getDefaultHints



FORCE_LONGITUDE_FIRST_AXIS_ORDER
final public static String FORCE_LONGITUDE_FIRST_AXIS_ORDER(Code)
The key for the default value to be assigned to the Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDERFORCE_LONGITUDE_FIRST_AXIS_ORDER hint. This setting can provide a transition path for projects expecting a (longitude, latitude) axis order on a system-wide level. Application developpers can set the default value as below:
 System.setProperty(FORCE_LONGITUDE_FIRST_AXIS_ORDER, "true");
 
Note that this system property applies mostly to the default EPSG factory. Most other factories ( "CRS" , "AUTO" , etc.) don't need this property since they use (longitude, latitude) axis order by design.
See Also:   Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER
See Also:   GeoTools.getDefaultHints





Method Detail
addChangeListener
public static void addChangeListener(ChangeListener listener)(Code)
Adds the specified listener to the list of objects to inform when system-wide configuration changed.



addFactoryIteratorProvider
public static void addFactoryIteratorProvider(FactoryIteratorProvider provider)(Code)
Adds an alternative way to search for factory implementations. FactoryRegistry has a default mechanism bundled in it, which uses the content of all META-INF/services directories found on the classpath. This addFactoryIteratorProvider method allows to specify additional discovery algorithms. It may be useful in the context of some frameworks that use the constructor injection pattern, like the Spring framework.



fireConfigurationChanged
public static void fireConfigurationChanged()(Code)
Informs every listeners that system-wide configuration changed.



getDefaultHints
public static Hints getDefaultHints()(Code)
Returns the default set of hints used for the various utility classes. This default set is determined by:

Long term plan: We would like to transition the utility classes to being injected with their required factories, either by taking Hints as part of their constructor, or otherwise. Making this change would be a three step process 1) create instance methods for each static final class method 2) create an singleton instance of the class 3) change each static final class method into a call to the singleton. With this in place we could then encourage client code to make use of utility class instances before eventually retiring the static final methods. A copy of the default hints. It is safe to add to it.




getInitialContext
public static synchronized InitialContext getInitialContext(Hints hints) throws NamingException(Code)
Returns the default initial context.
Parameters:
  hints - An optional set of hints, or null if none. The initial context (never null ).
throws:
  NamingException - if the initial context can't be created.
See Also:   GeoTools.init(InitialContext)
since:
   2.4



getVersion
public static Version getVersion()(Code)
Reports back the version of GeoTools being used.



init
public static void init(Hints hints)(Code)
Initializes GeoTools for use. This convenience method performs various tasks (more may be added in the future), including setting up the in one of the following states:

  • If the Commons-logging framework is available, then every logging message in the org.geotools namespace sent to the Java are redirected to Commons-logging.
  • Otherwise if the Log4J framework is available, then every logging message in the org.geotools namespace sent to the Java are redirected to Log4J.
  • Otherwise, the Java logging for console output is replaced by a .

In addition, the are initialized to the specified hints .

Note that invoking this method is usually not needed for proper working of the Geotools library. It is just a convenience method for overwriting some Java and Geotools default settings in a way that seems to be common in server environment. Such overwriting may not be wanted for every situations.

Example of typical invocation in a Geoserver environment:

 Hints hints = new Hints(null);
 hints.put(
 , Boolean.TRUE);
 hints.put(
 , "http");
 GeoTools.init(hints);
 

See Also:   Logging.setLoggerFactory(String)
See Also:   Logging.forceMonolineConsoleOutput
See Also:   Hints.putSystemDefault
See Also:   GeoTools.getDefaultHints



init
public static synchronized void init(InitialContext applicationContext)(Code)
Forces the initial context for test cases, or as needed.
See Also:   GeoTools.getInitialContext
since:
   2.4



main
public static void main(String[] args)(Code)
Reports the GeoTools number to the .



removeChangeListener
public static void removeChangeListener(ChangeListener listener)(Code)
Removes the specified listener from the list of objects to inform when system-wide configuration changed.



removeFactoryIteratorProvider
public static void removeFactoryIteratorProvider(FactoryIteratorProvider provider)(Code)
Removes a provider that was previously . Note that factories already obtained from the specified provider will not be by this method.



scanForSystemHints
static boolean scanForSystemHints(Hints hints)(Code)
Scans for any property keys defined in this class, and add their values to the specified map of hints. For example if the system property is defined, then the Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDERFORCE_LONGITUDE_FIRST_AXIS_ORDER hint will be added to the set of hints. true if at least one hint changed as a result of this scan,or false otherwise.



setLoggerFactory
public void setLoggerFactory(LoggerFactory factory)(Code)
Sets the global . This method is the same as Logging.GEOTOOLS.setLoggerFactory(factory) . GeoTools ships with support for Commons-logging and log4j. This method exists to allow you supply your own implementation (this is sometimes required when using a GeoTools application in an exotic environment like Eclipse, OC4J or your application).
See Also:   Logging.setLoggerFactory(LoggerFactory)
since:
   2.4



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.