|
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.deegree.db.DatabaseCRSProvider
public class DatabaseCRSProvider
The DatabaseCRSProvider class is the intermediate class for accessing the Deegree CRS via a database
backend. It also initializes the CRSQuerier (for retrieving CRSs from database), CRSExported (for inserting CRSs to
database) and CRSRemover (for removing CRSs from database).
In the constructor the database connection is realized in read-only mode (by default, using the classpath
subprotocol), but can be set so that database changes are possible (by setting the environment variable CRS_DB_URL).
The JDBC driver is also set (CRS_DB_DRIVER variable), as well as the username and password.
| Constructor Summary | |
|---|---|
DatabaseCRSProvider()
|
|
DatabaseCRSProvider(Properties properties)
|
|
| Method Summary | |
|---|---|
boolean |
canExport()
|
void |
changeAxisCode(String axisName,
String axisOrientation,
Unit uom,
CRSCodeType code)
Method used by the synchronization-with-EPSG-database class to update the Axis with the EPSG code that it was lacking. |
void |
export(List<CoordinateSystem> crsList)
Export a list of CoordianteSystems to the database |
void |
export(StringBuilder sb,
List<CoordinateSystem> crsToExport)
Exports the crs to the implemented format. |
List<CRSCodeType> |
getAvailableCRSCodes()
This method should be called if one is only interested in the available identifiers and not in the coordinatesystems themselves. |
List<CoordinateSystem> |
getAvailableCRSs()
This method should be called to see if the provider is able to create all defined crs's, thus verifying the correctness of the configuration. |
Connection |
getConnection()
|
CoordinateSystem |
getCRSByCode(CRSCodeType code)
Retrieves the CRS via its code |
CRSIdentifiable |
getIdentifiable(CRSCodeType id)
This method is more general than the CRSProvider.getCRSByCode(CRSCodeType), because it represents a possibility to
return an arbitrary CRSIdentifiable Object from the providers backend. |
int |
getInternalID(CRSIdentifiable identifiable)
Retrieve the internal database ID for the object supplied |
CRSRemover |
getRemover()
|
Transformation |
getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
This method is should retrieve a transformation (chain) which transforms coordinates from the given source into the given target crs. |
void |
remove(List<CoordinateSystem> crsList)
|
void |
setCode(int internalID,
String code)
Request an Update into the database for a new Code |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseCRSProvider()
throws CRSConfigurationException
CRSConfigurationException
public DatabaseCRSProvider(Properties properties)
throws CRSConfigurationException
properties -
CRSConfigurationException| Method Detail |
|---|
public int getInternalID(CRSIdentifiable identifiable)
identifiable - the CRSIdentifiable object
public void setCode(int internalID,
String code)
throws SQLException
internalID - the internal database ID of the objectcode - the Code that will be set
SQLException
public Transformation getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
throws CRSConfigurationException
CRSProvidernull should be returned.
- Specified by:
getTransformation in interface CRSProvider
- Parameters:
sourceCRS - targetCRS -
- Returns:
null
- Throws:
CRSConfigurationException
public CoordinateSystem getCRSByCode(CRSCodeType code)
throws CRSConfigurationException
getCRSByCode in interface CRSProvidercode -
CRSConfigurationExceptionpublic boolean canExport()
canExport in interface CRSProviderpublic List<CRSCodeType> getAvailableCRSCodes()
CRSProvider
getAvailableCRSCodes in interface CRSProviderCRSCodeTypes from all the available CRSspublic List<CoordinateSystem> getAvailableCRSs()
CRSProvider
getAvailableCRSs in interface CRSProviderCoordinateSystems of all the available CRSs.
public void export(StringBuilder sb,
List<CoordinateSystem> crsToExport)
CRSProviderCRSProvider.canExport() before executing this method.
export in interface CRSProvidersb - crsToExport - CRSProvider.canExport()
public void remove(List<CoordinateSystem> crsList)
throws SQLException
crsList - a list of CoordinateSystems to be removed
SQLException
public void changeAxisCode(String axisName,
String axisOrientation,
Unit uom,
CRSCodeType code)
throws SQLException
axisName - axisOrientation - uom - code - the EPSG code that will be assigned to the Axis
SQLException
public void export(List<CoordinateSystem> crsList)
throws SQLException,
CRSException
crsList -
SQLException
CRSExceptionpublic Connection getConnection()
public CRSRemover getRemover()
public CRSIdentifiable getIdentifiable(CRSCodeType id)
throws CRSConfigurationException
CRSProviderCRSProvider.getCRSByCode(CRSCodeType), because it represents a possibility to
return an arbitrary CRSIdentifiable Object from the providers backend.
getIdentifiable in interface CRSProviderid - the CRSCodeType of the wanted identifiable
CRSIdentifiable object
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested Object. This
exception should not be thrown if the given id wasn't found, in this case null should
be returned.
|
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 | |||||||||