Package org.geotools.gml2.simple
Class GML2FeatureCollectionEncoderDelegate.GML2Delegate
- Object
-
- GML2Delegate
-
- All Implemented Interfaces:
GMLDelegate
- Enclosing class:
- GML2FeatureCollectionEncoderDelegate
public static class GML2FeatureCollectionEncoderDelegate.GML2Delegate extends Object implements GMLDelegate
-
-
Constructor Summary
Constructors Constructor Description GML2Delegate(Encoder encoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnvelopeEncoder
createEnvelopeEncoder(Encoder e)
Creates the envelope encodervoid
endFeature(GMLWriter handler)
Closes a single featurevoid
endFeatures(GMLWriter handler)
Closes a collection of featuresvoid
endTuple(GMLWriter output)
Closes a tupleboolean
forceDecimalEncoding()
Returns true if coordinates should be encoded as xs:decimal instead of xs:doubleList
getFeatureProperties(SimpleFeature f, XSDElementDeclaration element, Encoder e)
Lists all properties that should be encoded for a given featureString
getGmlPrefix()
The GML prefix used by this encoding sessionint
getNumDecimals()
Number of decimals used in the outputXSD
getSchema()
The XSD schema used by this GML versionvoid
initFidAttribute(AttributesImpl atts)
Initializes an empty feature id attribute, the attribute must be the first one in "atts"boolean
padWithZeros()
Returns true if coordinates should be right-padded with zeros up to the requested number of decimals.void
registerGeometryEncoders(Map<Class,GeometryEncoder<? extends Geometry>> encoders, Encoder encoder)
Registers all the geometry encoders for this GML version in a map, by geometry class (different versions support different types of geometries, e.g., GML3 supports also curved ones)void
setGeometryDimensionAttribute(AttributesImpl srsatts, int dimension)
Sets the dimensions attribute, if available for the current GML versionvoid
setSrsNameAttribute(AttributesImpl atts, CoordinateReferenceSystem crs)
Sets the SRS attribute with the proper syntax for the given GML versionvoid
startFeature(GMLWriter handler)
Writes whatever per feature preamble is needed in this GML versionvoid
startFeatures(GMLWriter handler)
Writes whatever per collection preamble is needed in this GML versionvoid
startTuple(GMLWriter output)
Writes the tuple preambleboolean
supportsTuples()
Returns true if tuple encoding is supported in this standard-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface GMLDelegate
getEncodeMeasures
-
-
-
-
Constructor Detail
-
GML2Delegate
public GML2Delegate(Encoder encoder)
-
-
Method Detail
-
getFeatureProperties
public List getFeatureProperties(SimpleFeature f, XSDElementDeclaration element, Encoder e)
Description copied from interface:GMLDelegate
Lists all properties that should be encoded for a given feature- Specified by:
getFeatureProperties
in interfaceGMLDelegate
- Parameters:
f
- A sample featureelement
- The xml element holding the feature typee
- The encoder
-
createEnvelopeEncoder
public EnvelopeEncoder createEnvelopeEncoder(Encoder e)
Description copied from interface:GMLDelegate
Creates the envelope encoder- Specified by:
createEnvelopeEncoder
in interfaceGMLDelegate
-
initFidAttribute
public void initFidAttribute(AttributesImpl atts)
Description copied from interface:GMLDelegate
Initializes an empty feature id attribute, the attribute must be the first one in "atts"- Specified by:
initFidAttribute
in interfaceGMLDelegate
-
startFeatures
public void startFeatures(GMLWriter handler)
Description copied from interface:GMLDelegate
Writes whatever per collection preamble is needed in this GML version- Specified by:
startFeatures
in interfaceGMLDelegate
-
startFeature
public void startFeature(GMLWriter handler) throws Exception
Description copied from interface:GMLDelegate
Writes whatever per feature preamble is needed in this GML version- Specified by:
startFeature
in interfaceGMLDelegate
- Throws:
Exception
-
endFeature
public void endFeature(GMLWriter handler) throws Exception
Description copied from interface:GMLDelegate
Closes a single feature- Specified by:
endFeature
in interfaceGMLDelegate
- Throws:
Exception
-
endFeatures
public void endFeatures(GMLWriter handler)
Description copied from interface:GMLDelegate
Closes a collection of features- Specified by:
endFeatures
in interfaceGMLDelegate
-
setSrsNameAttribute
public void setSrsNameAttribute(AttributesImpl atts, CoordinateReferenceSystem crs)
Description copied from interface:GMLDelegate
Sets the SRS attribute with the proper syntax for the given GML version- Specified by:
setSrsNameAttribute
in interfaceGMLDelegate
-
setGeometryDimensionAttribute
public void setGeometryDimensionAttribute(AttributesImpl srsatts, int dimension)
Description copied from interface:GMLDelegate
Sets the dimensions attribute, if available for the current GML version- Specified by:
setGeometryDimensionAttribute
in interfaceGMLDelegate
-
registerGeometryEncoders
public void registerGeometryEncoders(Map<Class,GeometryEncoder<? extends Geometry>> encoders, Encoder encoder)
Description copied from interface:GMLDelegate
Registers all the geometry encoders for this GML version in a map, by geometry class (different versions support different types of geometries, e.g., GML3 supports also curved ones)- Specified by:
registerGeometryEncoders
in interfaceGMLDelegate
-
getGmlPrefix
public String getGmlPrefix() throws Exception
Description copied from interface:GMLDelegate
The GML prefix used by this encoding session- Specified by:
getGmlPrefix
in interfaceGMLDelegate
- Throws:
Exception
-
supportsTuples
public boolean supportsTuples()
Description copied from interface:GMLDelegate
Returns true if tuple encoding is supported in this standard- Specified by:
supportsTuples
in interfaceGMLDelegate
-
startTuple
public void startTuple(GMLWriter output)
Description copied from interface:GMLDelegate
Writes the tuple preamble- Specified by:
startTuple
in interfaceGMLDelegate
-
endTuple
public void endTuple(GMLWriter output)
Description copied from interface:GMLDelegate
Closes a tuple- Specified by:
endTuple
in interfaceGMLDelegate
-
getSchema
public XSD getSchema()
Description copied from interface:GMLDelegate
The XSD schema used by this GML version- Specified by:
getSchema
in interfaceGMLDelegate
-
getNumDecimals
public int getNumDecimals()
Description copied from interface:GMLDelegate
Number of decimals used in the output- Specified by:
getNumDecimals
in interfaceGMLDelegate
-
forceDecimalEncoding
public boolean forceDecimalEncoding()
Description copied from interface:GMLDelegate
Returns true if coordinates should be encoded as xs:decimal instead of xs:double- Specified by:
forceDecimalEncoding
in interfaceGMLDelegate
-
padWithZeros
public boolean padWithZeros()
Description copied from interface:GMLDelegate
Returns true if coordinates should be right-padded with zeros up to the requested number of decimals.- Specified by:
padWithZeros
in interfaceGMLDelegate
-
-