public class AuthorityFactoryAdapter extends AbstractAuthorityFactory implements OptionalFactory
All constructors are protected because this class must be subclassed in order to determine
which of the DatumAuthorityFactory, CSAuthorityFactory and CRSAuthorityFactory interfaces to implement.
LOGGERhints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority| Modifier | Constructor and Description |
|---|---|
protected |
AuthorityFactoryAdapter(AuthorityFactory factory)
Creates a wrapper around the specified factory.
|
protected |
AuthorityFactoryAdapter(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory opFactory)
Creates a wrapper around the specified factories.
|
protected |
AuthorityFactoryAdapter(String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority.
|
| Modifier and Type | Method and Description |
|---|---|
CartesianCS |
createCartesianCS(String code)
Creates a cartesian coordinate system from a code.
|
CompoundCRS |
createCompoundCRS(String code)
Creates a 3D coordinate reference system from a code.
|
CoordinateOperation |
createCoordinateOperation(String code)
Creates an operation from a single operation code.
|
CoordinateReferenceSystem |
createCoordinateReferenceSystem(String code)
Returns an arbitrary coordinate reference system from
a code.
|
CoordinateSystem |
createCoordinateSystem(String code)
Returns an arbitrary coordinate system from a code.
|
CoordinateSystemAxis |
createCoordinateSystemAxis(String code)
Returns a coordinate system axis from a code.
|
CylindricalCS |
createCylindricalCS(String code)
Creates a cylindrical coordinate system from a code.
|
Datum |
createDatum(String code)
Returns an arbitrary datum from a code.
|
DerivedCRS |
createDerivedCRS(String code)
Creates a derived coordinate reference system from a code.
|
Ellipsoid |
createEllipsoid(String code)
Returns an ellipsoid from a code.
|
EllipsoidalCS |
createEllipsoidalCS(String code)
Creates an ellipsoidal coordinate system from a code.
|
EngineeringCRS |
createEngineeringCRS(String code)
Creates a engineering coordinate reference system from a code.
|
EngineeringDatum |
createEngineeringDatum(String code)
Creates a engineering datum from a code.
|
Extent |
createExtent(String code)
Returns a extent (usually an area of validity) from a code.
|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
Creates an operation from coordinate reference system codes.
|
GeocentricCRS |
createGeocentricCRS(String code)
Returns a geocentric coordinate reference system from a code.
|
GeodeticDatum |
createGeodeticDatum(String code)
Returns a geodetic datum from a code.
|
GeographicCRS |
createGeographicCRS(String code)
Returns a geographic coordinate reference system from a code.
|
ImageCRS |
createImageCRS(String code)
Creates a image coordinate reference system from a code.
|
ImageDatum |
createImageDatum(String code)
Creates a image datum from a code.
|
IdentifiedObject |
createObject(String code)
Returns an arbitrary object from a code.
|
OperationMethod |
createOperationMethod(String code)
Creates an operation method from a code.
|
ParameterDescriptor |
createParameterDescriptor(String code)
Creates a parameter descriptor from a code.
|
PolarCS |
createPolarCS(String code)
Creates a polar coordinate system from a code.
|
PrimeMeridian |
createPrimeMeridian(String code)
Returns a prime meridian from a code.
|
ProjectedCRS |
createProjectedCRS(String code)
Returns a projected coordinate reference system from a code.
|
SphericalCS |
createSphericalCS(String code)
Creates a spherical coordinate system from a code.
|
TemporalCRS |
createTemporalCRS(String code)
Creates a temporal coordinate reference system from a code.
|
TemporalDatum |
createTemporalDatum(String code)
Creates a temporal datum from a code.
|
TimeCS |
createTimeCS(String code)
Creates a temporal coordinate system from a code.
|
Unit<?> |
createUnit(String code)
Returns an unit from a code.
|
VerticalCRS |
createVerticalCRS(String code)
Creates a vertical coordinate reference system from a code.
|
VerticalCS |
createVerticalCS(String code)
Creates a vertical coordinate system from a code.
|
VerticalDatum |
createVerticalDatum(String code)
Creates a vertical datum from a code.
|
void |
dispose()
Releases resources immediately instead of waiting for the garbage collector.
|
Citation |
getAuthority()
Returns the organization or party responsible for definition and maintenance of the database.
|
Set<String> |
getAuthorityCodes(Class<? extends IdentifiedObject> type)
Returns the set of authority code for the specified type.
|
protected AuthorityFactory |
getAuthorityFactory(String code)
Returns a generic object factory to use for the specified code.
|
String |
getBackingStoreDescription()
Returns a description of the underlying backing store, or
null if unknow. |
protected CoordinateOperationAuthorityFactory |
getCoordinateOperationAuthorityFactory(String code)
Returns the coordinate operation factory to use for the specified code.
|
protected CRSAuthorityFactory |
getCRSAuthorityFactory(String code)
Returns the coordinate reference system factory to use for the specified code.
|
protected CSAuthorityFactory |
getCSAuthorityFactory(String code)
Returns the coordinate system factory to use for the specified code.
|
protected DatumAuthorityFactory |
getDatumAuthorityFactory(String code)
Returns the datum factory to use for the specified code.
|
InternationalString |
getDescriptionText(String code)
Returns a description for the object identified by the specified code.
|
IdentifiedObjectFinder |
getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type)
Returns a finder which can be used for looking up unidentified objects.
|
Citation |
getVendor()
Returns the vendor responsible for creating this factory implementation.
|
boolean |
isAvailable()
Returns
true if this factory is ready for use. |
protected String |
toBackingFactoryCode(String code)
Returns the code to be given to the wrapped factories.
|
noSuchAuthorityCode, trimAuthorityensureNonNulladdImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toStringgetImplementationHintsprotected AuthorityFactoryAdapter(AuthorityFactory factory)
priority field will be
set to the same value than the specified factory. Subclasses should override the getPriority() method if they want to set a higher or lower priority for this
instance.factory - The factory to wrap.protected AuthorityFactoryAdapter(CRSAuthorityFactory crsFactory, CSAuthorityFactory csFactory, DatumAuthorityFactory datumFactory, CoordinateOperationAuthorityFactory opFactory)
priority field will
be set to the highest priority found in the specified factories. Subclasses should override
the getPriority() method if they want to set a higher or lower
priority for this instance.crsFactory - The coordinate reference system
authority factory, or null.csFactory - The coordinate system authority factory, or
null.datumFactory - The datum authority factory, or null.opFactory - The coordinate operation authority factory,
or null.protected AuthorityFactoryAdapter(String authority, Hints userHints) throws FactoryRegistryException
ReferencingFactoryFinder.authority - The authority to wraps (example: "EPSG"). If null, then all
authority factories must be explicitly specified in the set of hints.userHints - An optional set of hints, or null if none.FactoryRegistryException - if at least one factory can not be obtained.public boolean isAvailable()
true if this factory is ready for use. This default implementation checks the
availability of CRS, CS, datum and operation authority factories specified at construction
time.isAvailable in interface OptionalFactorytrue if this factory is ready for use.public String getBackingStoreDescription() throws FactoryException
null if unknow.getBackingStoreDescription in class AbstractAuthorityFactorynull.FactoryException - if a failure occured while fetching the engine description.public Citation getVendor()
getVendor in class ReferencingFactorypublic Citation getAuthority()
getAuthority in interface AuthorityFactorygetAuthority in class AbstractAuthorityFactorypublic Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException
getAuthorityCodes in interface AuthorityFactorytype - The spatial reference objects type.FactoryException - if access to the underlying database failed.public InternationalString getDescriptionText(String code) throws FactoryException
getDescriptionText in interface AuthorityFactorycode - Value allocated by authority.null if the object corresponding to the
specified code has no description.NoSuchAuthorityCodeException - if the specified code was not found.FactoryException - if the query failed for some other reason.public IdentifiedObject createObject(String code) throws FactoryException
createObject in interface AuthorityFactorycreateObject in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createCoordinateReferenceSystem(java.lang.String),
createDatum(java.lang.String),
createEllipsoid(java.lang.String),
createUnit(java.lang.String)public Datum createDatum(String code) throws FactoryException
createDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createGeodeticDatum(java.lang.String),
createVerticalDatum(java.lang.String),
createTemporalDatum(java.lang.String)public EngineeringDatum createEngineeringDatum(String code) throws FactoryException
createEngineeringDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createEngineeringCRS(java.lang.String)public ImageDatum createImageDatum(String code) throws FactoryException
createImageDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createImageCRS(java.lang.String)public VerticalDatum createVerticalDatum(String code) throws FactoryException
createVerticalDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createVerticalCRS(java.lang.String)public TemporalDatum createTemporalDatum(String code) throws FactoryException
createTemporalDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createTemporalCRS(java.lang.String)public GeodeticDatum createGeodeticDatum(String code) throws FactoryException
createGeodeticDatum in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createEllipsoid(java.lang.String),
createPrimeMeridian(java.lang.String),
createGeographicCRS(java.lang.String),
createProjectedCRS(java.lang.String)public Ellipsoid createEllipsoid(String code) throws FactoryException
createEllipsoid in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createGeodeticDatum(java.lang.String)public PrimeMeridian createPrimeMeridian(String code) throws FactoryException
createPrimeMeridian in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createGeodeticDatum(java.lang.String)public Extent createExtent(String code) throws FactoryException
createExtent in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CoordinateSystem createCoordinateSystem(String code) throws FactoryException
createCoordinateSystem in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CartesianCS createCartesianCS(String code) throws FactoryException
createCartesianCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public PolarCS createPolarCS(String code) throws FactoryException
createPolarCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CylindricalCS createCylindricalCS(String code) throws FactoryException
createCylindricalCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public SphericalCS createSphericalCS(String code) throws FactoryException
createSphericalCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public EllipsoidalCS createEllipsoidalCS(String code) throws FactoryException
createEllipsoidalCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public VerticalCS createVerticalCS(String code) throws FactoryException
createVerticalCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public TimeCS createTimeCS(String code) throws FactoryException
createTimeCS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CoordinateSystemAxis createCoordinateSystemAxis(String code) throws FactoryException
createCoordinateSystemAxis in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public Unit<?> createUnit(String code) throws FactoryException
createUnit in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException
createCoordinateReferenceSystem in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.createGeographicCRS(java.lang.String),
createProjectedCRS(java.lang.String),
createVerticalCRS(java.lang.String),
createTemporalCRS(java.lang.String),
createCompoundCRS(java.lang.String)public CompoundCRS createCompoundCRS(String code) throws FactoryException
createCompoundCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public DerivedCRS createDerivedCRS(String code) throws FactoryException
createDerivedCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public EngineeringCRS createEngineeringCRS(String code) throws FactoryException
createEngineeringCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public GeographicCRS createGeographicCRS(String code) throws FactoryException
createGeographicCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)public GeocentricCRS createGeocentricCRS(String code) throws FactoryException
createGeocentricCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)public ImageCRS createImageCRS(String code) throws FactoryException
createImageCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public ProjectedCRS createProjectedCRS(String code) throws FactoryException
createProjectedCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)public TemporalCRS createTemporalCRS(String code) throws FactoryException
createTemporalCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.AbstractAuthorityFactory.createTemporalDatum(java.lang.String)public VerticalCRS createVerticalCRS(String code) throws FactoryException
createVerticalCRS in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.AbstractAuthorityFactory.createVerticalDatum(java.lang.String)public ParameterDescriptor createParameterDescriptor(String code) throws FactoryException
createParameterDescriptor in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public OperationMethod createOperationMethod(String code) throws FactoryException
createOperationMethod in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public CoordinateOperation createCoordinateOperation(String code) throws FactoryException
createCoordinateOperation in class AbstractAuthorityFactorycode - Value allocated by authority.FactoryException - if the object creation failed.public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws FactoryException
createFromCoordinateReferenceSystemCodes in class AbstractAuthorityFactorysourceCRS - Coded value of source coordinate reference system.targetCRS - Coded value of target coordinate reference system.sourceCRS to targetCRS.FactoryException - if the object creation failed.public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException
getIdentifiedObjectFinder in class AbstractAuthorityFactorytype - The type of objects to look for. Should be a GeoAPI interface like GeographicCRS.class, but this method accepts also implementation class. If the type is
unknown, use IdentifiedObject.class. A more accurate type may help to speed up
the search, since it reduces the amount of tables to scan in some implementations like
the factories backed by EPSG database.FactoryException - if the object creation failed.protected AuthorityFactory getAuthorityFactory(String code) throws FactoryException
Note: The value of the code argument given to this method may be
null when a factory is needed for some global task, like getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject>)
method execution.
code - The authority code given to this class. Note that the code to be given to the
returned factory may be different.null).FactoryException - if no suitable factory were found.protected DatumAuthorityFactory getDatumAuthorityFactory(String code) throws FactoryException
code - The authority code given to this class. Note that the code to be given to the
returned factory may be different.null).FactoryException - if no datum factory were specified at construction time.protected CSAuthorityFactory getCSAuthorityFactory(String code) throws FactoryException
code - The authority code given to this class. Note that the code to be given to the
returned factory may be different.null).FactoryException - if no coordinate system factory were specified at construction time.protected CRSAuthorityFactory getCRSAuthorityFactory(String code) throws FactoryException
code - The authority code given to this class. Note that the code to be given to the
returned factory may be different.null).FactoryException - if no coordinate reference system factory were specified at
construction time.protected CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory(String code) throws FactoryException
code - The authority code given to this class. Note that the code to be given to the
returned factory may be different.null).FactoryException - if no coordinate operation factory were specified at construction
time.protected String toBackingFactoryCode(String code) throws FactoryException
create methods before to forward the code to the CRS, CS, datum or operation factory. The
default implementation returns the code unchanged.code - The code given to this factory.FactoryException - if the code can't be converted.public void dispose()
throws FactoryException
AbstractAuthorityFactorycreate(...) invocations may throw a FactoryException. Disposing a previously-disposed factory, however, has no effect.dispose in class AbstractAuthorityFactoryFactoryException - if an error occured while disposing the factory.Copyright © 1996–2019 Geotools. All rights reserved.