deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.wcts.data
Class SimpleData

java.lang.Object
  extended by org.deegree.ogcwebservices.wcts.data.TransformableData<javax.vecmath.Point3d>
      extended by org.deegree.ogcwebservices.wcts.data.SimpleData

public class SimpleData
extends TransformableData<javax.vecmath.Point3d>

SimpleData takes a list of points which will be transformed.

Version:
$Revision:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Constructor Summary
SimpleData()
          using default values, cs="," and ts='space'
SimpleData(List<javax.vecmath.Point3d> transformableData, String cs, String ts)
          Creates a simple data instance.
 
Method Summary
 void doTransform(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, boolean enableLogging)
          This function should implement the transforming of the underlying data.
 void doTransform(Transformation transformation, boolean enableLogging)
          This function should implement the transforming of the underlying data.
 String getCoordinateSeparator()
           
 List<javax.vecmath.Point3d> getTransformedData()
           
 String getTupleSeparator()
           
 boolean hasData()
           
static List<javax.vecmath.Point3d> parseData(String simpleData, int sourceDim, String cs, String ts, String ds)
          Parses a String of data into the appropriate Point3d, according to the given cs, ts and coordinate dimension.
 
Methods inherited from class org.deegree.ogcwebservices.wcts.data.TransformableData
getGeotransformer, getGeotransformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleData

public SimpleData(List<javax.vecmath.Point3d> transformableData,
                  String cs,
                  String ts)
           throws IllegalArgumentException
Creates a simple data instance.

Parameters:
transformableData -
cs - the coordinate separator
ts - the tuple separator
Throws:
IllegalArgumentException - if either one of the crs's are null.

SimpleData

public SimpleData()
using default values, cs="," and ts='space'

Method Detail

doTransform

public void doTransform(CoordinateSystem sourceCRS,
                        CoordinateSystem targetCRS,
                        boolean enableLogging)
Description copied from class: TransformableData
This function should implement the transforming of the underlying data.

Specified by:
doTransform in class TransformableData<javax.vecmath.Point3d>
Parameters:
sourceCRS - of the incoming points
targetCRS - of the outgoing points
enableLogging - if true the implementing class should log all transformations.

doTransform

public void doTransform(Transformation transformation,
                        boolean enableLogging)
                 throws OGCWebServiceException
Description copied from class: TransformableData
This function should implement the transforming of the underlying data.

Specified by:
doTransform in class TransformableData<javax.vecmath.Point3d>
Parameters:
transformation - to use for the transform.
enableLogging - if true the implementing class should log all transformations.
Throws:
OGCWebServiceException - if an exception occurs while transforming.

hasData

public boolean hasData()
Returns:
true if this simpleData has sourcePoints.

getTransformedData

public List<javax.vecmath.Point3d> getTransformedData()
Specified by:
getTransformedData in class TransformableData<javax.vecmath.Point3d>
Returns:
the transformed data as a list of the overriding class implementation, for example Geometry (GeometyData), or Point3d (SimpleData).

getTupleSeparator

public final String getTupleSeparator()
Returns:
the value for the ts attribute, defaults to a single space character.

getCoordinateSeparator

public final String getCoordinateSeparator()
Returns:
the value for the cs attribute, defaults to a single comma character.

parseData

public static List<javax.vecmath.Point3d> parseData(String simpleData,
                                                    int sourceDim,
                                                    String cs,
                                                    String ts,
                                                    String ds)
Parses a String of data into the appropriate Point3d, according to the given cs, ts and coordinate dimension.

Parameters:
simpleData - a String containing the data
sourceDim - the dimension of the source coordinate system, in which the points are defined.
cs - the coordinate separator.
ts - the tuple separator.
ds - the decimal separator currently not evaluated.
Returns:
a list containing the parsed points or an empty list if the points could not be retrieved, never null

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org