public class PullParserFeatureReader extends Object implements GetFeatureParser
GetFeatureParser
for WFSFeatureReader
that uses the geotools PullParser
to fetch Features out of a WFS GetFeature response.Constructor and Description |
---|
PullParserFeatureReader(Configuration wfsConfiguration,
InputStream getFeatureResponseStream,
FeatureType featureType,
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 |
setContextCustomizer(ParserHandler.ContextCustomizer contextCustomizer) |
void |
setGeometryFactory(GeometryFactory geometryFactory)
Set the geometry factory.
|
public PullParserFeatureReader(Configuration wfsConfiguration, InputStream getFeatureResponseStream, FeatureType featureType, String axisOrder) throws IOException
IOException
public void close() throws IOException
GetParser
close
in interface GetParser<SimpleFeature>
IOException
- Throws IOException if there was a problem closing the parser.GetParser.close()
public SimpleFeature parse() throws IOException
parse
in interface GetFeatureParser
parse
in interface GetParser<SimpleFeature>
null
if there are no more features to
parse.IOException
GetFeatureParser.parse()
public int getNumberOfFeatures()
GetParser
wfs:FeatureCollection
"numberOfFeatures" xml
attribute, or -1
if unknown.getNumberOfFeatures
in interface GetParser<SimpleFeature>
-1
if unknownGetParser.getNumberOfFeatures()
public FeatureType getFeatureType()
GetParser
getFeatureType
in interface GetParser<SimpleFeature>
public void setGeometryFactory(GeometryFactory geometryFactory)
GetParser
setGeometryFactory
in interface GetParser<SimpleFeature>
geometryFactory
- The geometry factory to use.public void setContextCustomizer(ParserHandler.ContextCustomizer contextCustomizer)
Copyright © 1996–2019 Geotools. All rights reserved.