T - public abstract class GeometryEncoder<T extends Geometry> extends ObjectEncoder<T>
encode(Geometry, AttributesImpl, GMLWriter) or encode(Geometry, AttributesImpl, GMLWriter, String), failing to do so will result in a infinite
recursion and eventually in a StackOverflowErrorencoder| Modifier | Constructor and Description |
|---|---|
protected |
GeometryEncoder(Encoder encoder) |
protected |
GeometryEncoder(Encoder encoder,
boolean encodeGmlId) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGmlId(AttributesImpl attributes,
String gmlId)
Adds a gmlId to an existing and non null attribute set
|
protected AttributesImpl |
cloneWithGmlId(AttributesImpl atts,
String gmlId)
Returns a new AttributesImpl based on the provided on, with the addition of a gml:id
attribute
|
void |
encode(T geometry,
AttributesImpl atts,
GMLWriter handler)
Encodes a geometry value
|
void |
encode(T geometry,
AttributesImpl atts,
GMLWriter handler,
String gmlId)
Encodes a geometry value with a given gmlId (implementations might choose to use it to
generate gml:id attributes, depending on the GML version.
|
protected GeometryEncoder(Encoder encoder)
protected GeometryEncoder(Encoder encoder, boolean encodeGmlId)
public void encode(T geometry, AttributesImpl atts, GMLWriter handler, String gmlId) throws Exception
encode(Geometry, AttributesImpl, GMLWriter)geometry - The Geometry to be encodedatts - Its attributeshandler - The handler used to write XMLgmlId - If not null, some implementation will use to as the gml:id (and to build ids for
the nested features)Exceptionprotected AttributesImpl cloneWithGmlId(AttributesImpl atts, String gmlId)
atts - The base attributes (can be null)gmlId - The desired gml:id valueprotected void addGmlId(AttributesImpl attributes, String gmlId)
public void encode(T geometry, AttributesImpl atts, GMLWriter handler) throws Exception
encode in class ObjectEncoder<T extends Geometry>geometry - The Geometry to be encodedatts - Its attributeshandler - The handler used to write XMLExceptionCopyright © 1996–2019 Geotools. All rights reserved.