Class XmlFeatureParser<FT extends FeatureType,F extends Feature>
- Object
- 
- XmlFeatureParser<FT,F>
 
- 
- All Implemented Interfaces:
- GetParser<F>
 - Direct Known Subclasses:
- XmlComplexFeatureParser
 
 public abstract class XmlFeatureParser<FT extends FeatureType,F extends Feature> extends Object implements GetParser<F> Abstract form of XmlFeatureParser. Mostly taken out from @XmlSimpleFeatureParser.- Author:
- Adam Brown (Curtin University of Technology)
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected XMLStreamReaderparserprotected FTtargetType
 - 
Constructor SummaryConstructors Constructor Description XmlFeatureParser(InputStream getFeatureResponseStream, FT targetType, QName featureDescriptorName, WFSStrategy strategy)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the parser.FTgetFeatureType()Get the feature type that the parser is targeting.intgetNumberOfFeatures()Returns the number of features if advertised by the server and the parser was able to get that information for example from thewfs:FeatureCollection"numberOfFeatures" xml attribute, or-1if unknown.protected ObjectparseAttributeValue(AttributeDescriptor attribute)Parses the value of the current attribute, parser cursor shall be on a feature attribute START_ELEMENT event.protected StringseekFeature()voidsetGeometryFactory(GeometryFactory geometryFactory)Set the geometry factory.
 
- 
- 
- 
Field Detail- 
targetTypeprotected FT extends FeatureType targetType 
 - 
parserprotected XMLStreamReader parser 
 
- 
 - 
Constructor Detail- 
XmlFeatureParserpublic XmlFeatureParser(InputStream getFeatureResponseStream, FT targetType, QName featureDescriptorName, WFSStrategy strategy) throws IOException - Throws:
- IOException
 
 
- 
 - 
Method Detail- 
setGeometryFactorypublic void setGeometryFactory(GeometryFactory geometryFactory) Description copied from interface:GetParserSet the geometry factory.- Specified by:
- setGeometryFactoryin interface- GetParser<FT extends FeatureType>
- Parameters:
- geometryFactory- The geometry factory to use.
 
 - 
getFeatureTypepublic FT getFeatureType() Description copied from interface:GetParserGet the feature type that the parser is targeting.- Specified by:
- getFeatureTypein interface- GetParser<FT extends FeatureType>
- Returns:
- The feature type that the parser is targeting.
 
 - 
getNumberOfFeaturespublic int getNumberOfFeatures() Description copied from interface:GetParserReturns the number of features if advertised by the server and the parser was able to get that information for example from thewfs:FeatureCollection"numberOfFeatures" xml attribute, or-1if unknown.- Specified by:
- getNumberOfFeaturesin interface- GetParser<FT extends FeatureType>
- Returns:
- number of features advertised by server, or -1if unknown
 
 - 
closepublic void close() throws IOExceptionDescription copied from interface:GetParserClose the parser.- Specified by:
- closein interface- GetParser<FT extends FeatureType>
- Throws:
- IOException- Throws IOException if there was a problem closing the parser.
 
 - 
parseAttributeValueprotected Object parseAttributeValue(AttributeDescriptor attribute) throws XMLStreamException, IOException Parses the value of the current attribute, parser cursor shall be on a feature attribute START_ELEMENT event.- Throws:
- XMLStreamException
- IOException
 
 - 
seekFeatureprotected String seekFeature() throws IOException, XMLStreamException - Throws:
- IOException
- XMLStreamException
 
 
- 
 
-