public class XmlSimpleFeatureParser extends Object implements GetFeatureParser
GetFeatureParser implementation that uses plain xml pull to parse a GetFeature
response.//@deprecated should be removed as long as PullParserFeatureReader works well
| Constructor and Description |
|---|
XmlSimpleFeatureParser(InputStream getFeatureResponseStream,
SimpleFeatureType targetType,
QName featureDescriptorName,
String axisOrder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the parser.
|
FeatureType |
getFeatureType()
Get the feature type that the parser is targeting.
|
int |
getNumberOfFeatures()
Returns the number of features if advertised by the server and the parser was able to get
that information for example from the
wfs:FeatureCollection "numberOfFeatures" xml
attribute, or -1 if unknown. |
SimpleFeature |
parse() |
void |
setGeometryFactory(GeometryFactory geometryFactory)
Set the geometry factory.
|
public XmlSimpleFeatureParser(InputStream getFeatureResponseStream, SimpleFeatureType targetType, QName featureDescriptorName, String axisOrder) throws IOException
IOExceptionpublic void setGeometryFactory(GeometryFactory geometryFactory)
GetParsersetGeometryFactory in interface GetParser<SimpleFeature>geometryFactory - The geometry factory to use.public FeatureType getFeatureType()
GetParsergetFeatureType in interface GetParser<SimpleFeature>public int getNumberOfFeatures()
GetParserwfs:FeatureCollection "numberOfFeatures" xml
attribute, or -1 if unknown.getNumberOfFeatures in interface GetParser<SimpleFeature>-1 if unknownpublic void close()
throws IOException
GetParserclose in interface GetParser<SimpleFeature>IOException - Throws IOException if there was a problem closing the parser.public SimpleFeature parse() throws IOException
parse in interface GetFeatureParserparse in interface GetParser<SimpleFeature>null if there are no more features to
parse.IOExceptionCopyright © 1996–2019 Geotools. All rights reserved.