|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.AbstractDataStore org.geotools.data.wfs.WFSDataStore
DOCUMENT ME!
Field Summary | |
protected java.net.Authenticator |
auth
|
protected static int |
AUTO_PROTOCOL
|
protected WFSCapabilities |
capabilities
|
protected static int |
GET_PROTOCOL
|
protected static int |
POST_PROTOCOL
|
protected int |
protocol
|
Fields inherited from class org.geotools.data.AbstractDataStore |
isWriteable, listenerManager, LOGGER |
Constructor Summary | |
protected |
WFSDataStore(java.net.URL host,
java.lang.Boolean protocol,
java.lang.String username,
java.lang.String password,
int timeout,
int buffer)
Construct WFSDataStore . |
Method Summary | |
protected static java.net.URL |
createGetCapabilitiesRequest(java.net.URL host)
|
protected com.vividsolutions.jts.geom.Envelope |
getBounds(Query query)
Computes the bounds of the features for the specified feature type that satisfy the query provided that there is a fast way to get that result. |
protected static java.net.HttpURLConnection |
getConnection(java.net.URL url,
java.net.Authenticator auth,
boolean isPost)
|
FeatureReader |
getFeatureReader(Query query,
Transaction transaction)
Access a FeatureReader providing access to Feature information. |
protected FeatureReader |
getFeatureReader(java.lang.String typeName)
Subclass must implement. |
protected FeatureReader |
getFeatureReader(java.lang.String typeName,
Query query)
GR: this method is called from inside getFeatureReader(Query ,Transaction ) to allow subclasses return an optimized FeatureReader wich supports the filter and attributes truncation specified in query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. |
protected WFSFeatureReader |
getFeatureReaderGet(Query request,
Transaction transaction)
|
protected WFSFeatureReader |
getFeatureReaderPost(Query query,
Transaction transaction)
|
FeatureSource |
getFeatureSource(java.lang.String typeName)
Default implementation based on getFeatureReader and getFeatureWriter. |
FeatureType |
getSchema(java.lang.String typeName)
DOCUMENT ME! |
protected FeatureType |
getSchemaGet(java.lang.String typeName)
|
protected FeatureType |
getSchemaPost(java.lang.String typeName)
|
java.lang.String[] |
getTypeNames()
Convience method for retriving all the names from the Catalog Entires |
protected Filter |
getUnsupportedFilter(java.lang.String typeName,
Filter filter)
GR: if a subclass supports filtering, it should override this method to return the unsupported part of the passed filter, so a FilteringFeatureReader will be constructed upon it. |
Methods inherited from class org.geotools.data.AbstractDataStore |
createFeatureWriter, createLockingManager, createMetadata, createSchema, getCount, getFeatureWriter, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getLockingManager, getView, updateSchema |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected WFSCapabilities capabilities
protected static final int AUTO_PROTOCOL
protected static final int POST_PROTOCOL
protected static final int GET_PROTOCOL
protected int protocol
protected java.net.Authenticator auth
Constructor Detail |
protected WFSDataStore(java.net.URL host, java.lang.Boolean protocol, java.lang.String username, java.lang.String password, int timeout, int buffer) throws org.xml.sax.SAXException, java.io.IOException
WFSDataStore
.
host
- - may not yet be a capabilities urlprotocol
- - true,false,null (post,get,auto)username
- - iff passwordpassword
- - iff usernametimeout
- - default 3000 (ms)buffer
- - default 10 (features)
org.xml.sax.SAXException
java.io.IOException
Method Detail |
protected static java.net.HttpURLConnection getConnection(java.net.URL url, java.net.Authenticator auth, boolean isPost) throws java.io.IOException
java.io.IOException
protected static java.net.URL createGetCapabilitiesRequest(java.net.URL host)
public java.lang.String[] getTypeNames()
AbstractDataStore
getTypeNames
in interface DataStore
getTypeNames
in class AbstractDataStore
AbstractDataStore.getTypeNames()
public FeatureType getSchema(java.lang.String typeName) throws java.io.IOException
getSchema
in interface DataStore
getSchema
in class AbstractDataStore
typeName
- DOCUMENT ME!
java.io.IOException
AbstractDataStore.getSchema(java.lang.String)
protected FeatureType getSchemaGet(java.lang.String typeName) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
protected FeatureType getSchemaPost(java.lang.String typeName) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
protected WFSFeatureReader getFeatureReaderGet(Query request, Transaction transaction) throws java.io.UnsupportedEncodingException, java.io.IOException, org.xml.sax.SAXException
java.io.UnsupportedEncodingException
java.io.IOException
org.xml.sax.SAXException
protected WFSFeatureReader getFeatureReaderPost(Query query, Transaction transaction) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
protected FeatureReader getFeatureReader(java.lang.String typeName) throws java.io.IOException
AbstractDataStore
getFeatureReader
in class AbstractDataStore
typeName
-
java.io.IOException
protected FeatureReader getFeatureReader(java.lang.String typeName, Query query) throws java.io.IOException
AbstractDataStore
query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. Otherwise, it just returns
getFeatureReader(typeName)
getFeatureReader
in class AbstractDataStore
java.io.IOException
public FeatureReader getFeatureReader(Query query, Transaction transaction) throws java.io.IOException
DataStore
Filter is used as a low-level indication of constraints. (Implementations may resort to using a FilteredFeatureReader, or provide their own optimizations)
FeatureType provides a template for the returned FeatureReader
Transaction to externalize DataStore state on a per Transaction basis. The most common example is a JDBC datastore saving a Connection for use across several FeatureReader requests. Similarly a Shapefile reader may wish to redirect FeatureReader requests to a alternate filename over the course of a Transaction.
Notes For Implementing DataStore
Subclasses may need to retrieve additional attributes, beyond those
requested by featureType.getAttributeTypes(), in order to correctly
apply the filter
.
These Additional attribtues should be not be returned by
FeatureReader. Subclasses may use ReTypeFeatureReader to aid in
acomplishing this.
Helper classes for implementing a FeatureReader (in order):
Sample use (not optimized):
if (filter == Filter.ALL) {
return new EmptyFeatureReader(featureType);
}
String typeName = featureType.getTypeName();
FeatureType schema = getSchema( typeName );
FeatureReader reader = new DefaultFeatureReader( getAttributeReaders(), schema );
if (filter != Filter.NONE) {
reader = new FilteringFeatureReader(reader, filter);
}
if (transaction != Transaction.AUTO_COMMIT) {
Map diff = state(transaction).diff(typeName);
reader = new DiffFeatureReader(reader, diff);
}
if (!featureType.equals(reader.getFeatureType())) {
reader = new ReTypeFeatureReader(reader, featureType);
}
return reader
Locking support does not need to be provided for FeatureReaders.
getFeatureReader
in interface DataStore
getFeatureReader
in class AbstractDataStore
java.io.IOException
DataStore.getFeatureReader(org.geotools.data.Query, org.geotools.data.Transaction)
protected com.vividsolutions.jts.geom.Envelope getBounds(Query query) throws java.io.IOException
AbstractDataStore
Will return null if there is not fast way to compute the bounds. Since it's based on some kind of header/cached information, it's not guaranteed to be real bound of the features
getBounds
in class AbstractDataStore
query
-
java.io.IOException
protected Filter getUnsupportedFilter(java.lang.String typeName, Filter filter)
AbstractDataStore
If the complete filter is supported, the subclass must return Filter.NONE
getUnsupportedFilter
in class AbstractDataStore
AbstractDataStore.getUnsupportedFilter(java.lang.String,
org.geotools.filter.Filter)
public FeatureSource getFeatureSource(java.lang.String typeName) throws java.io.IOException
AbstractDataStore
We should be able to optimize this to only get the RowSet once
getFeatureSource
in interface DataStore
getFeatureSource
in class AbstractDataStore
java.io.IOException
DataStore.getFeatureSource(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |