org.geotools.referencing.factory
Class URN_AuthorityFactory

Object
  extended by AbstractFactory
      extended by ReferencingFactory
          extended by AbstractAuthorityFactory
              extended by AuthorityFactoryAdapter
                  extended by URN_AuthorityFactory
All Implemented Interfaces:
RegisterableService, Factory, OptionalFactory, AuthorityFactory, CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory

Deprecated. This class will move in a org.geotools.referencing.factory.web package in Geotools 2.5, in order to put together other web-related factories. Don't use this class directly. You should not need to anyway - use ReferencingFactoryFinder instead, which will continue to work no matter where this class is located.

public class URN_AuthorityFactory
extends AuthorityFactoryAdapter
implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory

Wraps all factories in a "urn:ogc:def" name space. An exemple of complete URN is "urn:ogc:def:crs:EPSG:6.8:4326".

Users don't need to create an instance of this class, since one is automatically registered for use in ReferencingFactoryFinder.

Since:
2.4
Author:
Justin Deoliveira, Martin Desruisseaux
See Also:
URNs of definitions in OGC namespace
Module:
modules/library/referencing (gt-referencing.jar)

Field Summary
 
Fields inherited from class ReferencingFactory
LOGGER
 
Fields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
URN_AuthorityFactory()
          Deprecated. Creates a default wrapper.
URN_AuthorityFactory(AllAuthoritiesFactory factory)
          Deprecated. Creates a wrapper around the specified factory.
URN_AuthorityFactory(Hints userHints)
          Deprecated. Creates a wrapper using the specified hints.
 
Method Summary
protected  AuthorityFactory createVersionedFactory(Version version)
          Deprecated. Invoked when a factory is requested for a specific version.
 Citation getAuthority()
          Deprecated. Returns the authority, which contains "urn:ogc:def" and "urn:x-ogc:def" identifiers.
protected  AuthorityFactory getAuthorityFactory(String code)
          Deprecated. Returns an object factory for the specified code.
protected  CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory(String code)
          Deprecated. Returns the coordinate operation factory to use for the specified URN.
protected  CRSAuthorityFactory getCRSAuthorityFactory(String code)
          Deprecated. Returns the coordinate reference system factory to use for the specified URN.
protected  CSAuthorityFactory getCSAuthorityFactory(String code)
          Deprecated. Returns the coordinate system factory to use for the specified URN.
protected  DatumAuthorityFactory getDatumAuthorityFactory(String code)
          Deprecated. Returns the datum factory to use for the specified URN.
protected  String toBackingFactoryCode(String code)
          Deprecated. Removes the URN base ("urn:ogc:def") from the specified code before to pass it to the wrapped factories.
 
Methods inherited from class AuthorityFactoryAdapter
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateReferenceSystem, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createObject, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, dispose, getAuthorityCodes, getBackingStoreDescription, getDescriptionText, getIdentifiedObjectFinder, getVendor, isAvailable
 
Methods inherited from class AbstractAuthorityFactory
noSuchAuthorityCode, trimAuthority
 
Methods inherited from class ReferencingFactory
ensureNonNull
 
Methods inherited from class AbstractFactory
addImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createCoordinateReferenceSystem, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
 
Methods inherited from interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
 
Methods inherited from interface Factory
getVendor
 
Methods inherited from interface CSAuthorityFactory
createCartesianCS, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createEllipsoidalCS, createPolarCS, createSphericalCS, createTimeCS, createUnit, createVerticalCS
 
Methods inherited from interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
 
Methods inherited from interface Factory
getVendor
 
Methods inherited from interface DatumAuthorityFactory
createDatum, createEllipsoid, createEngineeringDatum, createGeodeticDatum, createImageDatum, createPrimeMeridian, createTemporalDatum, createVerticalDatum
 
Methods inherited from interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
 
Methods inherited from interface Factory
getVendor
 
Methods inherited from interface CoordinateOperationAuthorityFactory
createCoordinateOperation, createFromCoordinateReferenceSystemCodes
 
Methods inherited from interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
 
Methods inherited from interface Factory
getVendor
 
Methods inherited from interface Factory
getImplementationHints
 

Constructor Detail

URN_AuthorityFactory

public URN_AuthorityFactory()
Deprecated. 
Creates a default wrapper.


URN_AuthorityFactory

public URN_AuthorityFactory(Hints userHints)
Deprecated. 
Creates a wrapper using the specified hints. For strict compliance with OGC definition of "urn:ogc:def" namespace, the supplied hints should contains at least the FORCE_LONGITUDE_FIRST_AXIS_ORDER hint with value FALSE.

