|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFactory
ReferencingFactory
AbstractAuthorityFactory
AuthorityFactoryAdapter
@ThreadSafe @Decorator(value=org.opengis.referencing.AuthorityFactory.class) public class AuthorityFactoryAdapter
An authority factory which delegates CRS, CS or datum objects creation to some other factory implementations.
All constructors are protected because this class must be subclassed in order to determine
which of the DatumAuthorityFactory, CSAuthorityFactory and
CRSAuthorityFactory interfaces to implement.
| referencing/geotk-referencing (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Factory |
|---|
Factory.Availability, Factory.Organizer |
| Field Summary |
|---|
| Fields inherited from class AbstractAuthorityFactory |
|---|
nameFactory |
| Fields inherited from class ReferencingFactory |
|---|
LOGGER |
| Fields inherited from class Factory |
|---|
EMPTY_HINTS, hints |
| Constructor Summary | |
|---|---|
protected |
AuthorityFactoryAdapter(AuthorityFactory factory)
Creates a wrapper around the specified factory. |
protected |
AuthorityFactoryAdapter(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory operationFactory)
Creates a wrapper around the specified factories. |
protected |
AuthorityFactoryAdapter(String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority. |
| Method Summary | ||
|---|---|---|
ConformanceResult |
availability()
Returns whatever this factory is ready for use. |
|
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. |
|
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
|
getAuthorityFactory(Class<T> type,
String code)
Returns an authority factory of the specified type. |
|
protected AuthorityFactory |
getAuthorityFactory(String code)
Returns an arbitrary object factory to use for the specified code. |
|
String |
getBackingStoreDescription()
Returns a description of the underlying backing store, or null if unknown. |
|
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. |
|
Map<RenderingHints.Key,?> |
getImplementationHints()
Returns the hints used by this factory. |
|
Citation |
getVendor()
Returns the vendor responsible for creating this factory implementation. |
|
protected String |
toBackingFactoryCode(String code)
Returns the code to be given to the wrapped factories. |
|
| Methods inherited from class AbstractAuthorityFactory |
|---|
dispose, noSuchAuthorityCode, trimAuthority |
| Methods inherited from class ReferencingFactory |
|---|
ensureNonNull |
| Methods inherited from class Factory |
|---|
equals, hasCompatibleHints, hashCode, setOrdering, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AuthorityFactoryAdapter(AuthorityFactory factory)
factory - The factory to wrap.
protected AuthorityFactoryAdapter(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory operationFactory)
crsFactory - The coordinate reference system
authority factory, or null.csFactory - The coordinate system authority factory,
or null.datumFactory - The datum authority factory, or null.operationFactory - The coordinate operation authority factory,
or null.
protected AuthorityFactoryAdapter(String authority,
Hints userHints)
throws FactoryRegistryException
AuthorityFactoryFinder.
authority - The authority to wrap (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.| Method Detail |
|---|
public ConformanceResult availability()
availability in class Factorypublic Map<RenderingHints.Key,?> getImplementationHints()
getImplementationHints in class Factory
public String getBackingStoreDescription()
throws FactoryException
null if unknown.
getBackingStoreDescription in class AbstractAuthorityFactorynull.
FactoryException - if a failure occurred while fetching the engine description.public Citation getVendor()
null if the factory is not
available.
getVendor in interface FactorygetVendor in class ReferencingFactoryCitations.GEOTOOLKITpublic Citation getAuthority()
null if the factory is not
available.
getAuthority in interface AuthorityFactorygetAuthority in class AbstractAuthorityFactory
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
throws FactoryException
FactoryException
public InternationalString getDescriptionText(String code)
throws FactoryException
FactoryException
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.
public GeocentricCRS createGeocentricCRS(String code)
throws FactoryException
createGeocentricCRS in class AbstractAuthorityFactorycode - Value allocated by authority.
FactoryException - if the object creation failed.
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.
public TemporalCRS createTemporalCRS(String code)
throws FactoryException
createTemporalCRS in class AbstractAuthorityFactorycode - Value allocated by authority.
FactoryException - if the object creation failed.
public VerticalCRS createVerticalCRS(String code)
throws FactoryException
createVerticalCRS in class AbstractAuthorityFactorycode - Value allocated by authority.
FactoryException - if the object creation failed.
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 (for example the factories backed
by EPSG databases).
FactoryException - if the finder can not be created.
protected <T extends AuthorityFactory> T getAuthorityFactory(Class<T> type,
String code)
throws FactoryException
getCRSAuthorityFactory(java.lang.String) if type is
CRSAuthorityFactory.class;getCSAuthorityFactory(java.lang.String) if type is
CSAuthorityFactory.class;getDatumAuthorityFactory(java.lang.String) if type is
DatumAuthorityFactory.class;getCoordinateOperationAuthorityFactory(java.lang.String) if type is
CoordinateOperationAuthorityFactory.class;
T - The type of the authority factory to find.type - The type of the authority factory to find.code - The authority code given to a method of this class. Note that the code to be
given to the returned factory may be different.
null).
IllegalArgumentException - if the specified type is invalid.
FactoryException - if no suitable factory were found.
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 a method of 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||