Class PullParserFeatureReader
- Object
- 
- PullParserFeatureReader
 
- 
- All Implemented Interfaces:
- GetParser<SimpleFeature>
 
 public class PullParserFeatureReader extends Object implements GetParser<SimpleFeature> GetParserforWFSFeatureReaderthat uses the geotoolsPullParserto fetch Features out of a WFS GetFeature response.- Author:
- Niels Charlier
 
- 
- 
Constructor SummaryConstructors Constructor Description PullParserFeatureReader(Configuration wfsConfiguration, InputStream getFeatureResponseStream, FeatureType featureType, String axisOrder)PullParserFeatureReader(Configuration wfsConfiguration, InputStream getFeatureResponseStream, FeatureType featureType, String axisOrder, HTTPClient client)Initialise a feature reader with the used http client, to ensure reuse of the configuration.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the parser.FeatureTypegetFeatureType()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.SimpleFeatureparse()voidsetContextCustomizer(ParserHandler.ContextCustomizer contextCustomizer)voidsetGeometryFactory(GeometryFactory geometryFactory)Set the geometry factory.
 
- 
- 
- 
Constructor Detail- 
PullParserFeatureReaderpublic PullParserFeatureReader(Configuration wfsConfiguration, InputStream getFeatureResponseStream, FeatureType featureType, String axisOrder) throws IOException - Throws:
- IOException
 
 - 
PullParserFeatureReaderpublic PullParserFeatureReader(Configuration wfsConfiguration, InputStream getFeatureResponseStream, FeatureType featureType, String axisOrder, HTTPClient client) throws IOException Initialise a feature reader with the used http client, to ensure reuse of the configuration.- Throws:
- IOException
 
 
- 
 - 
Method Detail- 
closepublic void close() throws IOExceptionDescription copied from interface:GetParserClose the parser.- Specified by:
- closein interface- GetParser<SimpleFeature>
- Throws:
- IOException- Throws IOException if there was a problem closing the parser.
- See Also:
- GetParser.close()
 
 - 
parsepublic SimpleFeature parse() throws IOException - Specified by:
- parsein interface- GetParser<SimpleFeature>
- Returns:
- the next feature in the stream or nullif there are no more features to parse.
- Throws:
- IOException
- See Also:
- GetParser.parse()
 
 - 
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<SimpleFeature>
- Returns:
- number of features advertised by server, or -1if unknown
- See Also:
- GetParser.getNumberOfFeatures()
 
 - 
getFeatureTypepublic FeatureType getFeatureType() Description copied from interface:GetParserGet the feature type that the parser is targeting.- Specified by:
- getFeatureTypein interface- GetParser<SimpleFeature>
- Returns:
- The feature type that the parser is targeting.
 
 - 
setGeometryFactorypublic void setGeometryFactory(GeometryFactory geometryFactory) Description copied from interface:GetParserSet the geometry factory.- Specified by:
- setGeometryFactoryin interface- GetParser<SimpleFeature>
- Parameters:
- geometryFactory- The geometry factory to use.
 
 - 
setContextCustomizerpublic void setContextCustomizer(ParserHandler.ContextCustomizer contextCustomizer) 
 
- 
 
-