|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFactory
ReferencingFactory
AbstractAuthorityFactory
AuthorityFactoryAdapter
FallbackAuthorityFactory
@ThreadSafe @Decorator(value=org.opengis.referencing.AuthorityFactory.class) 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.
| referencing/geotk-referencing (download) | View source code for this class |
AuthorityFactory interfaces.| 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 |
FallbackAuthorityFactory(AuthorityFactory primary,
AuthorityFactory fallback)
Wraps a primary and a fallback authority factories. |
| Method Summary | ||
|---|---|---|
static
|
create(Class<T> type,
Collection<T> factories)
Wraps the specified authority factories. |
|
static
|
create(Class<T> type,
T... factories)
Wraps the specified authority factories. |
|
static AuthorityFactory |
create(Collection<? extends AuthorityFactory> factories)
Wraps the specified authority factories. |
|
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. |
|
Set<String> |
getAuthorityCodes(Class<? extends IdentifiedObject> type)
Returns the set of authority codes for the specified type. |
|
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. |
|
| 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 FallbackAuthorityFactory(AuthorityFactory primary,
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, T...) | Method Detail |
|---|
public static <T extends AuthorityFactory> T create(Class<T> type,
T... factories)
throws FactoryNotFoundException,
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 argument don't contain at least one element.
ClassCastException - if type is illegal.
public static <T extends AuthorityFactory> T create(Class<T> type,
Collection<T> factories)
throws FactoryNotFoundException,
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.
ClassCastException - if type is illegal.
public static AuthorityFactory create(Collection<? extends 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.
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
throws FactoryException
getAuthorityCodes in interface AuthorityFactorygetAuthorityCodes in class AuthorityFactoryAdapterFactoryException
public InternationalString getDescriptionText(String code)
throws FactoryException
getDescriptionText in interface AuthorityFactorygetDescriptionText in class AuthorityFactoryAdapterFactoryException
public IdentifiedObject createObject(String code)
throws FactoryException
createObject in interface AuthorityFactorycreateObject in class AuthorityFactoryAdaptercode - Value allocated by authority.
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 Datum createDatum(String code)
throws FactoryException
createDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
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 EngineeringDatum createEngineeringDatum(String code)
throws FactoryException
createEngineeringDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createEngineeringCRS(java.lang.String)
public ImageDatum createImageDatum(String code)
throws FactoryException
createImageDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createImageCRS(java.lang.String)
public VerticalDatum createVerticalDatum(String code)
throws FactoryException
createVerticalDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createVerticalCRS(java.lang.String)
public TemporalDatum createTemporalDatum(String code)
throws FactoryException
createTemporalDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createTemporalCRS(java.lang.String)
public GeodeticDatum createGeodeticDatum(String code)
throws FactoryException
createGeodeticDatum in class AuthorityFactoryAdaptercode - Value allocated by authority.
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 Ellipsoid createEllipsoid(String code)
throws FactoryException
createEllipsoid in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)
public PrimeMeridian createPrimeMeridian(String code)
throws FactoryException
createPrimeMeridian in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)
public Extent createExtent(String code)
throws FactoryException
createExtent in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CoordinateSystem createCoordinateSystem(String code)
throws FactoryException
createCoordinateSystem in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CartesianCS createCartesianCS(String code)
throws FactoryException
createCartesianCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public PolarCS createPolarCS(String code)
throws FactoryException
createPolarCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CylindricalCS createCylindricalCS(String code)
throws FactoryException
createCylindricalCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public SphericalCS createSphericalCS(String code)
throws FactoryException
createSphericalCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public EllipsoidalCS createEllipsoidalCS(String code)
throws FactoryException
createEllipsoidalCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public VerticalCS createVerticalCS(String code)
throws FactoryException
createVerticalCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public TimeCS createTimeCS(String code)
throws FactoryException
createTimeCS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CoordinateSystemAxis createCoordinateSystemAxis(String code)
throws FactoryException
createCoordinateSystemAxis in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public Unit<?> createUnit(String code)
throws FactoryException
createUnit in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
throws FactoryException
createCoordinateReferenceSystem in class AuthorityFactoryAdaptercode - Value allocated by authority.
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 CompoundCRS createCompoundCRS(String code)
throws FactoryException
createCompoundCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public DerivedCRS createDerivedCRS(String code)
throws FactoryException
createDerivedCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public EngineeringCRS createEngineeringCRS(String code)
throws FactoryException
createEngineeringCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public GeographicCRS createGeographicCRS(String code)
throws FactoryException
createGeographicCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public GeocentricCRS createGeocentricCRS(String code)
throws FactoryException
createGeocentricCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public ImageCRS createImageCRS(String code)
throws FactoryException
createImageCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public ProjectedCRS createProjectedCRS(String code)
throws FactoryException
createProjectedCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public TemporalCRS createTemporalCRS(String code)
throws FactoryException
createTemporalCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public VerticalCRS createVerticalCRS(String code)
throws FactoryException
createVerticalCRS in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public ParameterDescriptor<?> createParameterDescriptor(String code)
throws FactoryException
createParameterDescriptor in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public OperationMethod createOperationMethod(String code)
throws FactoryException
createOperationMethod in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public CoordinateOperation createCoordinateOperation(String code)
throws FactoryException
createCoordinateOperation in class AuthorityFactoryAdaptercode - Value allocated by authority.
FactoryException - if the object creation failed for all factories.
public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
throws FactoryException
createFromCoordinateReferenceSystemCodes in class AuthorityFactoryAdaptersourceCRS - Coded value of source coordinate reference system.targetCRS - Coded value of target coordinate reference system.
sourceCRS to targetCRS.
FactoryException - if the object creation failed for all factories.
public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type)
throws FactoryException
getIdentifiedObjectFinder in class AuthorityFactoryAdaptertype - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||