|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractDataStore
WFS_1_0_0_DataStore
public class WFS_1_0_0_DataStore
DataStore used for connecting to 1.0.0 protocol.
Please note this datastore uses the first version of the GTXML parsing / encoding technology and may be a bit difficult to follow as a result.
Field Summary | |
---|---|
protected WFSCapabilities |
capabilities
|
static Logger |
LOGGER
|
protected HttpMethod |
preferredProtocol
|
protected WFSStrategy |
strategy
|
Fields inherited from class AbstractDataStore |
---|
isWriteable, listenerManager |
Fields inherited from interface WFSDataStore |
---|
AXIS_ORDER_COMPLIANT, AXIS_ORDER_EAST_NORTH, AXIS_ORDER_NORTH_EAST, WFS_VENDOR_PARAMETERS |
Constructor Summary | |
---|---|
WFS_1_0_0_DataStore(HttpMethod protocol,
WFS100ProtocolHandler protocolHandler,
int timeout,
int buffer,
boolean lenient)
Construct WFSDataStore . |
|
WFS_1_0_0_DataStore(HttpMethod protocol,
WFS100ProtocolHandler protocolHandler,
int timeout,
int buffer,
boolean lenient,
String wfsStrategy,
Integer filterCompliance)
Construct WFSDataStore . |
Method Summary | |
---|---|
void |
addFidMapping(String original,
String finalFid)
Adds a new fid mapping to the fid map. |
protected ReferencedEnvelope |
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. |
WFSCapabilities |
getCapabilities()
|
URL |
getCapabilitiesURL()
|
String |
getDefaultEncoding()
|
URL |
getDescribeFeatureTypeURL(String typeName)
|
FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(Query query,
Transaction transaction)
Gets a FeatureReader for features selected by the given
Query . |
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(String typeName)
Subclass must implement. |
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(String typeName,
Query query)
GR: this method is called from inside getFeatureReader(Query ,Transaction ) to allow subclasses return an optimized FeatureReader query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. |
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReaderGet(Query request,
Transaction transaction)
|
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReaderPost(Query query,
Transaction transaction)
|
SimpleFeatureSource |
getFeatureSource(Name typeName)
Delegates to AbstractDataStore.getFeatureSource(String) with
name.getLocalPart() |
WFSFeatureSource |
getFeatureSource(String typeName)
Default implementation based on getFeatureReader and getFeatureWriter. |
String |
getFeatureTypeAbstract(String typeName)
|
ReferencedEnvelope |
getFeatureTypeBounds(String typeName)
|
CoordinateReferenceSystem |
getFeatureTypeCRS(String typeName)
|
Set<String> |
getFeatureTypeKeywords(String typeName)
|
QName |
getFeatureTypeName(String typeName)
|
String |
getFeatureTypeTitle(String typeName)
|
ReferencedEnvelope |
getFeatureTypeWGS84Bounds(String typeName)
|
WFSServiceInfo |
getInfo()
Information about this service. |
Integer |
getMaxFeatures()
|
List<Name> |
getNames()
Returns the same list of names than AbstractDataStore.getTypeNames() meaning the
returned Names have no namespace set. |
SimpleFeatureType |
getSchema(Name name)
Delegates to AbstractDataStore.getSchema(String) with name.getLocalPart() |
SimpleFeatureType |
getSchema(String typeName)
DOCUMENT ME! |
protected SimpleFeatureType |
getSchemaGet(String typeName)
|
protected SimpleFeatureType |
getSchemaPost(String typeName)
|
String |
getServiceAbstract()
|
Set<String> |
getServiceKeywords()
|
URI |
getServiceProviderUri()
|
String |
getServiceTitle()
|
String |
getServiceVersion()
|
String[] |
getTypeNames()
helper method for retrieving all the names. |
protected Filter |
getUnsupportedFilter(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. |
boolean |
isPreferPostOverGet()
|
Filter |
processFilter(Filter filter)
Runs UpdateFidFilterVisitor on the filter and returns the result as long as transaction is
not AUTO_COMMIT or null. |
void |
removeSchema(Name typeName)
Used to permanently remove a schema from the underlying storage This functionality is similar to an "drop table" statement in SQL. |
void |
removeSchema(String typeName)
Used to permanently remove a schema from the underlying storage This functionality is similar to an "drop table" statement in SQL. |
void |
setMaxFeatures(Integer maxFeatures)
|
void |
setNamespaceOverride(String namespaceOverride)
|
void |
setPreferPostOverGet(Boolean booleanValue)
|
void |
setUseDefaultSRS(Boolean useDefaultSRS)
|
protected Filter[] |
splitFilters(Query q,
Transaction t)
|
void |
updateSchema(Name typeName,
SimpleFeatureType featureType)
Delegates to AbstractDataStore.updateSchema(String, SimpleFeatureType) with
name.getLocalPart() |
Methods inherited from class AbstractDataStore |
---|
createFeatureWriter, createLockingManager, createMetadata, createSchema, dispose, getCount, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getLockingManager, getSupportedHints, state, updateSchema |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface DataStore |
---|
getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getLockingManager, updateSchema |
Methods inherited from interface DataAccess |
---|
createSchema, dispose |
Field Detail |
---|
public static final Logger LOGGER
protected WFSCapabilities capabilities
protected HttpMethod preferredProtocol
protected WFSStrategy strategy
Constructor Detail |
---|
public WFS_1_0_0_DataStore(HttpMethod protocol, WFS100ProtocolHandler protocolHandler, int timeout, int buffer, boolean lenient) throws SAXException, 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)tryGZIP
- - indicates to use GZIP if server supports it.lenient
- - if true the parsing will be very forgiving to bad data. Errors will be logged
rather than exceptions.
SAXException
IOException
public WFS_1_0_0_DataStore(HttpMethod protocol, WFS100ProtocolHandler protocolHandler, int timeout, int buffer, boolean lenient, String wfsStrategy, Integer filterCompliance) throws SAXException, 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)tryGZIP
- - indicates to use GZIP if server supports it.lenient
- - if true the parsing will be very forgiving to bad data. Errors will be logged
rather than exceptions.wfsStrategy
- - "mapserver", "geoserver", "strict" and "nonstrict:filterCompliance
- - filter compliance level
*
SAXException
IOException
Method Detail |
---|
public String getDefaultEncoding()
public WFSServiceInfo getInfo()
DataAccess
This method offers access to a summary of header or metadata information describing the service.
Subclasses may return a specific ServiceInfo instance that has additional information (such as FilterCapabilities).
getInfo
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getInfo
in interface WFSDataStore
getInfo
in class AbstractDataStore
DataAccess.getInfo()
public String[] getTypeNames()
AbstractDataStore
getTypeNames
in interface DataStore
getTypeNames
in class AbstractDataStore
DataStore
AbstractDataStore.getTypeNames()
public SimpleFeatureType getSchema(String typeName) throws IOException
getSchema
in interface DataStore
getSchema
in class AbstractDataStore
typeName
- DOCUMENT ME!
IOException
AbstractDataStore.getSchema(java.lang.String)
protected SimpleFeatureType getSchemaGet(String typeName) throws SAXException, IOException
SAXException
IOException
protected SimpleFeatureType getSchemaPost(String typeName) throws IOException, SAXException
IOException
SAXException
protected FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReaderGet(Query request, Transaction transaction) throws UnsupportedEncodingException, IOException, SAXException
UnsupportedEncodingException
IOException
SAXException
protected FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReaderPost(Query query, Transaction transaction) throws SAXException, IOException
SAXException
IOException
protected FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(String typeName) throws IOException
AbstractDataStore
getFeatureReader
in class AbstractDataStore
IOException
protected FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(String typeName, Query query) throws 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
IOException
public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query, Transaction transaction) throws IOException
DataStore
FeatureReader
for features selected by the given
Query
. FeatureReader
provies an iterator-style
API to feature data.
The Query
provides the schema for the form of the returned
features as well as a Filter
to constrain the features
available via the reader.
The Transaction
can be used to externalize the state of the
DataStore
. Examples of this include a JDBCDataStore
sharing a connection for use across several FeatureReader
requests;
and a ShapefileDataStore
redirecting requests to an alternate file
during the course of a Transaction
.
getFeatureReader
in interface DataStore
getFeatureReader
in class AbstractDataStore
query
- a query providing the schema and constraints for
features that the reader will returntransaction
- a transaction that this reader will operate against
FeatureReader
IOException
- if data access errors occurDataStore.getFeatureReader(org.geotools.data.Query,
org.geotools.data.Transaction)
protected ReferencedEnvelope getBounds(Query query) throws 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
SchemaNotFoundException
IOException
protected Filter[] splitFilters(Query q, Transaction t) throws IOException
IOException
protected Filter getUnsupportedFilter(String typeName, Filter filter)
AbstractDataStore
If the complete filter is supported, the subclass must return Filter.INCLUDE
getUnsupportedFilter
in class AbstractDataStore
org.geotools.data.AbstractDataStore#getUnsupportedFilter(java.lang.String,
org.geotools.filter.Filter)
public WFSFeatureSource getFeatureSource(String typeName) throws IOException
AbstractDataStore
We should be able to optimize this to only get the RowSet once
getFeatureSource
in interface DataStore
getFeatureSource
in class AbstractDataStore
typeName
- the feature type
SimpleFeatureSource
(or possibly a subclass) providing
operations for features of the specified type
IOException
- if data access errors occurDataStore.getFeatureSource(java.lang.String)
public Filter processFilter(Filter filter)
UpdateFidFilterVisitor
on the filter and returns the result as long as transaction is
not AUTO_COMMIT or null.
filter
- filter to process.
UpdateFidFilterVisitor
on the filter and returns the result as long as
transaction is not AUTO_COMMIT or null.public void addFidMapping(String original, String finalFid)
original
- the before fidfinalFid
- the final fid;public WFSCapabilities getCapabilities()
public SimpleFeatureSource getFeatureSource(Name typeName) throws IOException
AbstractDataStore
AbstractDataStore.getFeatureSource(String)
with
name.getLocalPart()
getFeatureSource
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getFeatureSource
in interface DataStore
getFeatureSource
in class AbstractDataStore
typeName
- the qualified name of the feature type
SimpleFeatureSource
(or possibly a subclass) providing
operations for features of the specified type
IOException
- if data access errors occurDataAccess.getFeatureSource(Name)
public List<Name> getNames() throws IOException
AbstractDataStore
AbstractDataStore.getTypeNames()
meaning the
returned Names have no namespace set.
getNames
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getNames
in class AbstractDataStore
IOException
DataAccess.getNames()
public SimpleFeatureType getSchema(Name name) throws IOException
AbstractDataStore
AbstractDataStore.getSchema(String)
with name.getLocalPart()
getSchema
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getSchema
in class AbstractDataStore
name
- Type name a the resource from getNames()
IOException
DataAccess.getSchema(Name)
public void updateSchema(Name typeName, SimpleFeatureType featureType) throws IOException
AbstractDataStore
AbstractDataStore.updateSchema(String, SimpleFeatureType)
with
name.getLocalPart()
updateSchema
in interface DataAccess<SimpleFeatureType,SimpleFeature>
updateSchema
in class AbstractDataStore
IOException
- if the operation failedDataAccess.getFeatureSource(Name)
public URL getDescribeFeatureTypeURL(String typeName)
getDescribeFeatureTypeURL
in interface WFSDataStore
WFSDataStore.getDescribeFeatureTypeURL(String)
public String getFeatureTypeAbstract(String typeName)
getFeatureTypeAbstract
in interface WFSDataStore
WFSDataStore.getFeatureTypeBounds(String)
public ReferencedEnvelope getFeatureTypeBounds(String typeName)
getFeatureTypeBounds
in interface WFSDataStore
WFSDataStore.getFeatureTypeBounds(String)
public CoordinateReferenceSystem getFeatureTypeCRS(String typeName)
getFeatureTypeCRS
in interface WFSDataStore
WFSDataStore.getFeatureTypeCRS(String)
public Set<String> getFeatureTypeKeywords(String typeName)
getFeatureTypeKeywords
in interface WFSDataStore
WFSDataStore#
public String getFeatureTypeTitle(String typeName)
getFeatureTypeTitle
in interface WFSDataStore
WFSDataStore.getFeatureTypeTitle(String)
public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName)
getFeatureTypeWGS84Bounds
in interface WFSDataStore
WFSDataStore.getFeatureTypeWGS84Bounds(String)
public void setMaxFeatures(Integer maxFeatures)
setMaxFeatures
in interface WFSDataStore
public URL getCapabilitiesURL()
getCapabilitiesURL
in interface WFSDataStore
public QName getFeatureTypeName(String typeName)
getFeatureTypeName
in interface WFSDataStore
public Integer getMaxFeatures()
getMaxFeatures
in interface WFSDataStore
public String getServiceAbstract()
getServiceAbstract
in interface WFSDataStore
public Set<String> getServiceKeywords()
getServiceKeywords
in interface WFSDataStore
public URI getServiceProviderUri()
getServiceProviderUri
in interface WFSDataStore
public String getServiceTitle()
getServiceTitle
in interface WFSDataStore
public String getServiceVersion()
getServiceVersion
in interface WFSDataStore
public boolean isPreferPostOverGet()
isPreferPostOverGet
in interface WFSDataStore
public void setPreferPostOverGet(Boolean booleanValue)
setPreferPostOverGet
in interface WFSDataStore
booleanValue
- Boolean.TRUE to prefer POST over GET, Boolean.FALSE for the opposite, null
for auto (let the implementation decide)public void setNamespaceOverride(String namespaceOverride)
setNamespaceOverride
in interface WFSDataStore
WFSDataStore.setNamespaceOverride(java.lang.String)
public void setUseDefaultSRS(Boolean useDefaultSRS)
setUseDefaultSRS
in interface WFSDataStore
public void removeSchema(String typeName) throws IOException
DataStore
This functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
removeSchema
in interface DataStore
removeSchema
in class AbstractDataStore
IOException
- if the operation failedDataStore.removeSchema(String)
public void removeSchema(Name typeName) throws IOException
DataAccess
This functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
removeSchema
in interface DataAccess<SimpleFeatureType,SimpleFeature>
removeSchema
in class AbstractDataStore
IOException
- if the operation failedDataAccess.removeSchema(Name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |