org.deegree_impl.model.cs
Class Adapters

java.lang.Object
  extended byorg.deegree_impl.model.cs.Adapters

public class Adapters
extends java.lang.Object

Provide methods for interoperability with org.opengis.cs package. All methods accept null argument. All OpenGIS objects are suitable for RMI use.

Version:
1.0
Author:
Martin Desruisseaux

Field Summary
private static Adapters DEFAULT
          Default adapters.
 Adapters PT
          The underlying adapters for the org.deegree_impl.model.pt package.
 
Constructor Summary
protected Adapters()
           
protected Adapters(Adapters PT)
          Default constructor.
 
Method Summary
private static void checkDimension(CS_CoordinateSystem cs, int expected)
          Check if the specified coordinate system has the expected number of dimensions.
 CS_AxisInfo export(AxisInfo axis)
          Returns an OpenGIS structure for an axis info.
 CS_AxisOrientationEnum export(AxisOrientation orientation)
          Returns an OpenGIS enumeration for an axis orientation.
 CS_CompoundCoordinateSystem export(CompoundCoordinateSystem cs)
          Returns an OpenGIS interface for a compound coordinate system.
 CS_CoordinateSystem export(CoordinateSystem cs)
          Returns an OpenGIS interface for a coordinate system.
 CS_CoordinateSystemFactory export(CoordinateSystemFactory factory)
          Returns an OpenGIS interface for a coordinate system factory.
 CS_Datum export(Datum datum)
          Returns an OpenGIS interface for a datum.
 CS_DatumType export(DatumType type)
          Returns an OpenGIS enumeration for a datum type.
 CS_Ellipsoid export(Ellipsoid ellipsoid)
          Returns an OpenGIS interface for an ellipsoid.
 CS_GeocentricCoordinateSystem export(GeocentricCoordinateSystem cs)
          Returns an OpenGIS interface for a geocentric coordinate system.
 CS_GeographicCoordinateSystem export(GeographicCoordinateSystem cs)
          Returns an OpenGIS interface for a geographic coordinate system.
 CS_HorizontalCoordinateSystem export(HorizontalCoordinateSystem cs)
          Returns an OpenGIS interface for a horizontal coordinate system.
 CS_HorizontalDatum export(HorizontalDatum datum)
          Returns an OpenGIS interface for a datum.
 CS_Info export(Info info)
          Returns an OpenGIS interface for an info.
 CS_LocalCoordinateSystem export(LocalCoordinateSystem cs)
          Returns an OpenGIS interface for a local coordinate system.
 CS_LocalDatum export(LocalDatum datum)
          Returns an OpenGIS interface for a datum.
 CS_PrimeMeridian export(PrimeMeridian meridian)
          Returns an OpenGIS interface for a prime meridien.
 CS_ProjectedCoordinateSystem export(ProjectedCoordinateSystem cs)
          Returns an OpenGIS interface for a projected coordinate system.
 CS_Projection export(Projection projection)
          Returns an OpenGIS interface for a projection.
 CS_Unit export(Unit unit)
          Returns an OpenGIS interface for an unit.
 CS_VerticalCoordinateSystem export(VerticalCoordinateSystem cs)
          Returns an OpenGIS interface for a vertical coordinate system.
 CS_VerticalDatum export(VerticalDatum datum)
          Returns an OpenGIS interface for a datum.
 CS_WGS84ConversionInfo export(WGS84ConversionInfo info)
          Returns an OpenGIS structure for conversion info.
static Adapters getDefault()
          Gets the default adapters.
private static java.util.Map map(CS_Info info)
          Returns a map for the specified OpenGIS structure.
 AxisInfo wrap(CS_AxisInfo axis)
          Returns an axis info for an OpenGIS structure.
