Package org.geotools.referencing.factory
Class Abstract_URI_AuthorityFactory
Object
AbstractFactory
ReferencingFactory
AbstractAuthorityFactory
AuthorityFactoryAdapter
Abstract_URI_AuthorityFactory
- All Implemented Interfaces:
AuthorityFactory
,CRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
,Factory
,CoordinateOperationAuthorityFactory
,Factory
,OptionalFactory
,RegistrableFactory
- Direct Known Subclasses:
HTTP_URI_AuthorityFactory
,URN_AuthorityFactory
public abstract class Abstract_URI_AuthorityFactory
extends AuthorityFactoryAdapter
implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory
Base class for building OGC URN and HTTP URI wrappers around
AllAuthoritiesFactory
.- Author:
- Justin Deoliveira, Martin Desruisseaux, Ben Caradoc-Davies (CSIRO Earth Science and Resource Engineering)
-
Field Summary
Fields inherited from class ReferencingFactory
LOGGER
Fields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
-
Constructor Summary
ConstructorsConstructorDescriptionAbstract_URI_AuthorityFactory
(String hintsAuthority) Creates a default wrapperCreates a wrapper around the specified factory.Abstract_URI_AuthorityFactory
(Hints userHints, String hintsAuthority) Creates a wrapper using the specified hints. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract URI_Parser
buildParser
(String code) Subclasses must implement this method to return a subclass of URI_Parser appropriate to their URI.protected AuthorityFactory
createVersionedFactory
(Version version) Invoked when a factory is requested for a specific version.abstract Citation
Returns the organization or party responsible for definition and maintenance of the database.protected AuthorityFactory
getAuthorityFactory
(String code) Returns an object factory for the specified code.protected CoordinateOperationAuthorityFactory
Returns the coordinate operation factory to use for the specified URI.protected CRSAuthorityFactory
getCRSAuthorityFactory
(String code) Returns the coordinate reference system factory to use for the specified URI.protected CSAuthorityFactory
getCSAuthorityFactory
(String code) Returns the coordinate system factory to use for the specified URI.protected DatumAuthorityFactory
Returns the datum factory to use for the specified URI.protected String
toBackingFactoryCode
(String code) Returns a simple authority code (like "EPSG:4236") that can be passed 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, notifySuccess
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 interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
Methods inherited from interface CoordinateOperationAuthorityFactory
createCoordinateOperation, createFromCoordinateReferenceSystemCodes
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createCoordinateReferenceSystem, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
Methods inherited from interface CSAuthorityFactory
createCartesianCS, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createEllipsoidalCS, createPolarCS, createSphericalCS, createTimeCS, createUnit, createVerticalCS
Methods inherited from interface DatumAuthorityFactory
createDatum, createEllipsoid, createEngineeringDatum, createGeodeticDatum, createImageDatum, createPrimeMeridian, createTemporalDatum, createVerticalDatum
Methods inherited from interface Factory
getImplementationHints
-
Constructor Details
-
Abstract_URI_AuthorityFactory
Creates a default wrapper- Parameters:
hintsAuthority
- the name used to reference thi factory inHints.FORCE_AXIS_ORDER_HONORING
.
-
Abstract_URI_AuthorityFactory
Creates a wrapper using the specified hints. For strict compliance with OGC definitions, the supplied hints should contains at least theFORCE_LONGITUDE_FIRST_AXIS_ORDER
hint with valueFALSE
.- Parameters:
userHints
- The hints to be given to backing factories.hintsAuthority
- the name used to reference thi factory inHints.FORCE_AXIS_ORDER_HONORING
.
-
Abstract_URI_AuthorityFactory
Creates a wrapper around the specified factory. The supplied factory is given unchanged to the super class constructor.
-
-
Method Details
-
buildParser
Subclasses must implement this method to return a subclass of URI_Parser appropriate to their URI.- Parameters:
code
- the URI to be parsed- Throws:
NoSuchAuthorityCodeException
-
getAuthority
Description copied from class:AuthorityFactoryAdapter
Returns the organization or party responsible for definition and maintenance of the database.- Specified by:
getAuthority
in interfaceAuthorityFactory
- Overrides:
getAuthority
in classAuthorityFactoryAdapter
- Returns:
- The organization reponsible for definition of the database.
- See Also:
-
getAuthorityFactory
Returns an object factory for the specified code. This method invokes one of theget
TypeAuthorityFactory
methods where Type is inferred from the code.- Overrides:
getAuthorityFactory
in classAuthorityFactoryAdapter
- 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
Returns the datum factory to use for the specified URI. If the URI contains a version string, then this method will try to fetch a factory for that particular version. ThecreateVersionedFactory(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 classAuthorityFactoryAdapter
- Parameters:
code
- The URI given to this class.- Returns:
- A factory for the specified URI (never
null
). - Throws:
FactoryException
- if no datum factory is available.
-
getCSAuthorityFactory
Returns the coordinate system factory to use for the specified URI. If the URI contains a version string, then this method will try to fetch a factory for that particular version. ThecreateVersionedFactory(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 classAuthorityFactoryAdapter
- Parameters:
code
- The URI given to this class.- Returns:
- A factory for the specified URI (never
null
). - Throws:
FactoryException
- if no coordinate system factory is available.
-
getCRSAuthorityFactory
Returns the coordinate reference system factory to use for the specified URI. If the URI contains a version string, then this method will try to fetch a factory for that particular version. ThecreateVersionedFactory(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 classAuthorityFactoryAdapter
- Parameters:
code
- The URI given to this class.- Returns:
- A factory for the specified URI (never
null
). - Throws:
FactoryException
- if no coordinate reference system factory is available.
-
getCoordinateOperationAuthorityFactory
protected CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory(String code) throws FactoryException Returns the coordinate operation factory to use for the specified URI. If the URI contains a version string, then this method will try to fetch a factory for that particular version. ThecreateVersionedFactory(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 classAuthorityFactoryAdapter
- Parameters:
code
- The URI given to this class.- Returns:
- A factory for the specified URI (never
null
). - Throws:
FactoryException
- if no coordinate operation factory is available.
-
createVersionedFactory
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 returnnull
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 occurred while creating the factory.
-
toBackingFactoryCode
Returns a simple authority code (like "EPSG:4236") that can be passed to the wrapped factories.- Overrides:
toBackingFactoryCode
in classAuthorityFactoryAdapter
- 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.
-