Package org.geotools.referencing.factory
Class AbstractEpsgMediator
- Object
-
- AbstractFactory
-
- ReferencingFactory
-
- AbstractAuthorityFactory
-
- AbstractAuthorityMediator
-
- AbstractEpsgMediator
-
- All Implemented Interfaces:
AuthorityFactory
,CRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
,Factory
,CoordinateOperationAuthorityFactory
,BufferedFactory
,Factory
,RegistrableFactory
- Direct Known Subclasses:
HsqlDialectEpsgMediator
public abstract class AbstractEpsgMediator extends AbstractAuthorityMediator
Abstract implementation for EPSG (has a DataSource reference inside).DataSource docs needed:
- Author:
- Cory Horner (Refractions Research)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class AbstractAuthorityMediator
AbstractAuthorityMediator.WorkerSafeRunnable
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSource
datasource
static int
PRIORITY
The default priority level for this factory.-
Fields inherited from class AbstractAuthorityMediator
factories
-
Fields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
-
-
Constructor Summary
Constructors Constructor Description AbstractEpsgMediator()
No argument constructor - must not fail for factory finder registration.AbstractEpsgMediator(Hints hints)
AbstractEpsgMediator(Hints hints, DataSource datasource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Clean up the object pool of workers (since we are shutting down).Citation
getAuthority()
The authority body of the objects this factory provides.protected Connection
getConnection()
InternationalString
getDescriptionText(String code)
Gets a description of the object corresponding to a code.boolean
isConnected()
True if this mediator is currently connected to one or more workers.-
Methods inherited from class AbstractAuthorityMediator
activateWorker, completeHints, createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateReferenceSystem, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringDatum, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createObject, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, createWith, destroyWorker, getAuthorityCodes, getBackingStoreDescription, getIdentifiedObjectFinder, makeWorker, passivateWorker, toKey, trimAuthority, validateWorker
-
Methods inherited from class AbstractAuthorityFactory
createEngineeringCRS, createExtent, createOperationMethod, createParameterDescriptor, noSuchAuthorityCode
-
Methods inherited from class ReferencingFactory
ensureNonNull, getVendor
-
Methods inherited from class AbstractFactory
addImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toString
-
Methods inherited from interface CRSAuthorityFactory
createEngineeringCRS
-
Methods inherited from interface Factory
getImplementationHints
-
-
-
-
Field Detail
-
PRIORITY
public static final int PRIORITY
The default priority level for this factory.- See Also:
- Constant Field Values
-
datasource
protected DataSource datasource
-
-
Constructor Detail
-
AbstractEpsgMediator
public AbstractEpsgMediator()
No argument constructor - must not fail for factory finder registration.
-
AbstractEpsgMediator
public AbstractEpsgMediator(Hints hints) throws FactoryException
- Throws:
FactoryException
-
AbstractEpsgMediator
public AbstractEpsgMediator(Hints hints, DataSource datasource)
-
-
Method Detail
-
getConnection
protected Connection getConnection() throws SQLException
- Throws:
SQLException
-
getAuthority
public Citation getAuthority()
Description copied from class:AbstractAuthorityMediator
The authority body of the objects this factory provides.- Specified by:
getAuthority
in interfaceAuthorityFactory
- Specified by:
getAuthority
in classAbstractAuthorityMediator
- Returns:
- The organization reponsible for definition of the database.
-
dispose
public void dispose() throws FactoryException
Description copied from class:AbstractAuthorityMediator
Clean up the object pool of workers (since we are shutting down).Subclasses may wish to override this method if they have their own resources to clean up (like a database connection). If you do this please remember to call super.dispose().
- Overrides:
dispose
in classAbstractAuthorityMediator
- Throws:
FactoryException
- if an error occured while disposing the factory.
-
isConnected
public boolean isConnected()
Description copied from class:AbstractAuthorityMediator
True if this mediator is currently connected to one or more workers.- Overrides:
isConnected
in classAbstractAuthorityMediator
-
getDescriptionText
public InternationalString getDescriptionText(String code) throws FactoryException
Gets a description of the object corresponding to a code.- Specified by:
getDescriptionText
in interfaceAuthorityFactory
- Specified by:
getDescriptionText
in classAbstractAuthorityMediator
- Parameters:
code
- Value allocated by authority.- Returns:
- A description of the object, or
null
if the object corresponding to the specifiedcode
has no description. - Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the query failed for some other reason.
-
-