(package private)  AxisInfo[] wrap(CS_AxisInfo[] axis)
          Returns an axis array for an OpenGIS structure array.
 AxisOrientation wrap(CS_AxisOrientationEnum orientation)
          Returns an axis orientation for an OpenGIS enumeration.
 CompoundCoordinateSystem wrap(CS_CompoundCoordinateSystem cs)
          Returns a compound coordinate system for an OpenGIS interface.
 CoordinateSystem wrap(CS_CoordinateSystem cs)
          Returns a coordinate system for an OpenGIS interface.
 Datum wrap(CS_Datum datum)
          Returns a datum for an OpenGIS interface.
 DatumType wrap(CS_DatumType type)
          Returns a datum type for an OpenGIS enumeration.
 Ellipsoid wrap(CS_Ellipsoid ellipsoid)
          Returns an ellipsoid for an OpenGIS interface.
 GeocentricCoordinateSystem wrap(CS_GeocentricCoordinateSystem cs)
          Returns a geocentric coordinate system for an OpenGIS interface.
 GeographicCoordinateSystem wrap(CS_GeographicCoordinateSystem cs)
          Returns a geographic coordinate system for an OpenGIS interface.
 HorizontalCoordinateSystem wrap(CS_HorizontalCoordinateSystem cs)
          Returns a horizontal coordinate system for an OpenGIS interface.
 HorizontalDatum wrap(CS_HorizontalDatum datum)
          Returns a horizontal datum for an OpenGIS interface.
 Info wrap(CS_Info info)
          Returns info for an OpenGIS interface.
 LocalCoordinateSystem wrap(CS_LocalCoordinateSystem cs)
          Returns a local coordinate system for an OpenGIS interface.
 LocalDatum wrap(CS_LocalDatum datum)
          Returns a local datum for an OpenGIS interface.
 PrimeMeridian wrap(CS_PrimeMeridian meridian)
          Returns a prime meridian for an OpenGIS interface.
 ProjectedCoordinateSystem wrap(CS_ProjectedCoordinateSystem cs)
          Returns a projected coordinate system for an OpenGIS interface.
 Projection wrap(CS_Projection projection)
          Returns a projection for an OpenGIS interface.
 ParameterList wrap(CS_ProjectionParameter[] parameters)
          Returns a parameter list for an array of OpenGIS structures.
 Unit wrap(CS_Unit unit)
          Returns an unit for an OpenGIS structure.
 VerticalCoordinateSystem wrap(CS_VerticalCoordinateSystem cs)
          Returns a vertical coordinate system for an OpenGIS interface.
 VerticalDatum wrap(CS_VerticalDatum datum)
          Returns a vertical datum for an OpenGIS interface.
 WGS84ConversionInfo wrap(CS_WGS84ConversionInfo info)
          Returns conversion info for an OpenGIS structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

private static Adapters DEFAULT
Default adapters. Will be constructed only when first requested.


PT

public Adapters PT
The underlying adapters for the org.deegree_impl.model.pt package.

Constructor Detail

Adapters

protected Adapters()

Adapters

protected Adapters(Adapters PT)
Default constructor.

Parameters:
PT - The underlying adapters for org.deegree_impl.model.pt package.
Method Detail

getDefault

public static Adapters getDefault()
Gets the default adapters.


export

public CS_CoordinateSystemFactory export(CoordinateSystemFactory factory)
Returns an OpenGIS interface for a coordinate system factory.


export

public CS_Info export(Info info)
Returns an OpenGIS interface for an info. If the argument is an Info subclass, the returned object will implements the corresponding interface. For example a call with an argument of type GeographicCoordinateSystem will returns an object implementing the CS_GeographicCoordinateSystem interface.


export

public CS_CoordinateSystem export(CoordinateSystem cs)
Returns an OpenGIS interface for a coordinate system. If the argument is a CoordinateSystem subclass, the returned object will implements the corresponding interface.


export

public CS_CompoundCoordinateSystem export(CompoundCoordinateSystem cs)
Returns an OpenGIS interface for a compound coordinate system.


export

public CS_LocalCoordinateSystem export(LocalCoordinateSystem cs)
Returns an OpenGIS interface for a local coordinate system.


export

public CS_GeocentricCoordinateSystem export(GeocentricCoordinateSystem cs)
Returns an OpenGIS interface for a geocentric coordinate system.


export

public CS_VerticalCoordinateSystem export(VerticalCoordinateSystem cs)
Returns an OpenGIS interface for a vertical coordinate system.


export

public CS_HorizontalCoordinateSystem export(HorizontalCoordinateSystem cs)
Returns an OpenGIS interface for a horizontal coordinate system.


export

public CS_GeographicCoordinateSystem export(GeographicCoordinateSystem cs)
Returns an OpenGIS interface for a geographic coordinate system.


export

public CS_ProjectedCoordinateSystem export(ProjectedCoordinateSystem cs)
Returns an OpenGIS interface for a projected coordinate system.


export

public CS_Projection export(Projection projection)
Returns an OpenGIS interface for a projection.


export

public CS_PrimeMeridian export(PrimeMeridian meridian)
Returns an OpenGIS interface for a prime meridien.


export

public CS_Ellipsoid export(Ellipsoid ellipsoid)
Returns an OpenGIS interface for an ellipsoid.


export

public CS_DatumType export(DatumType type)
Returns an OpenGIS enumeration for a datum type.


export

public CS_Datum export(Datum datum)
Returns an OpenGIS interface for a datum.


export

public CS_LocalDatum export(LocalDatum datum)
Returns an OpenGIS interface for a datum.


export

public CS_HorizontalDatum export(HorizontalDatum datum)
Returns an OpenGIS interface for a datum.


