|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.crs.configuration.CRSConfiguration
public class CRSConfiguration
The CRSConfiguration creates, instantiates and supplies a configured CRS-Provider. Because only one
crs-configuration is needed inside the JVM, this implementation uses a singleton pattern.
The configuration will try to read the file: crs_providers.properties. It uses the following strategy to load this file, first the root directory (e.g. '/' or WEB-INF/classes ) will be searched. If no file was found there, it will try to load from the package. The properties file must denote a property with name 'CRS_PROVIDER' followed by a '=' and a fully qualified name denoting the class (an instance of CRSProvider) which should be available in the classpath. This class must have an empty constructor.
The class is also a command line tool for transferring CRSs between providers. Please see the main method or call the class with -h. The last feature introduced was the possibility of removing CRSs from the database backend (by using the -remove command-line parameter).
| Field Summary | |
|---|---|
static Map<String,CRSConfiguration> |
DEFINED_CONFIGURATIONS
|
| Method Summary | |
|---|---|
static CRSConfiguration |
getCRSConfiguration()
Creates or returns an instance of the CRSConfiguration by reading the DEFAULT property configured in the 'crs_providers.properties'. |
static CRSConfiguration |
getCRSConfiguration(String providerName)
Creates or returns an instance of the CRSConfiguration by trying to instantiate the given provider class. |
CRSProvider |
getProvider()
|
TransformationFactory |
getTransformationFactory()
|
static String |
setDefaultFileProperty(String fileName)
Overwrites the crs.configuration property with the given value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Map<String,CRSConfiguration> DEFINED_CONFIGURATIONS
| Method Detail |
|---|
public static CRSConfiguration getCRSConfiguration(String providerName)
DeegreeCRSProvider will be
returned.
providerName - the canonical name of the class, e.g. org.deegree.crs.MyProvider
CRSConfigurationException - if --anything-- went wrong while instantiating the CRSProvider.
public static CRSConfiguration getCRSConfiguration()
throws CRSConfigurationException
DeegreeCRSProvider
will be used.
CRSConfigurationException - if --anything-- went wrong while instantiating the CRSProvider.public static String setDefaultFileProperty(String fileName)
fileName - to set the crs.configuration property to.
CRSConfigurationException - if --anything-- went wrong while instantiating the CRSProvider.public final CRSProvider getProvider()
public final TransformationFactory getTransformationFactory()
public String toString()
toString in class Object
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||