Package org.geotools.gml2.simple
Interface GMLDelegate
-
- All Known Implementing Classes:
GML2FeatureCollectionEncoderDelegate.GML2Delegate
,GML32FeatureCollectionEncoderDelegate.GML32Delegate
public interface GMLDelegate
Interface factoring out the differences between GML versions- Author:
- Justin Deoliveira, OpenGeo, Andrea Aime - GeoSolutions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ObjectEncoder
createEnvelopeEncoder(Encoder e)
Creates the envelope encodervoid
endFeature(GMLWriter handler)
Closes a single featurevoid
endFeatures(GMLWriter handler)
Closes a collection of featuresvoid
endTuple(GMLWriter handler)
Closes a tupleboolean
forceDecimalEncoding()
Returns true if coordinates should be encoded as xs:decimal instead of xs:doubledefault boolean
getEncodeMeasures()
Controls if coordinates measures should be included in WFS outputs.List
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 handler)
Writes the tuple preambleboolean
supportsTuples()
Returns true if tuple encoding is supported in this standard
-
-
-
Method Detail
-
getFeatureProperties
List getFeatureProperties(SimpleFeature f, XSDElementDeclaration element, Encoder e)
Lists all properties that should be encoded for a given feature- Parameters:
f
- A sample featureelement
- The xml element holding the feature typee
- The encoder
-
createEnvelopeEncoder
ObjectEncoder createEnvelopeEncoder(Encoder e)
Creates the envelope encoder
-
registerGeometryEncoders
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)
-
setSrsNameAttribute
void setSrsNameAttribute(AttributesImpl atts, CoordinateReferenceSystem crs)
Sets the SRS attribute with the proper syntax for the given GML version
-
setGeometryDimensionAttribute
void setGeometryDimensionAttribute(AttributesImpl srsatts, int dimension)
Sets the dimensions attribute, if available for the current GML version
-
initFidAttribute
void initFidAttribute(AttributesImpl atts)
Initializes an empty feature id attribute, the attribute must be the first one in "atts"
-
startFeatures
void startFeatures(GMLWriter handler) throws Exception
Writes whatever per collection preamble is needed in this GML version- Throws:
Exception
-
startFeature
void startFeature(GMLWriter handler) throws Exception
Writes whatever per feature preamble is needed in this GML version- Throws:
Exception
-
endFeatures
void endFeatures(GMLWriter handler) throws Exception
Closes a collection of features- Throws:
Exception
-
endFeature
void endFeature(GMLWriter handler) throws Exception
Closes a single feature- Throws:
Exception
-
getGmlPrefix
String getGmlPrefix() throws Exception
The GML prefix used by this encoding session- Throws:
Exception
-
supportsTuples
boolean supportsTuples()
Returns true if tuple encoding is supported in this standard
-
startTuple
void startTuple(GMLWriter handler) throws SAXException
Writes the tuple preamble- Throws:
SAXException
-
endTuple
void endTuple(GMLWriter handler) throws SAXException
Closes a tuple- Throws:
SAXException
-
getSchema
XSD getSchema()
The XSD schema used by this GML version
-
getNumDecimals
int getNumDecimals()
Number of decimals used in the output
-
forceDecimalEncoding
boolean forceDecimalEncoding()
Returns true if coordinates should be encoded as xs:decimal instead of xs:double
-
padWithZeros
boolean padWithZeros()
Returns true if coordinates should be right-padded with zeros up to the requested number of decimals.
-
getEncodeMeasures
default boolean getEncodeMeasures()
Controls if coordinates measures should be included in WFS outputs.- Returns:
- TRUE if measures should be encoded, otherwise FALSE
-
-