export

public CS_VerticalDatum export(VerticalDatum datum)
Returns an OpenGIS interface for a datum.


export

public CS_AxisOrientationEnum export(AxisOrientation orientation)
Returns an OpenGIS enumeration for an axis orientation.


export

public CS_AxisInfo export(AxisInfo axis)
Returns an OpenGIS structure for an axis info.


export

public CS_WGS84ConversionInfo export(WGS84ConversionInfo info)
Returns an OpenGIS structure for conversion info.


export

public CS_Unit export(Unit unit)
Returns an OpenGIS interface for an unit. The returned interface may extends CS_LinearUnit or CS_AngularUnit according the specified unit.


checkDimension

private static void checkDimension(CS_CoordinateSystem cs,
                                   int expected)
                            throws java.rmi.RemoteException,
                                   java.lang.IllegalArgumentException
Check if the specified coordinate system has the expected number of dimensions.

Parameters:
cs - The coordinate system to check.
expected - The expected number of dimensions.
Throws:
java.lang.IllegalArgumentException - if the coordinate system doesn't have the expected number of dimensions.
java.rmi.RemoteException

wrap

public Info wrap(CS_Info info)
          throws java.rmi.RemoteException
Returns info for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public CoordinateSystem wrap(CS_CoordinateSystem cs)
                      throws java.rmi.RemoteException
Returns a coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public CompoundCoordinateSystem wrap(CS_CompoundCoordinateSystem cs)
                              throws java.rmi.RemoteException
Returns a compound coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public LocalCoordinateSystem wrap(CS_LocalCoordinateSystem cs)
                           throws java.rmi.RemoteException
Returns a local coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public GeocentricCoordinateSystem wrap(CS_GeocentricCoordinateSystem cs)
                                throws java.rmi.RemoteException
Returns a geocentric coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public VerticalCoordinateSystem wrap(CS_VerticalCoordinateSystem cs)
                              throws java.rmi.RemoteException
Returns a vertical coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public HorizontalCoordinateSystem wrap(CS_HorizontalCoordinateSystem cs)
                                throws java.rmi.RemoteException
Returns a horizontal coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public GeographicCoordinateSystem wrap(CS_GeographicCoordinateSystem cs)
                                throws java.rmi.RemoteException
Returns a geographic coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public ProjectedCoordinateSystem wrap(CS_ProjectedCoordinateSystem cs)
                               throws java.rmi.RemoteException
Returns a projected coordinate system for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public Projection wrap(CS_Projection projection)
                throws java.rmi.RemoteException
Returns a projection for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public PrimeMeridian wrap(CS_PrimeMeridian meridian)
                   throws java.rmi.RemoteException
Returns a prime meridian for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public Ellipsoid wrap(CS_Ellipsoid ellipsoid)
               throws java.rmi.RemoteException
Returns an ellipsoid for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public DatumType wrap(CS_DatumType type)
Returns a datum type for an OpenGIS enumeration.


wrap

public Datum wrap(CS_Datum datum)
           throws java.rmi.RemoteException
Returns a datum for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public LocalDatum wrap(CS_LocalDatum datum)
                throws java.rmi.RemoteException
Returns a local datum for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public HorizontalDatum wrap(CS_HorizontalDatum datum)
                     throws java.rmi.RemoteException
Returns a horizontal datum for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public VerticalDatum wrap(CS_VerticalDatum datum)
                   throws java.rmi.RemoteException
Returns a vertical datum for an OpenGIS interface.

Throws:
java.rmi.RemoteException - if a remote call failed.

wrap

public AxisOrientation wrap(CS_AxisOrientationEnum orientation)
Returns an axis orientation for an OpenGIS enumeration.


wrap

public AxisInfo wrap(CS_AxisInfo axis)
Returns an axis info for an OpenGIS structure.


wrap

final AxisInfo[] wrap(CS_AxisInfo[] axis)
Returns an axis array for an OpenGIS structure array.


wrap

public ParameterList wrap(CS_ProjectionParameter[] parameters)
Returns a parameter list for an array of OpenGIS structures.


wrap

public WGS84ConversionInfo wrap(CS_WGS84ConversionInfo info)
Returns conversion info for an OpenGIS structure.


wrap

public Unit wrap(CS_Unit unit)
          throws java.rmi.RemoteException
Returns an unit for an OpenGIS structure.

Throws:
java.rmi.RemoteException - if a remote call failed.

map

private static java.util.Map map(CS_Info info)
                          throws java.rmi.RemoteException
Returns a map for the specified OpenGIS structure. Note: current implementation search all info immediatly. Future implementation may differ fetching until needed.

Parameters:
info - The OpenGIS structure.
Throws:
java.rmi.RemoteException - if a remote call failed.