org.geotools.gml.producer
Class GeometryTransformer.GeometryTranslator

Object
  extended by TransformerBase.TranslatorSupport
      extended by GeometryTransformer.GeometryTranslator
All Implemented Interfaces:
Translator
Enclosing class:
GeometryTransformer

public static class GeometryTransformer.GeometryTranslator
extends TransformerBase.TranslatorSupport


Field Summary
protected  CoordinateWriter coordWriter
           
 
Fields inherited from class TransformerBase.TranslatorSupport
contentHandler, nsSupport, NULL_ATTS, running, schemaLocation
 
Constructor Summary
GeometryTransformer.GeometryTranslator(ContentHandler handler)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, int numDecimals)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, int numDecimals, boolean isDummyZEnabled)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, String prefix, String nsUri)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean isDummyZEnabled)
           
GeometryTransformer.GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean isDummyZEnabled, int dimension)
          Constructor for GeometryTranslator allowing the specification of the number of valid dimension represented in the Coordinates.
 
Method Summary
protected  String boxName()
          Method to be subclassed in order to allow for gml3 encoding of envelopes.
 void encode(Envelope bounds)
           
 void encode(Envelope bounds, String srsName)
           
 void encode(Geometry geometry)
          Encodes the given geometry with no srsName attribute and forcing 2D
 void encode(Geometry geometry, String srsName)
          Encodes the geometry in plain 2D using the given srsName attribute value
 void encode(Geometry geometry, String srsName, int dimensions)
          Encodes the given geometry with the provided srsName attribute and for the specified dimensions
 void encode(Object o)
          Encode the object.
 void encode(Object o, String srsName)
           
protected  void encodeNullBounds()
          Method to be subclasses in order to allow for gml3 encoding for null enevelope.
 int getNumDecimals()
           
 boolean isDummyZEnabled()
           
 
Methods inherited from class TransformerBase.TranslatorSupport
abort, addNamespaceDeclarations, cdata, chars, createAttributes, element, element, elementSafe, end, getDefaultNamespace, getDefaultPrefix, getNamespaceSupport, getSchemaLocationSupport, start, start
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coordWriter

protected CoordinateWriter coordWriter
Constructor Detail

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              String prefix,
                                              String nsUri)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              int numDecimals)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              String prefix,
                                              String nsUri,
                                              int numDecimals)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              int numDecimals,
                                              boolean isDummyZEnabled)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              String prefix,
                                              String nsUri,
                                              int numDecimals,
                                              boolean isDummyZEnabled)

GeometryTransformer.GeometryTranslator

public GeometryTransformer.GeometryTranslator(ContentHandler handler,
                                              String prefix,
                                              String nsUri,
                                              int numDecimals,
                                              boolean isDummyZEnabled,
                                              int dimension)
Constructor for GeometryTranslator allowing the specification of the number of valid dimension represented in the Coordinates.

Parameters:
handler -
prefix -
nsUri -
numDecimals -
isDummyZEnabled -
dimension - If this value is 3; the coordinate.z will be used rather than dummyZ since 2.4.1
Method Detail

isDummyZEnabled

public boolean isDummyZEnabled()

getNumDecimals

public int getNumDecimals()

encode

public void encode(Object o,
                   String srsName)
            throws IllegalArgumentException
Throws:
IllegalArgumentException

encode

public void encode(Object o)
            throws IllegalArgumentException
Description copied from interface: Translator
Encode the object.

Parameters:
o - The Object to encode.
Throws:
IllegalArgumentException - if the Object is not encodeable.

encode

public void encode(Envelope bounds)

encode

public void encode(Envelope bounds,
                   String srsName)

encodeNullBounds

protected void encodeNullBounds()
Method to be subclasses in order to allow for gml3 encoding for null enevelope.


boxName

protected String boxName()
Method to be subclassed in order to allow for gml3 encoding of envelopes.

Returns:
"Box"

encode

public void encode(Geometry geometry)
Encodes the given geometry with no srsName attribute and forcing 2D


encode

public void encode(Geometry geometry,
                   String srsName)
Encodes the geometry in plain 2D using the given srsName attribute value

See Also:
encode(Geometry, String, int)

encode

public void encode(Geometry geometry,
                   String srsName,
                   int dimensions)
Encodes the given geometry with the provided srsName attribute and for the specified dimensions

Parameters:
geometry - non null geometry to encode
srsName - srsName attribute for the geometry, or null
dimensions - shall laid between 1, 2, or 3. Number of coordinate dimensions to force. TODO: dimensions is not being taken into account currently. Jody?


Copyright © 1996-2010 Geotools. All Rights Reserved.