Package org.geotools.data.wfs.internal
Interface GetParser<F extends Feature>
- All Known Implementing Classes:
PullParserFeatureReader,XmlComplexFeatureParser,XmlFeatureParser,XmlSimpleFeatureParser
public interface GetParser<F extends Feature>
Interface to return appropriate feature parser.
- Author:
- Adam Brown (Curtin University of Technology)
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the parser.Get the feature type that the parser is targeting.intReturns 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.parse()voidsetGeometryFactory(GeometryFactory geometryFactory) Set the geometry factory.
-
Method Details
-
getNumberOfFeatures
int getNumberOfFeatures()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.- Returns:
- number of features advertised by server, or
-1if unknown
-
parse
- Returns:
- the next feature in the stream or
nullif there are no more features to parse. - Throws:
IOException
-
close
Close the parser.- Throws:
IOException- Throws IOException if there was a problem closing the parser.
-
getFeatureType
FeatureType getFeatureType()Get the feature type that the parser is targeting.- Returns:
- The feature type that the parser is targeting.
-
setGeometryFactory
Set the geometry factory.- Parameters:
geometryFactory- The geometry factory to use.
-