org.geotools.data.wfs.v1_1_0.parsers
Class XmlSimpleFeatureParser

Object
  extended by XmlSimpleFeatureParser
All Implemented Interfaces:
GetFeatureParser

public class XmlSimpleFeatureParser
extends Object
implements GetFeatureParser

A GetFeatureParser implementation that uses plain xml pull to parse a GetFeature response.

Since:
2.5.x
Author:
Gabriel Roldan (TOPP)
Module:

Constructor Summary
XmlSimpleFeatureParser(InputStream getFeatureResponseStream, SimpleFeatureType targetType, QName featureDescriptorName)
           
 
Method Summary
 void close()
           
 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()
           
 Object parse(WFSProtocol wfs, WFSResponse response)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSimpleFeatureParser

public XmlSimpleFeatureParser(InputStream getFeatureResponseStream,
                              SimpleFeatureType targetType,
                              QName featureDescriptorName)
                       throws IOException
Throws:
IOException
Method Detail

getNumberOfFeatures

public int getNumberOfFeatures()
Description copied from interface: GetFeatureParser
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.

Specified by:
getNumberOfFeatures in interface GetFeatureParser
Returns:
number of features advertised by server, or -1 if unknown

close

public void close()
           throws IOException
Specified by:
close in interface GetFeatureParser
Throws:
IOException

parse

public SimpleFeature parse()
                    throws IOException
Specified by:
parse in interface GetFeatureParser
Returns:
the next feature in the stream or null if there are no more features to parse.
Throws:
IOException

parse

public Object parse(WFSProtocol wfs,
                    WFSResponse response)


Copyright © 1996-2009 Geotools. All Rights Reserved.