org.geotools.data.wfs.v1_0_0
Class MapServerWFSStrategy

Object
  extended by MapServerWFSStrategy

public class MapServerWFSStrategy
extends Object

This strategy addresses a bug in most MapServer implementations where a filter is required in order for all the features to be returned. So if the Filter is Filter.NONE or Query.ALL then a BBox Filter is constructed that is the entire layer.

Since:
1.1.0
Author:
Jesse

Nested Class Summary
protected  class MapServerWFSStrategy.MapServerWFSFeatureReader
           
 
Field Summary
protected static Integer COMPLIANCE_LEVEL
          This just splits fid filters from non-fid filters.
protected  WFS_1_0_0_DataStore store
           
 
Constructor Summary
MapServerWFSStrategy(WFS_1_0_0_DataStore store)
           
MapServerWFSStrategy(WFS_1_0_0_DataStore store, Integer filterCompliance)
           
 
Method Summary
protected  FeatureReader<SimpleFeatureType,SimpleFeature> applyReprojectionDecorator(FeatureReader<SimpleFeatureType,SimpleFeature> reader, Query query, CoordinateReferenceSystem dataCRS)
           
protected  CoordinateReferenceSystem correctFilterForServer(String typeName, Filter serverFilter)
          Using the provided query; obtain a FeatureSetDescriptor and modify the provided serverFilter to be correct.
protected  FeatureReader<SimpleFeatureType,SimpleFeature> createFeatureReader(Transaction transaction, Query query)
           
protected  NonStrictWFSStrategy.Data createFeatureReaderGET(Query query, Transaction transaction)
           
protected  NonStrictWFSStrategy.Data createFeatureReaderPOST(Query query, Transaction transaction)
           
 FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query, Transaction transaction)
           
 FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query2, Transaction transaction)
           
protected  boolean isStrict()
          If we are being exacting about folowing the WFS Capabilities.
protected  FeatureReader<SimpleFeatureType,SimpleFeature> wrapWithFilteringFeatureReader(Filter postFilter, FeatureReader<SimpleFeatureType,SimpleFeature> reader, Filter processedFilter)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLIANCE_LEVEL

protected static final Integer COMPLIANCE_LEVEL
This just splits fid filters from non-fid filters. The StrictFeatureReader is what does the rest of the compliance to high compliance.


store

protected WFS_1_0_0_DataStore store
Constructor Detail

MapServerWFSStrategy

public MapServerWFSStrategy(WFS_1_0_0_DataStore store)

MapServerWFSStrategy

public MapServerWFSStrategy(WFS_1_0_0_DataStore store,
                            Integer filterCompliance)
Method Detail

createFeatureReader

protected FeatureReader<SimpleFeatureType,SimpleFeature> createFeatureReader(Transaction transaction,
                                                                             Query query)
                                                                      throws IOException
Throws:
IOException

getFeatureReader

public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query,
                                                                       Transaction transaction)
                                                                throws IOException
Throws:
IOException

wrapWithFilteringFeatureReader

protected FeatureReader<SimpleFeatureType,SimpleFeature> wrapWithFilteringFeatureReader(Filter postFilter,
                                                                                        FeatureReader<SimpleFeatureType,SimpleFeature> reader,
                                                                                        Filter processedFilter)

correctFilterForServer

protected CoordinateReferenceSystem correctFilterForServer(String typeName,
                                                           Filter serverFilter)
Using the provided query; obtain a FeatureSetDescriptor and modify the provided serverFilter to be correct.

If we are being strict the implementation may also clip any geometry or bbox to the valid bounds advertised as valid by the server (or by the data CRS).

Returns:
CoordinateReferenceSystem to use when making the request (usually the data CRS for a WFS 1.0 Datastore)

getFeatureReader

public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query2,
                                                                       Transaction transaction)
                                                                throws IOException
Throws:
IOException

createFeatureReaderPOST

protected NonStrictWFSStrategy.Data createFeatureReaderPOST(Query query,
                                                            Transaction transaction)

createFeatureReaderGET

protected NonStrictWFSStrategy.Data createFeatureReaderGET(Query query,
                                                           Transaction transaction)

applyReprojectionDecorator

protected FeatureReader<SimpleFeatureType,SimpleFeature> applyReprojectionDecorator(FeatureReader<SimpleFeatureType,SimpleFeature> reader,
                                                                                    Query query,
                                                                                    CoordinateReferenceSystem dataCRS)

isStrict

protected boolean isStrict()
If we are being exacting about folowing the WFS Capabilities.

Returns:
true if we are being exacting about following the WFS Capabilities


Copyright © 1996-2014 Geotools. All Rights Reserved.