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

java.lang.Object
  extended by org.geotools.data.wfs.v1_1_0.parsers.XmlSimpleFeatureParser
All Implemented Interfaces:
GetFeatureParser

public class XmlSimpleFeatureParser
extends java.lang.Object
implements GetFeatureParser

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

Since:
2.5.x
Version:
$Id: XmlSimpleFeatureParser.java 31888 2008-11-20 13:34:53Z groldan $
Author:
Gabriel Roldan (TOPP)

Constructor Summary
XmlSimpleFeatureParser(java.io.InputStream getFeatureResponseStream, org.opengis.feature.simple.SimpleFeatureType targetType, javax.xml.namespace.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.
 org.opengis.feature.simple.SimpleFeature parse()
           
 java.lang.Object parse(WFSProtocol wfs, WFSResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSimpleFeatureParser

public XmlSimpleFeatureParser(java.io.InputStream getFeatureResponseStream,
                              org.opengis.feature.simple.SimpleFeatureType targetType,
                              javax.xml.namespace.QName featureDescriptorName)
                       throws java.io.IOException
Throws:
java.io.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 java.io.IOException
Specified by:
close in interface GetFeatureParser
Throws:
java.io.IOException

parse

public org.opengis.feature.simple.SimpleFeature parse()
                                               throws java.io.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:
java.io.IOException

parse

public java.lang.Object parse(WFSProtocol wfs,
                              WFSResponse response)


Copyright © 1996-2010 Geotools. All Rights Reserved.