org.geotools.referencing.factory
Class AbstractEpsgMediator

java.lang.Object
  extended by org.geotools.factory.AbstractFactory
      extended by org.geotools.referencing.factory.ReferencingFactory
          extended by org.geotools.referencing.factory.AbstractAuthorityFactory
              extended by org.geotools.referencing.factory.AbstractAuthorityMediator
                  extended by org.geotools.referencing.factory.AbstractEpsgMediator
All Implemented Interfaces:
javax.imageio.spi.RegisterableService, BufferedFactory, Factory, org.opengis.referencing.AuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.cs.CSAuthorityFactory, org.opengis.referencing.datum.DatumAuthorityFactory, org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
Direct Known Subclasses:
HsqlDialectEpsgMediator, OracleDialectEpsgMediator

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 org.geotools.referencing.factory.AbstractAuthorityMediator
AbstractAuthorityMediator.WorkerSafeRunnable
 
Field Summary
protected  javax.sql.DataSource datasource
           
static int PRIORITY
          The default priority level for this factory.
 
Fields inherited from class org.geotools.referencing.factory.AbstractAuthorityMediator
factories
 
Fields inherited from class org.geotools.factory.AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
AbstractEpsgMediator()
          No argument constructor - must not fail for factory finder registration.
AbstractEpsgMediator(Hints hints)
           
AbstractEpsgMediator(Hints hints, javax.sql.DataSource datasource)
           
 
Method Summary
 void dispose()
          Clean up the object pool of workers (since we are shutting down).
 org.opengis.metadata.citation.Citation getAuthority()
          The authority body of the objects this factory provides.
protected  java.sql.Connection getConnection()
           
 org.opengis.util.InternationalString getDescriptionText(java.lang.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 org.geotools.referencing.factory.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 org.geotools.referencing.factory.AbstractAuthorityFactory
createEngineeringCRS, createExtent, createOperationMethod, createParameterDescriptor, noSuchAuthorityCode
 
Methods inherited from class org.geotools.referencing.factory.ReferencingFactory
ensureNonNull, getVendor
 
Methods inherited from class org.geotools.factory.AbstractFactory
addImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.crs.CRSAuthorityFactory
createEngineeringCRS
 
Methods inherited from interface org.opengis.referencing.Factory
getVendor
 
Methods inherited from interface org.geotools.factory.Factory
getImplementationHints
 

Field Detail

PRIORITY

public static final int PRIORITY
The default priority level for this factory.

See Also:
Constant Field Values

datasource

protected javax.sql.DataSource datasource
Constructor Detail

AbstractEpsgMediator

public AbstractEpsgMediator()
No argument constructor - must not fail for factory finder registration.


AbstractEpsgMediator

public AbstractEpsgMediator(Hints hints)
                     throws org.opengis.referencing.FactoryException
Throws:
org.opengis.referencing.FactoryException

AbstractEpsgMediator

public AbstractEpsgMediator(Hints hints,
                            javax.sql.DataSource datasource)
Method Detail

getConnection

protected java.sql.Connection getConnection()
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

getAuthority

public org.opengis.metadata.citation.Citation getAuthority()
Description copied from class: AbstractAuthorityMediator
The authority body of the objects this factory provides.

Specified by:
getAuthority in interface org.opengis.referencing.AuthorityFactory
Specified by:
getAuthority in class AbstractAuthorityMediator

dispose

public void dispose()
             throws org.opengis.referencing.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 class AbstractAuthorityMediator
Throws:
org.opengis.referencing.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 class AbstractAuthorityMediator
Returns:

getDescriptionText

public org.opengis.util.InternationalString getDescriptionText(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Gets a description of the object corresponding to a code.

Specified by:
getDescriptionText in interface org.opengis.referencing.AuthorityFactory
Specified by:
getDescriptionText in class AbstractAuthorityMediator
Parameters:
code - Value allocated by authority.
Returns:
A description of the object, or null if the object corresponding to the specified code has no description.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
org.opengis.referencing.FactoryException - if the query failed for some other reason.


Copyright © 1996-2010 Geotools. All Rights Reserved.