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 SummaryModifier and TypeMethodDescriptionCreates the envelope encodervoidendFeature(GMLWriter handler) Closes a single featurevoidendFeatures(GMLWriter handler) Closes a collection of featuresvoidCloses a tuplebooleanReturns true if coordinates should be encoded as xs:decimal instead of xs:doubledefault booleanControls if coordinates measures should be included in WFS outputs.getFeatureProperties(SimpleFeature f, XSDElementDeclaration element, Encoder e) Lists all properties that should be encoded for a given featureThe GML prefix used by this encoding sessionintNumber of decimals used in the outputThe XSD schema used by this GML versionvoidInitializes an empty feature id attribute, the attribute must be the first one in "atts"booleanReturns true if coordinates should be right-padded with zeros up to the requested number of decimals.voidregisterGeometryEncoders(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)voidsetGeometryDimensionAttribute(AttributesImpl srsatts, int dimension) Sets the dimensions attribute, if available for the current GML versionvoidSets the SRS attribute with the proper syntax for the given GML versionvoidstartFeature(GMLWriter handler) Writes whatever per feature preamble is needed in this GML versionvoidstartFeatures(GMLWriter handler) Writes whatever per collection preamble is needed in this GML versionvoidstartTuple(GMLWriter handler) Writes the tuple preamblebooleanReturns true if tuple encoding is supported in this standard
- 
Method Details- 
getFeaturePropertiesLists all properties that should be encoded for a given feature- Parameters:
- f- A sample feature
- element- The xml element holding the feature type
- e- The encoder
 
- 
createEnvelopeEncoderCreates the envelope encoder
- 
registerGeometryEncodersvoid 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)
- 
setSrsNameAttributeSets the SRS attribute with the proper syntax for the given GML version
- 
setGeometryDimensionAttributeSets the dimensions attribute, if available for the current GML version
- 
initFidAttributeInitializes an empty feature id attribute, the attribute must be the first one in "atts"
- 
startFeaturesWrites whatever per collection preamble is needed in this GML version- Throws:
- Exception
 
- 
startFeatureWrites whatever per feature preamble is needed in this GML version- Throws:
- Exception
 
- 
endFeaturesCloses a collection of features- Throws:
- Exception
 
- 
endFeatureCloses a single feature- Throws:
- Exception
 
- 
getGmlPrefixThe GML prefix used by this encoding session- Throws:
- Exception
 
- 
supportsTuplesboolean supportsTuples()Returns true if tuple encoding is supported in this standard
- 
startTupleWrites the tuple preamble- Throws:
- SAXException
 
- 
endTupleCloses a tuple- Throws:
- SAXException
 
- 
getSchemaXSD getSchema()The XSD schema used by this GML version
- 
getNumDecimalsint getNumDecimals()Number of decimals used in the output
- 
forceDecimalEncodingboolean forceDecimalEncoding()Returns true if coordinates should be encoded as xs:decimal instead of xs:double
- 
padWithZerosboolean padWithZeros()Returns true if coordinates should be right-padded with zeros up to the requested number of decimals.
- 
getEncodeMeasuresdefault boolean getEncodeMeasures()Controls if coordinates measures should be included in WFS outputs.- Returns:
- TRUE if measures should be encoded, otherwise FALSE
 
 
-