Parameters:
userHints - The hints to be given to backing factories.

URN_AuthorityFactory

public URN_AuthorityFactory(AllAuthoritiesFactory factory)
Deprecated. 
Creates a wrapper around the specified factory. The supplied factory is given unchanged to the super class constructor.

Method Detail

getAuthority

public Citation getAuthority()
Deprecated. 
Returns the authority, which contains "urn:ogc:def" and "urn:x-ogc:def" identifiers.

Specified by:
getAuthority in interface AuthorityFactory
Overrides:
getAuthority in class AuthorityFactoryAdapter

getAuthorityFactory

protected AuthorityFactory getAuthorityFactory(String code)
                                        throws FactoryException
Deprecated. 
Returns an object factory for the specified code. This method invokes one of the getTypeAuthorityFactory methods where Type is inferred from the code.

Overrides:
getAuthorityFactory in class AuthorityFactoryAdapter
Parameters:
code - The authority code given to this class.
Returns:
A factory for the specified authority code (never null).
Throws:
FactoryException - if no suitable factory were found.

getDatumAuthorityFactory

protected DatumAuthorityFactory getDatumAuthorityFactory(String code)
                                                  throws FactoryException
Deprecated. 
Returns the datum factory to use for the specified URN. If the URN contains a version string, then this method will try to fetch a factory for that particular version. The createVersionedFactory(org.geotools.util.Version) method may be invoked for that purpose. If no factory is provided for that specific version, then the default one is used.

Overrides:
getDatumAuthorityFactory in class AuthorityFactoryAdapter
Parameters:
code - The URN given to this class.
Returns:
A factory for the specified URN (never null).
Throws:
FactoryException - if no datum factory is available.

getCSAuthorityFactory

protected CSAuthorityFactory getCSAuthorityFactory(String code)
                                            throws FactoryException
Deprecated. 
Returns the coordinate system factory to use for the specified URN. If the URN contains a version string, then this method will try to fetch a factory for that particular version. The createVersionedFactory(org.geotools.util.Version) method may be invoked for that purpose. If no factory is provided for that specific version, then the default one is used.

Overrides:
getCSAuthorityFactory in class AuthorityFactoryAdapter
Parameters:
code - The URN given to this class.
Returns:
A factory for the specified URN (never null).
Throws:
FactoryException - if no coordinate system factory is available.

getCRSAuthorityFactory

protected CRSAuthorityFactory getCRSAuthorityFactory(String code)
                                              throws FactoryException
Deprecated. 
Returns the coordinate reference system factory to use for the specified URN. If the URN contains a version string, then this method will try to fetch a factory for that particular version. The createVersionedFactory(org.geotools.util.Version) method may be invoked for that purpose. If no factory is provided for that specific version, then the default one is used.

Overrides:
getCRSAuthorityFactory in class AuthorityFactoryAdapter
Parameters:
code - The URN given to this class.
Returns:
A factory for the specified URN (never null).
Throws:
FactoryException - if no coordinate reference system factory is available.

getCoordinateOperationAuthorityFactory

protected CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory(String code)
                                                                              throws FactoryException
Deprecated. 
Returns the coordinate operation factory to use for the specified URN. If the URN contains a version string, then this method will try to fetch a factory for that particular version. The createVersionedFactory(org.geotools.util.Version) method may be invoked for that purpose. If no factory is provided for that specific version, then the default one is used.

Overrides:
getCoordinateOperationAuthorityFactory in class AuthorityFactoryAdapter
Parameters:
code - The URN given to this class.
Returns:
A factory for the specified URN (never null).
Throws:
FactoryException - if no coordinate operation factory is available.

createVersionedFactory

protected AuthorityFactory createVersionedFactory(Version version)
                                           throws FactoryException
Deprecated. 
Invoked when a factory is requested for a specific version. This method should create a factory for the exact version specified by the argument, or return null if no such factory is available. In the later case, this class will fallback on the factory specified at construction time.

Parameters:
version - The version for the factory to create.
Returns:
The factory, of null if there is none for the specified version.
Throws:
FactoryException - if an error occured while creating the factory.

toBackingFactoryCode

protected String toBackingFactoryCode(String code)
                               throws FactoryException
Deprecated. 
Removes the URN base ("urn:ogc:def") from the specified code before to pass it to the wrapped factories.

Overrides:
toBackingFactoryCode in class AuthorityFactoryAdapter
Parameters:
code - The code given to this factory.
Returns:
The code to give to the underlying factories.
Throws:
FactoryException - if the code can't be converted.


Copyright © 1996-2010 Geotools. All Rights Reserved.