|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.factory.AbstractFactory
org.geotools.referencing.factory.ReferencingFactory
org.geotools.referencing.factory.AbstractAuthorityFactory
org.geotools.referencing.factory.AuthorityFactoryAdapter
org.geotools.referencing.factory.FallbackAuthorityFactory
public class FallbackAuthorityFactory
A factory which delegates all object creation to a primary factory, and fallback on an other one if the primary factory failed.
Field Summary |
---|
Fields inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
LOGGER |
Fields inherited from class org.geotools.factory.AbstractFactory |
---|
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
---|---|
protected |
FallbackAuthorityFactory(org.opengis.referencing.AuthorityFactory primary,
org.opengis.referencing.AuthorityFactory fallback)
Wraps a primary and a fallback authority factories. |
Method Summary | ||
---|---|---|
static
|
create(java.lang.Class<T> type,
java.util.Collection<T> factories)
Wraps the specified authority factories. |
|
static org.opengis.referencing.AuthorityFactory |
create(java.util.Collection<? extends org.opengis.referencing.AuthorityFactory> factories)
Wraps the specified authority factories. |
|
org.opengis.referencing.cs.CartesianCS |
createCartesianCS(java.lang.String code)
Creates a cartesian coordinate system from a code. |
|
org.opengis.referencing.crs.CompoundCRS |
createCompoundCRS(java.lang.String code)
Creates a 3D coordinate reference system from a code. |
|
org.opengis.referencing.operation.CoordinateOperation |
createCoordinateOperation(java.lang.String code)
Creates an operation from a single operation code. |
|
org.opengis.referencing.crs.CoordinateReferenceSystem |
createCoordinateReferenceSystem(java.lang.String code)
Returns an arbitrary coordinate reference system from a code. |
|
org.opengis.referencing.cs.CoordinateSystem |
createCoordinateSystem(java.lang.String code)
Returns an arbitrary coordinate system from a code. |
|
org.opengis.referencing.cs.CoordinateSystemAxis |
createCoordinateSystemAxis(java.lang.String code)
Returns a coordinate system axis from a code. |
|
org.opengis.referencing.cs.CylindricalCS |
createCylindricalCS(java.lang.String code)
Creates a cylindrical coordinate system from a code. |
|
org.opengis.referencing.datum.Datum |
createDatum(java.lang.String code)
Returns an arbitrary datum from a code. |
|
org.opengis.referencing.crs.DerivedCRS |
createDerivedCRS(java.lang.String code)
Creates a derived coordinate reference system from a code. |
|
org.opengis.referencing.datum.Ellipsoid |
createEllipsoid(java.lang.String code)
Returns an ellipsoid from a code. |
|
org.opengis.referencing.cs.EllipsoidalCS |
createEllipsoidalCS(java.lang.String code)
Creates an ellipsoidal coordinate system from a code. |
|
org.opengis.referencing.crs.EngineeringCRS |
createEngineeringCRS(java.lang.String code)
Creates a engineering coordinate reference system from a code. |
|
org.opengis.referencing.datum.EngineeringDatum |
createEngineeringDatum(java.lang.String code)
Creates a engineering datum from a code. |
|
org.opengis.metadata.extent.Extent |
createExtent(java.lang.String code)
Returns a extent (usually an area of validity) from a code. |
|
java.util.Set<org.opengis.referencing.operation.CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(java.lang.String sourceCRS,
java.lang.String targetCRS)
Creates an operation from coordinate reference system codes. |
|
org.opengis.referencing.crs.GeocentricCRS |
createGeocentricCRS(java.lang.String code)
Returns a geocentric coordinate reference system from a code. |
|
org.opengis.referencing.datum.GeodeticDatum |
createGeodeticDatum(java.lang.String code)
Returns a geodetic datum from a code. |
|
org.opengis.referencing.crs.GeographicCRS |
createGeographicCRS(java.lang.String code)
Returns a geographic coordinate reference system from a code. |
|
org.opengis.referencing.crs.ImageCRS |
createImageCRS(java.lang.String code)
Creates a image coordinate reference system from a code. |
|
org.opengis.referencing.datum.ImageDatum |
createImageDatum(java.lang.String code)
Creates a image datum from a code. |
|
org.opengis.referencing.IdentifiedObject |
createObject(java.lang.String code)
Returns an arbitrary object from a code. |
|
org.opengis.referencing.operation.OperationMethod |
createOperationMethod(java.lang.String code)
Creates an operation method from a code. |
|
org.opengis.parameter.ParameterDescriptor |
createParameterDescriptor(java.lang.String code)
Creates a parameter descriptor from a code. |
|
org.opengis.referencing.cs.PolarCS |
createPolarCS(java.lang.String code)
Creates a polar coordinate system from a code. |
|
org.opengis.referencing.datum.PrimeMeridian |
createPrimeMeridian(java.lang.String code)
Returns a prime meridian from a code. |
|
org.opengis.referencing.crs.ProjectedCRS |
createProjectedCRS(java.lang.String code)
Returns a projected coordinate reference system from a code. |
|
org.opengis.referencing.cs.SphericalCS |
createSphericalCS(java.lang.String code)
Creates a spherical coordinate system from a code. |
|
org.opengis.referencing.crs.TemporalCRS |
createTemporalCRS(java.lang.String code)
Creates a temporal coordinate reference system from a code. |
|
org.opengis.referencing.datum.TemporalDatum |
createTemporalDatum(java.lang.String code)
Creates a temporal datum from a code. |
|
org.opengis.referencing.cs.TimeCS |
createTimeCS(java.lang.String code)
Creates a temporal coordinate system from a code. |
|
javax.measure.unit.Unit<?> |
createUnit(java.lang.String code)
Returns an unit from a code. |
|
org.opengis.referencing.crs.VerticalCRS |
createVerticalCRS(java.lang.String code)
Creates a vertical coordinate reference system from a code. |
|
org.opengis.referencing.cs.VerticalCS |
createVerticalCS(java.lang.String code)
Creates a vertical coordinate system from a code. |
|
org.opengis.referencing.datum.VerticalDatum |
createVerticalDatum(java.lang.String code)
Creates a vertical datum from a code. |
|
java.util.Set<java.lang.String> |
getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
Returns the set of authority codes for the specified type. |
|
org.opengis.util.InternationalString |
getDescriptionText(java.lang.String code)
Returns a description for the object identified by the specified code. |
|
IdentifiedObjectFinder |
getIdentifiedObjectFinder(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
Returns a finder which can be used for looking up unidentified objects. |
Methods inherited from class org.geotools.referencing.factory.AuthorityFactoryAdapter |
---|
dispose, getAuthority, getAuthorityFactory, getBackingStoreDescription, getCoordinateOperationAuthorityFactory, getCRSAuthorityFactory, getCSAuthorityFactory, getDatumAuthorityFactory, getVendor, isAvailable, toBackingFactoryCode |
Methods inherited from class org.geotools.referencing.factory.AbstractAuthorityFactory |
---|
noSuchAuthorityCode, trimAuthority |
Methods inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
ensureNonNull |
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.geotools.factory.Factory |
---|
getImplementationHints |
Constructor Detail |
---|
protected FallbackAuthorityFactory(org.opengis.referencing.AuthorityFactory primary, org.opengis.referencing.AuthorityFactory fallback)
This constructor is protected because subclasses must declare which of the
DatumAuthorityFactory
, CSAuthorityFactory
, CRSAuthorityFactory
and CoordinateOperationAuthorityFactory
interfaces they choose to implement.
primary
- The primary factory.fallback
- The factory to use as a fallback if the primary factory failed.create(java.lang.Class, java.util.Collection)
Method Detail |
---|
public static <T extends org.opengis.referencing.AuthorityFactory> T create(java.lang.Class<T> type, java.util.Collection<T> factories) throws FactoryNotFoundException, java.lang.ClassCastException
FallbackAuthorityFactory
instances is created.
T
- The interface to implement.type
- The interface to implement. Should be one of DatumAuthorityFactory
,
CSAuthorityFactory
, CRSAuthorityFactory
or
CoordinateOperationAuthorityFactory
.factories
- The factories to wrap, in iteration order.
FactoryNotFoundException
- if the collection doesn't contains at least one element.
java.lang.ClassCastException
- if type
is illegal.
FactoryNotFoundException
public static org.opengis.referencing.AuthorityFactory create(java.util.Collection<? extends org.opengis.referencing.AuthorityFactory> factories) throws FactoryNotFoundException
FallbackAuthorityFactory
instances is created. The
type is inferred from the factories found in the collection.
Consider using create(type, factories)
instead when the type is known at compile time.
factories
- The factories to wrap, in iteration order.
FactoryNotFoundException
- if the collection doesn't contains at least one element.
FactoryNotFoundException
public java.util.Set<java.lang.String> getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.referencing.FactoryException
getAuthorityCodes
in interface org.opengis.referencing.AuthorityFactory
getAuthorityCodes
in class AuthorityFactoryAdapter
org.opengis.referencing.FactoryException
public org.opengis.util.InternationalString getDescriptionText(java.lang.String code) throws org.opengis.referencing.FactoryException
getDescriptionText
in interface org.opengis.referencing.AuthorityFactory
getDescriptionText
in class AuthorityFactoryAdapter
org.opengis.referencing.FactoryException
public org.opengis.referencing.IdentifiedObject createObject(java.lang.String code) throws org.opengis.referencing.FactoryException
createObject
in interface org.opengis.referencing.AuthorityFactory
createObject
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed.AuthorityFactoryAdapter.createCoordinateReferenceSystem(java.lang.String)
,
AuthorityFactoryAdapter.createDatum(java.lang.String)
,
AuthorityFactoryAdapter.createEllipsoid(java.lang.String)
,
AuthorityFactoryAdapter.createUnit(java.lang.String)
public org.opengis.referencing.datum.Datum createDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)
,
AuthorityFactoryAdapter.createVerticalDatum(java.lang.String)
,
AuthorityFactoryAdapter.createTemporalDatum(java.lang.String)
public org.opengis.referencing.datum.EngineeringDatum createEngineeringDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createEngineeringDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createEngineeringCRS(java.lang.String)
public org.opengis.referencing.datum.ImageDatum createImageDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createImageDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createImageCRS(java.lang.String)
public org.opengis.referencing.datum.VerticalDatum createVerticalDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createVerticalDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createVerticalCRS(java.lang.String)
public org.opengis.referencing.datum.TemporalDatum createTemporalDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createTemporalDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createTemporalCRS(java.lang.String)
public org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(java.lang.String code) throws org.opengis.referencing.FactoryException
createGeodeticDatum
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createEllipsoid(java.lang.String)
,
AuthorityFactoryAdapter.createPrimeMeridian(java.lang.String)
,
AuthorityFactoryAdapter.createGeographicCRS(java.lang.String)
,
AuthorityFactoryAdapter.createProjectedCRS(java.lang.String)
public org.opengis.referencing.datum.Ellipsoid createEllipsoid(java.lang.String code) throws org.opengis.referencing.FactoryException
createEllipsoid
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)
public org.opengis.referencing.datum.PrimeMeridian createPrimeMeridian(java.lang.String code) throws org.opengis.referencing.FactoryException
createPrimeMeridian
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)
public org.opengis.metadata.extent.Extent createExtent(java.lang.String code) throws org.opengis.referencing.FactoryException
createExtent
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(java.lang.String code) throws org.opengis.referencing.FactoryException
createCoordinateSystem
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.CartesianCS createCartesianCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createCartesianCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.PolarCS createPolarCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createPolarCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.CylindricalCS createCylindricalCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createCylindricalCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.SphericalCS createSphericalCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createSphericalCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.EllipsoidalCS createEllipsoidalCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createEllipsoidalCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.VerticalCS createVerticalCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createVerticalCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.TimeCS createTimeCS(java.lang.String code) throws org.opengis.referencing.FactoryException
createTimeCS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.cs.CoordinateSystemAxis createCoordinateSystemAxis(java.lang.String code) throws org.opengis.referencing.FactoryException
createCoordinateSystemAxis
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public javax.measure.unit.Unit<?> createUnit(java.lang.String code) throws org.opengis.referencing.FactoryException
createUnit
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(java.lang.String code) throws org.opengis.referencing.FactoryException
createCoordinateReferenceSystem
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AuthorityFactoryAdapter.createGeographicCRS(java.lang.String)
,
AuthorityFactoryAdapter.createProjectedCRS(java.lang.String)
,
AuthorityFactoryAdapter.createVerticalCRS(java.lang.String)
,
AuthorityFactoryAdapter.createTemporalCRS(java.lang.String)
,
AuthorityFactoryAdapter.createCompoundCRS(java.lang.String)
public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createCompoundCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createDerivedCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createEngineeringCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createGeographicCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)
public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createGeocentricCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)
public org.opengis.referencing.crs.ImageCRS createImageCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createImageCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createProjectedCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)
public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createTemporalCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AbstractAuthorityFactory.createTemporalDatum(java.lang.String)
public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(java.lang.String code) throws org.opengis.referencing.FactoryException
createVerticalCRS
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.AbstractAuthorityFactory.createVerticalDatum(java.lang.String)
public org.opengis.parameter.ParameterDescriptor createParameterDescriptor(java.lang.String code) throws org.opengis.referencing.FactoryException
createParameterDescriptor
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.operation.OperationMethod createOperationMethod(java.lang.String code) throws org.opengis.referencing.FactoryException
createOperationMethod
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public org.opengis.referencing.operation.CoordinateOperation createCoordinateOperation(java.lang.String code) throws org.opengis.referencing.FactoryException
createCoordinateOperation
in class AuthorityFactoryAdapter
code
- Value allocated by authority.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public java.util.Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(java.lang.String sourceCRS, java.lang.String targetCRS) throws org.opengis.referencing.FactoryException
createFromCoordinateReferenceSystemCodes
in class AuthorityFactoryAdapter
sourceCRS
- Coded value of source coordinate reference system.targetCRS
- Coded value of target coordinate reference system.
sourceCRS
to targetCRS
.
org.opengis.referencing.FactoryException
- if the object creation failed for all factories.public IdentifiedObjectFinder getIdentifiedObjectFinder(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.referencing.FactoryException
getIdentifiedObjectFinder
in class AuthorityFactoryAdapter
type
- 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.
org.opengis.referencing.FactoryException
- if the object creation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |