|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectWFS_1_1_0_DataStore
public final class WFS_1_1_0_DataStore
A WFS 1.1 DataStore implementation.
Note with the current design, this class is meant to be pulled up as the single WFS DataStore
implementation regardless of the WFS version, since the protocol version specifics is meant to be
handled by the WFSProtocol implementation provided to this class. For the time being,
while there are no resources to spend on porting the WFS 1.0.0 datastore to the new design, this
keeps here in this 1.1 specific package.
| Field Summary | |
|---|---|
protected WFSProtocol |
wfs
|
| Fields inherited from interface WFSDataStore |
|---|
AXIS_ORDER_COMPLIANT, AXIS_ORDER_EAST_NORTH, AXIS_ORDER_NORTH_EAST, WFS_VENDOR_PARAMETERS |
| Constructor Summary | |
|---|---|
WFS_1_1_0_DataStore(WFSProtocol wfs)
The WFS capabilities document. |
|
| Method Summary | |
|---|---|
void |
createSchema(SimpleFeatureType featureType)
Creates storage for a new featureType. |
void |
dispose()
Disposes of this data store and releases any resource that it is using. |
String |
getAxisOrderForFilter()
|
String |
getAxisOrderForOutput()
|
ReferencedEnvelope |
getBounds(Query query)
Only returns the bounds of the query (ie, the bounds of the whole feature type) if the query has no filter set, otherwise the bounds may be too expensive to acquire. |
URL |
getCapabilitiesURL()
|
int |
getCount(Query query)
If the query is fully supported, makes a GetFeature request with
resultType=hits and returns the counts returned by the server, otherwise returns
-1 as the result is too expensive to calculate. |
URL |
getDescribeFeatureTypeURL(String typeName)
|
FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(Query query,
Transaction transaction)
Gets a FeatureReader for features selected by the given
Query. |
SimpleFeatureSource |
getFeatureSource(Name typeName)
Gets a SimpleFeatureSource for features of the type
specified by a qualified name (namespace plus type name). |
WFSFeatureSource |
getFeatureSource(String typeName)
Gets a SimpleFeatureSource for features of the specified
type. |
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)
|
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriter(String typeName,
Filter filter,
Transaction transaction)
Not supported. |
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriter(String typeName,
Transaction transaction)
Not supported. |
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriterAppend(String typeName,
Transaction transaction)
Not supported. |
WFSServiceInfo |
getInfo()
Overrides DataAccess.getInfo() so it type narrows to a WFSServiceInfo |
LockingManager |
getLockingManager()
Retrieve a per featureID based locking service from this DataStore. |
Integer |
getMaxFeatures()
|
protected int |
getMaxFeatures(Query query)
|
List<Name> |
getNames()
Names of the available Resources. |
SimpleFeatureType |
getSchema(Name name)
Description of the named resource. |
SimpleFeatureType |
getSchema(String prefixedTypeName)
Makes a DescribeFeatureType request for typeName feature type, parses the
server response into a SimpleFeatureType and returns it. |
String |
getServiceAbstract()
|
Set<String> |
getServiceKeywords()
|
URI |
getServiceProviderUri()
|
String |
getServiceTitle()
|
String |
getServiceVersion()
|
String[] |
getTypeNames()
Gets the names of feature types available in this DataStore. |
static boolean |
invertAxisNeeded(String axisOrder,
CoordinateReferenceSystem crs)
Checks if axis flipping is needed comparing axis order requested for the DataStore with query crs. |
boolean |
isPreferPostOverGet()
|
void |
setAxisOrder(String axisOrderOutput,
String axisOrderFilter)
Configure expected axis order for output and filters. |
void |
setMaxFeatures(Integer maxFeatures)
|
void |
setNamespaceOverride(String namespaceOverride)
|
void |
setPreferPostOverGet(Boolean booleanValue)
|
void |
setUseDefaultSRS(Boolean useDefaultSRS)
|
String |
toString()
|
void |
updateSchema(Name typeName,
SimpleFeatureType featureType)
Used to update a schema in place. |
void |
updateSchema(String typeName,
SimpleFeatureType featureType)
Applies a new schema to the given feature type. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected WFSProtocol wfs
| Constructor Detail |
|---|
public WFS_1_1_0_DataStore(WFSProtocol wfs)
capabilities - | Method Detail |
|---|
public void setAxisOrder(String axisOrderOutput,
String axisOrderFilter)
axisOrder - axisOrderFilter - public String getAxisOrderForOutput()
public String getAxisOrderForFilter()
public void setNamespaceOverride(String namespaceOverride)
setNamespaceOverride in interface WFSDataStoreWFSDataStore.setNamespaceOverride(java.lang.String)public void setMaxFeatures(Integer maxFeatures)
setMaxFeatures in interface WFSDataStoreWFSDataStore.setMaxFeatures(Integer)public Integer getMaxFeatures()
getMaxFeatures in interface WFSDataStoreWFSDataStore.getMaxFeatures()public boolean isPreferPostOverGet()
isPreferPostOverGet in interface WFSDataStoreWFSDataStore.isPreferPostOverGet()public void setPreferPostOverGet(Boolean booleanValue)
setPreferPostOverGet in interface WFSDataStorebooleanValue - Boolean.TRUE to prefer POST over GET, Boolean.FALSE for the opposite, null
for auto (let the implementation decide)WFSDataStore#setPreferPostOverGet(boolean)public WFSServiceInfo getInfo()
WFSDataStoreDataAccess.getInfo() so it type narrows to a WFSServiceInfo
getInfo in interface DataAccess<SimpleFeatureType,SimpleFeature>getInfo in interface WFSDataStoreWFSDataStore.getInfo()
public SimpleFeatureType getSchema(String prefixedTypeName)
throws IOException
DescribeFeatureType request for typeName feature type, parses the
server response into a SimpleFeatureType and returns it.
Due to a current limitation widely spread through the GeoTools library, the parsed
FeatureType will be adapted to share the same name than the Features produced for it. For
example, if the actual feature type name is Streams_Type and the features name (i.e.
which is the FeatureType name as stated in the WFS capabilities document) is Stream,
the returned feature type name will also be Stream.
getSchema in interface DataStoreprefixedTypeName - the type name as stated in the WFS capabilities document
typeName as stated on the capabilities
document.
IOException - if typeName is not availableDataStore.getSchema(java.lang.String)
public SimpleFeatureType getSchema(Name name)
throws IOException
DataAccessThe FeatureType returned describes the contents being published. For additional metadata please review getInfo( Name ).
getSchema in interface DataAccess<SimpleFeatureType,SimpleFeature>name - Type name a the resource from getNames()
IOExceptionDataAccess.getSchema(Name),
getSchema(String)
public List<Name> getNames()
throws IOException
DataAccessFor additional information please see getInfo( Name ) and getSchema( Name ).
getNames in interface DataAccess<SimpleFeatureType,SimpleFeature>IOExceptionDataAccess.getNames()
public String[] getTypeNames()
throws IOException
DataStoreDataStore.
Please note that this is not guaranteed to return a list of unique
names since the same unqualified name may be present in separate
namespaces within the DataStore.
getTypeNames in interface DataStoreDataStore
IOException - if data access errors occurDataStore.getTypeNames()public void dispose()
DataAccess
A DataStore cannot be used after dispose has
been called, neither can any data access object it helped create, such
as FeatureReader, FeatureSource or FeatureCollection.
This operation can be called more than once without side effects.
There is no thread safety assurance associated with this method. For example, client code will have to make sure this method is not called while retrieving/saving data from/to the storage, or be prepared for the consequences.
dispose in interface DataAccess<SimpleFeatureType,SimpleFeature>DataAccess.dispose()
public static boolean invertAxisNeeded(String axisOrder,
CoordinateReferenceSystem crs)
axisOrder - coordinateSystem -
public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(Query query,
Transaction transaction)
throws IOException
DataStoreFeatureReader 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 DataStorequery - 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)
public WFSFeatureSource getFeatureSource(String typeName)
throws IOException
DataStoreSimpleFeatureSource for features of the specified
type. SimpleFeatureSource provides a high-level API for
feature operations.
The resulting SimpleFeatureSource may implment more functionality
as in this example:
SimpleFeatureSource fsource = dataStore.getFeatureSource("roads");
if (fsource instanceof SimpleFeatureStore) {
// we have write access to the feature data
SimpleFeatureStore fstore = (SimpleFeatureStore) fs;
}
else {
System.out.println("We do not have write access to roads");
}
getFeatureSource in interface DataStoretypeName - 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 LockingManager getLockingManager()
DataStoreDataStore.
getLockingManager in interface DataStorenull, no lock support so farDataStore.getLockingManager()
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName,
Filter filter,
Transaction transaction)
throws IOException
getFeatureWriter in interface DataStoretypeName - the type name for features that will be accessiblefilter - defines additional constraints on the features that will
be accessibletransaction - the transation that the returned writer operates
against
FeatureWriter
UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - if data access errors occurDataStore.getFeatureWriter(java.lang.String,
org.opengis.filter.Filter, org.geotools.data.Transaction)
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName,
Transaction transaction)
throws IOException
getFeatureWriter in interface DataStoretypeName - the type name for features that will be accessibletransaction - the transation that the returned writer operates
against
FeatureWriter
UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - if data access errors occurDataStore.getFeatureWriter(java.lang.String,
org.geotools.data.Transaction)
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriterAppend(String typeName,
Transaction transaction)
throws IOException
getFeatureWriterAppend in interface DataStoretypeName - name of the feature type for which features will be addedtransaction - the transaction to operate against
FeatureWriter that can only be used to
append new features
UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - if data access errors occurDataStore.getFeatureWriterAppend(java.lang.String,
org.geotools.data.Transaction)
public SimpleFeatureSource getFeatureSource(Name typeName)
throws IOException
DataStoreSimpleFeatureSource for features of the type
specified by a qualified name (namespace plus type name).
getFeatureSource in interface DataAccess<SimpleFeatureType,SimpleFeature>getFeatureSource in interface DataStoretypeName - 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(org.opengis.feature.type.Name)
public void updateSchema(Name typeName,
SimpleFeatureType featureType)
throws IOException
DataAccessThis functionality is similar to an "alter table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
updateSchema in interface DataAccess<SimpleFeatureType,SimpleFeature>UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - if the operation failedDataAccess.updateSchema(Name, org.opengis.feature.type.FeatureType)
public void updateSchema(String typeName,
SimpleFeatureType featureType)
throws IOException
DataStore
updateSchema in interface DataStoretypeName - name of the feature type to updatefeatureType - the new schema to apply
UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - on errorDataStore.updateSchema(java.lang.String,
org.opengis.feature.simple.SimpleFeatureType)
public void createSchema(SimpleFeatureType featureType)
throws IOException
DataAccessfeatureType.
The provided featureType we be accessable by the typeName
provided by featureType.getTypeName().
createSchema in interface DataAccess<SimpleFeatureType,SimpleFeature>featureType - FetureType to add to DataStore
UnsupportedOperationException - always since this operation does not apply to a WFS backend
IOException - If featureType cannot be createdorg.geotools.data.DataStore#createSchema(org.opengis.feature.simple.SimpleFeatureType)public QName getFeatureTypeName(String typeName)
getFeatureTypeName in interface WFSDataStoreWFSDataStore.getFeatureTypeName(java.lang.String)public String getFeatureTypeTitle(String typeName)
getFeatureTypeTitle in interface WFSDataStoreWFSDataStore.getFeatureTypeTitle(String)public String getFeatureTypeAbstract(String typeName)
getFeatureTypeAbstract in interface WFSDataStoreWFSDataStore.getFeatureTypeAbstract(String)public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName)
getFeatureTypeWGS84Bounds in interface WFSDataStoreWFSDataStore.getFeatureTypeWGS84Bounds(String)public ReferencedEnvelope getFeatureTypeBounds(String typeName)
getFeatureTypeBounds in interface WFSDataStoreWFSDataStore.getFeatureTypeBounds(String)public CoordinateReferenceSystem getFeatureTypeCRS(String typeName)
getFeatureTypeCRS in interface WFSDataStoreDefaultEngineeringCRS.GENERIC_2D is returnedWFSDataStore.getFeatureTypeCRS(String)public Set<String> getFeatureTypeKeywords(String typeName)
getFeatureTypeKeywords in interface WFSDataStoreWFSDataStore.getFeatureTypeKeywords(String)public URL getDescribeFeatureTypeURL(String typeName)
getDescribeFeatureTypeURL in interface WFSDataStoreWFSDataStore.getDescribeFeatureTypeURL(String)public String getServiceAbstract()
getServiceAbstract in interface WFSDataStoreWFSDataStore.getServiceAbstract()public Set<String> getServiceKeywords()
getServiceKeywords in interface WFSDataStoreWFSDataStore.getServiceKeywords()public URI getServiceProviderUri()
getServiceProviderUri in interface WFSDataStoreWFSDataStore.getServiceProviderUri()public URL getCapabilitiesURL()
getCapabilitiesURL in interface WFSDataStoreWFSDataStore.getCapabilitiesURL()public String getServiceTitle()
getServiceTitle in interface WFSDataStoreWFSDataStore#getserviceTitle()public String getServiceVersion()
getServiceVersion in interface WFSDataStoreWFSDataStore.getServiceVersion()
public ReferencedEnvelope getBounds(Query query)
throws IOException
query -
null
if unknown and too expensive for the method to calculate or any errors occur.
IOException
public int getCount(Query query)
throws IOException
GetFeature request with
resultType=hits and returns the counts returned by the server, otherwise returns
-1 as the result is too expensive to calculate.
query -
-1 if not supported
IOExceptionpublic String toString()
toString in class Objectprotected int getMaxFeatures(Query query)
public void setUseDefaultSRS(Boolean useDefaultSRS)
setUseDefaultSRS in interface WFSDataStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||