|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractFactory
ReferencingFactory
AbstractAuthorityFactory
AuthorityFactoryAdapter
TransformedAuthorityFactory
public class TransformedAuthorityFactory
An authority factory which returns modified CRS,
CS or datum objects from other factory
implementations. This class provides a set of replace(...) methods to be overridden
by subclasses in order to replace some CRS,
CS or datum objects by other ones.
The replacement rules are determined by the subclass being used. For example the
OrderedAxisAuthorityFactory subclass can replace
coordinate systems using (latitude,
longitude) axis order by coordinate systems using (longitude,
latitude) axis order.
All constructors are protected because this class must be subclassed in order to
determine which of the DatumAuthorityFactory, CSAuthorityFactory
and CRSAuthorityFactory interfaces to implement.
| Field Summary |
|---|
| Fields inherited from class ReferencingFactory |
|---|
LOGGER |
| Fields inherited from class AbstractFactory |
|---|
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
| Constructor Summary | |
|---|---|
protected |
TransformedAuthorityFactory(AuthorityFactory factory)
Creates a wrapper around the specified factory. |
protected |
TransformedAuthorityFactory(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory opFactory)
Creates a wrapper around the specified factories. |
protected |
TransformedAuthorityFactory(String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority. |
| Method Summary | |
|---|---|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCode,
String targetCode)
Creates an operation from coordinate reference system codes. |
void |
dispose()
Releases resources immediately instead of waiting for the garbage collector. |
int |
getPriority()
Returns the priority for this factory. |
protected AxisDirection |
replace(AxisDirection direction)
Replaces the specified direction, if applicable. |
protected CoordinateOperation |
replace(CoordinateOperation operation)
Replaces (if needed) the specified coordinate operation. |
protected CoordinateReferenceSystem |
replace(CoordinateReferenceSystem crs)
Replaces (if needed) the specified coordinate reference system. |
protected CoordinateSystem |
replace(CoordinateSystem cs)
Replaces (if needed) the specified coordinate system by a new one. |
protected CoordinateSystemAxis |
replace(CoordinateSystemAxis axis)
Replaces (if needed) the specified axis by a new one. |
protected Datum |
replace(Datum datum)
Replaces (if needed) the specified datum by a new one. |
protected Unit<?> |
replace(Unit<?> units)
Replaces the specified unit, if applicable. |
| Methods inherited from class AbstractAuthorityFactory |
|---|
noSuchAuthorityCode, trimAuthority |
| Methods inherited from class ReferencingFactory |
|---|
ensureNonNull |
| Methods inherited from class AbstractFactory |
|---|
addImplementationHints, equals, getImplementationHints, hashCode, onDeregistration, onRegistration, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Factory |
|---|
getImplementationHints |
| Constructor Detail |
|---|
protected TransformedAuthorityFactory(AuthorityFactory factory)
factory - The factory to wrap.
protected TransformedAuthorityFactory(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory opFactory)
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 TransformedAuthorityFactory(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.| Method Detail |
|---|
public int getPriority()
ReferencingFactoryFinder for selecting a preferred factory when many are
found for the same service. The default implementation returns
priority + 1, which implies that
this adapter has precedence over the wrapped factories. Subclasses should
override this method if they want a different priority order for this
instance.
getPriority in class AbstractFactory
protected Unit<?> replace(Unit<?> units)
throws FactoryException
replace(CoordinateSystem) method. The
default implementation returns the unit unchanged.
units - The units to replace.
units if no change were needed.
FactoryException - if an error occured while creating the new units.
protected AxisDirection replace(AxisDirection direction)
throws FactoryException
replace(CoordinateSystem) method. The
default implementation returns the axis direction unchanged.
direction - The axis direction to replace.
direction if no change were needed.
FactoryException - if an error occured while creating the new axis direction.
protected CoordinateSystemAxis replace(CoordinateSystemAxis axis)
throws FactoryException
replace(Unit) and
replace(AxisDirection).
axis - The coordinate system axis to replace.
axis if no change were needed.
FactoryException - if an error occured while creating the new coordinate system axis.
protected CoordinateSystem replace(CoordinateSystem cs)
throws FactoryException
replace
for each axis. In addition, axis are sorted if this factory implements the
Comparator interface.
cs - The coordinate system to replace.
cs if no change were needed.
FactoryException - if an error occured while creating the new coordinate system.
protected Datum replace(Datum datum)
throws FactoryException
datum - The datum to replace.
datum if no change were needed.
FactoryException - if an error occured while creating the new datum.
protected CoordinateReferenceSystem replace(CoordinateReferenceSystem crs)
throws FactoryException
crs - The coordinate reference system to replace.
crs if no change were needed.
FactoryException - if an error occured while creating the new CRS object.
protected CoordinateOperation replace(CoordinateOperation operation)
throws FactoryException
operation - The coordinate operation to replace.
operation if no change were needed.
FactoryException - if an error occured while creating the new operation object.
public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCode,
String targetCode)
throws FactoryException
replace for each
operations.
createFromCoordinateReferenceSystemCodes in class AuthorityFactoryAdaptersourceCode - Coded value of source coordinate reference system.targetCode - Coded value of target coordinate reference system.
sourceCRS to targetCRS.
FactoryException - if the object creation failed.
public void dispose()
throws FactoryException
crsFactory), because they may
still in use by other classes.
dispose in class AuthorityFactoryAdapterFactoryException - if an error occured while disposing the factory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||