deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.gml
Class XMLTransformer

java.lang.Object
  extended by org.deegree.crs.Transformer
      extended by org.deegree.geometry.GeometryTransformer
          extended by org.deegree.gml.XMLTransformer

public class XMLTransformer
extends GeometryTransformer

The XMLTransformer transforms any xml documents containing gml geometries. Only the geometries will be transformed all other data (including comments and cdata) will be copied.

Version:
$Revision: 22824 $, $Date: 2010-03-03 17:42:25 +0100 (Mi, 03 Mrz 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
XMLTransformer(CoordinateSystem targetCRS)
           
XMLTransformer(String targetCRS)
           
XMLTransformer(Transformation transformation)
           
 
Method Summary
 void transform(XMLStreamReader reader, XMLStreamWriter writer, CoordinateSystem sourceCRS, GMLVersion gmlVersion, boolean testValidArea)
          Transforms the given input stream, and streams the input into the output directly.
 
Methods inherited from class org.deegree.geometry.GeometryTransformer
transform, transform, transform, transform, transform
 
Methods inherited from class org.deegree.crs.Transformer
createCRSTransformation, createCRSTransformation, getTargetCRS, getWrappedTargetCRS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTransformer

public XMLTransformer(CoordinateSystem targetCRS)
               throws IllegalArgumentException
Parameters:
targetCRS -
Throws:
IllegalArgumentException

XMLTransformer

public XMLTransformer(String targetCRS)
               throws IllegalArgumentException,
                      UnknownCRSException
Parameters:
targetCRS -
Throws:
IllegalArgumentException
UnknownCRSException

XMLTransformer

public XMLTransformer(Transformation transformation)
               throws IllegalArgumentException
Parameters:
transformation -
Throws:
IllegalArgumentException
Method Detail

transform

public void transform(XMLStreamReader reader,
                      XMLStreamWriter writer,
                      CoordinateSystem sourceCRS,
                      GMLVersion gmlVersion,
                      boolean testValidArea)
               throws XMLStreamException,
                      XMLParsingException,
                      IllegalArgumentException,
                      OutsideCRSDomainException,
                      UnknownCRSException,
                      TransformationException
Transforms the given input stream, and streams the input into the output directly. If a geometry is found, the geometry is transformed into the target crs. All other events are just copied.

Parameters:
reader - an XMLStream containing some GML Geometries.
writer - the output will be written to this writer, the writer have been opened ( XMLStreamWriter.writeStartDocument(). No XMLStreamWriter.writeEndDocument() will be written as well.
sourceCRS - to be used if the geometries do not define a srsName (or the like) attribute.
gmlVersion - the version of the expected geometries.
testValidArea - true if the incoming geometries should be checked against the valid domain of the crs they are defined in.
Throws:
XMLStreamException
XMLParsingException
IllegalArgumentException
OutsideCRSDomainException
UnknownCRSException
TransformationException

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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

]]>