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 Type
    Method
    Description
    void
    Close the parser.
    Get the feature type that the parser is targeting.
    int
    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.
     
    void
    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 the wfs:FeatureCollection "numberOfFeatures" xml attribute, or -1 if unknown.
      Returns:
      number of features advertised by server, or -1 if unknown
    • parse

      F parse() throws IOException
      Returns:
      the next feature in the stream or null if there are no more features to parse.
      Throws:
      IOException
    • close

      void close() throws IOException
      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

      void setGeometryFactory(GeometryFactory geometryFactory)
      Set the geometry factory.
      Parameters:
      geometryFactory - The geometry factory to use.