deegree 2.5 (2011/06/29 09:44 build-8-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(java.util.List<javax.vecmath.Point3d> transformableData, java.lang.String cs, java.lang.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.
 java.lang.String getCoordinateSeparator()
           
 java.util.List<javax.vecmath.Point3d> getTransformedData()
           
 java.lang.String getTupleSeparator()
           
 boolean hasData()
           
static java.util.List<javax.vecmath.Point3d> parseData(java.lang.String simpleData, int sourceDim, java.lang.String cs, java.lang.String ts, java.lang.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(java.util.List<javax.vecmath.Point3d> transformableData,
                  java.lang.String cs,
                  java.lang.String ts)
           throws java.lang.IllegalArgumentException
Creates a simple data instance.

Parameters:
transformableData -
cs - the coordinate separator
ts - the tuple separator
Throws:
java.lang.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 java.util.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 java.lang.String getTupleSeparator()
Returns:
the value for the ts attribute, defaults to a single space character.

getCoordinateSeparator

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

parseData

public static java.util.List<javax.vecmath.Point3d> parseData(java.lang.String simpleData,
                                                              int sourceDim,
                                                              java.lang.String cs,
                                                              java.lang.String ts,
                                                              java.lang.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.5 (2011/06/29 09:44 build-8-official)

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