| java.lang.Object org.geotools.data.AbstractDataStore org.geotools.arcsde.data.ArcSDEDataStore
ArcSDEDataStore | public class ArcSDEDataStore extends AbstractDataStore (Code) | | Implements a DataStore to work upon an ArcSDE spatial database gateway.
String[] getTypeNames() FeatureType getSchema(String typeName) FeatureReader
getFeatureReader( typeName ) FeatureWriter getFeatureWriter( typeName )
Filter getUnsupportedFilter(String typeName, Filter filter) FeatureReader
getFeatureReader(String typeName, Query query)
All remaining functionality is implemented against these methods, including
Transaction and Locking Support. These implementations will not be optimal
but they will work.
author: Gabriel Roldan, Axios Engineering version: $Id: ArcSDEDataStore.java 27863 2007-11-12 20:34:34Z desruisseaux $ |
Method Summary | |
public void | createSchema(FeatureType schema) Pass-through to the createSchema method with a config keyword. | public void | createSchema(FeatureType featureType, Map hints) Creates the given featuretype in the underlying ArcSDE database.
The common use case to create an ArcSDE layer is to setup the SeTable
object with all the non-geometry attributes first, then create the
SeLayer and set the geometry column name and its properties. | protected 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.
Will return null if there is not fast way to compute the bounds. | public ArcSDEConnectionPool | getConnectionPool() | protected int | getCount(Query query) Gets the number of the features that would be returned by this query for
the specified feature type.
If getBounds(Query) returns -1 due to expense consider
using getFeatures(Query).getCount() as a an alternative.
Parameters: query - Contains the Filter and MaxFeatures to find the bounds for. | protected FeatureReader | getFeatureReader(String typeName) | protected FeatureReader | getFeatureReader(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 FeatureWriter | getFeatureWriter(String typeName) | public FeatureWriter | getFeatureWriter(String typeName, Transaction transaction) Provides a writer that iterates over all of the features. | public FeatureWriter | getFeatureWriter(String typeName, Filter filter, Transaction transaction) | public FeatureWriter | getFeatureWriterAppend(String typeName, Transaction transaction) Provides a FeatureWriter in an appropriate state for
immediately adding new Feature instances to the specified
layer. | public String | getNamespace() | public synchronized FeatureType | getSchema(String typeName) Obtains the schema for the given featuretype name.
Just for convenience, if the type name is not full qualified, it will be
prepended by the "<DATABASE_NAME>.<USER_NAME>." string.
Anyway, it is strongly recommended that you use only full
qualified type names. | public String[] | getTypeNames() DOCUMENT ME!
the list of full qualified feature class names on the ArcSDEdatabase this DataStore works on. | protected org.opengis.filter.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. | public SeQueryInfo | getViewQueryInfo(String typeName) | public PlainSelect | getViewSelectStatement(String typeName) | public boolean | isView(String typeName) Returns wether typeName refers to a FeatureType registered
as an in-process view through
ArcSDEDataStore.registerView(String,PlainSelect) . | public void | registerView(String typeName, PlainSelect select) |
ArcSDEDataStore | public ArcSDEDataStore(ArcSDEConnectionPool connectionPool)(Code) | | Creates a new ArcSDEDataStore object.
Parameters: connectionPool - DOCUMENT ME! |
ArcSDEDataStore | public ArcSDEDataStore(ArcSDEConnectionPool connectionPool, String nsUri)(Code) | | Parameters: connectionPool - datastore's connection pool. Not null. Parameters: nsUri - datastore's namespace. May be null. |
createSchema | public void createSchema(FeatureType featureType, Map hints) throws IOException, IllegalArgumentException(Code) | | Creates the given featuretype in the underlying ArcSDE database.
The common use case to create an ArcSDE layer is to setup the SeTable
object with all the non-geometry attributes first, then create the
SeLayer and set the geometry column name and its properties. This
approach brings a nice problem, since we need to create the attributes in
exactly the same order as specified in the passed FeatureType, which
means that the geometry attribute needs not to be the last one.
To avoid this, the following workaround is performed: instead of creating
the schema as described above, we will first create the SeTable with a
single, temporary column, since it is not possible to create a table
without columns. The, we will iterate over the AttributeTypes and add
them as they appear using
SeTable.addColumn(SeColumnDefinition) . But if we found
that the current AttributeType is geometric, instead of adding the column
we just create the SeLayer object. This way, the geometric attribute is
inserted at the end, and then we keep iterating and adding the rest of
the columns. Finally, the first column is removed, since it was temporary
(note that I advertise it, it is a _workaround_).
Sometimes some 'extra' information is required to correctly create the
underlying ArcSDE SeLayer. For instance, a specific configuration keyword
might be required to be used (instead of "DEFAULTS"), or a particular
column might need to be marked as the rowid column for the featuretype.
A non-null hints parameter contains a mapping from a list
of well-known
java.lang.String keys to values. The possible keys
are listed in the table below. keys with any other values are ignored.
key name |
key value type |
default value (if applicable) |
configuration.keyword |
java.lang.String |
"DEFAULTS" |
rowid.column.type |
java.lang.String - "NONE", "USER" and "SDE" are the only
valid values |
"NONE" |
rowid.column.name |
java.lang.String |
null |
Parameters: featureType - the feature type containing the name, attributes andcoordinate reference system of the new ArcSDE layer. Parameters: hints - A map containing extra ArcSDE-specific hints about how tocreate the underlying ArcSDE SeLayer and SeTable objects fromthis FeatureType. throws: IOException - see throws DataSourceException bellow throws: IllegalArgumentException - if the passed feature type does not contains at least onegeometric attribute, or if the type name contains '.' (dots). throws: NullPointerException - if featureType is null throws: DataSourceException - if there is not an available (free) connection to theArcSDE instance(in that case maybe you need to increase themaximun number of connections for the connection pool), or anSeException exception is catched while creating the featuretype at the ArcSDE instance (e.g. a table with that namealready exists).
getBounds | protected Envelope getBounds(Query query) throws IOException(Code) | | 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.
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
Parameters: query - the bounds, or null if too expensive throws: IOException - |
getCount | protected int getCount(Query query) throws IOException(Code) | | Gets the number of the features that would be returned by this query for
the specified feature type.
If getBounds(Query) returns -1 due to expense consider
using getFeatures(Query).getCount() as a an alternative.
Parameters: query - Contains the Filter and MaxFeatures to find the bounds for. The number of Features provided by the Query or -1 if count is too expensive to calculate or any errors or occur. throws: IOException - if there are errors getting the count |
getFeatureReader | protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code) | | 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. Otherwise, it just returns
getFeatureReader(typeName)
Parameters: typeName - DOCUMENT ME! Parameters: query - DOCUMENT ME! DOCUMENT ME! throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
getFeatureWriterAppend | public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code) | | Provides a FeatureWriter in an appropriate state for
immediately adding new Feature instances to the specified
layer.
Parameters: typeName - Parameters: transaction - FeatureWriter whose hasNext() call will return false. throws: IOException - DOCUMENT ME! |
getSchema | public synchronized FeatureType getSchema(String typeName) throws java.io.IOException(Code) | | Obtains the schema for the given featuretype name.
Just for convenience, if the type name is not full qualified, it will be
prepended by the "<DATABASE_NAME>.<USER_NAME>." string.
Anyway, it is strongly recommended that you use only full
qualified type names. The rational for this is that the actual ArcSDE
name of a featuretype is full qualified, and more than a single type can
exist with the same non qualified name, if they pertein to different
database users. So, if a non qualified name is passed, the user name
which will be prepended to it is the user used to create the connections
(i.e., the one you specified with the "user" parameter to create the
datastore.
Parameters: typeName - DOCUMENT ME! DOCUMENT ME! throws: java.io.IOException - DOCUMENT ME! throws: NullPointerException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
getTypeNames | public String[] getTypeNames() throws IOException(Code) | | DOCUMENT ME!
the list of full qualified feature class names on the ArcSDEdatabase this DataStore works on. An ArcSDE full qualified classname is composed of three dot separated strings:"DATABASE.USER.CLASSNAME", wich is usefull enough to use it asnamespace throws: RuntimeException - if an exception occurs while retrieving the list ofregisteres feature classes on the backend, or while obtainingthe full qualified name of one of them |
getUnsupportedFilter | protected org.opengis.filter.Filter getUnsupportedFilter(String typeName, Filter filter)(Code) | | 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. Otherwise it will
just return the same filter.
If the complete filter is supported, the subclass must return
Filter.INCLUDE
Parameters: typeName - DOCUMENT ME! Parameters: filter - DOCUMENT ME! DOCUMENT ME! |
getViewSelectStatement | public PlainSelect getViewSelectStatement(String typeName)(Code) | | |
registerView | public void registerView(String typeName, PlainSelect select) throws IOException(Code) | | Supported constructs:
- FromItems
- SelectItems
- Top (as in SELECT TOP 10 * FROM...)
- Where
Parameters: typeName - Parameters: select - throws: IOException - |
Methods inherited from org.geotools.data.AbstractDataStore | protected FeatureWriter createFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc) protected InProcessLockingManager createLockingManager()(Code)(Java Doc) protected Map createMetadata(String typeName)(Code)(Java Doc) public void createSchema(FeatureType featureType) throws IOException(Code)(Java Doc) public void dispose()(Code)(Java Doc) protected Envelope getBounds(Query query) throws IOException(Code)(Java Doc) protected int getCount(Query query) throws IOException(Code)(Java Doc) abstract protected FeatureReader getFeatureReader(String typeName) throws IOException(Code)(Java Doc) public FeatureReader getFeatureReader(Query query, Transaction transaction) throws IOException(Code)(Java Doc) protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code)(Java Doc) public FeatureSource getFeatureSource(String typeName) throws IOException(Code)(Java Doc) protected FeatureWriter getFeatureWriter(String typeName) throws IOException(Code)(Java Doc) public FeatureWriter getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException(Code)(Java Doc) public FeatureWriter getFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc) public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code)(Java Doc) public LockingManager getLockingManager()(Code)(Java Doc) abstract public FeatureType getSchema(String typeName) throws IOException(Code)(Java Doc) protected Set getSupportedHints()(Code)(Java Doc) abstract public String[] getTypeNames() throws IOException(Code)(Java Doc) protected Filter getUnsupportedFilter(String typeName, Filter filter)(Code)(Java Doc) public FeatureSource getView(Query query) throws IOException, SchemaException(Code)(Java Doc) public void updateSchema(String typeName, FeatureType featureType)(Code)(Java Doc)
|
|
|
|