|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectArcSdeFeatureSource
public class ArcSdeFeatureSource
Field Summary | |
---|---|
protected ArcSDEDataStore |
dataStore
|
protected Transaction |
transaction
|
protected FeatureTypeInfo |
typeInfo
|
Constructor Summary | |
---|---|
ArcSdeFeatureSource(FeatureTypeInfo typeInfo,
ArcSDEDataStore dataStore)
|
Method Summary | |
---|---|
void |
addFeatureListener(FeatureListener listener)
Adds a listener to the list that's notified each time a change to the FeatureStore occurs. |
ReferencedEnvelope |
getBounds()
Gets the bounding box of this datasource. |
ReferencedEnvelope |
getBounds(Query query)
Gets the bounding box of the features that would be returned by this query. |
protected ReferencedEnvelope |
getBounds(Query namedQuery,
ISession session)
|
int |
getCount(Query query)
Gets the number of the features that would be returned by this query. |
protected int |
getCount(Query namedQuery,
ISession session)
|
ArcSDEDataStore |
getDataStore()
Access to the DataStore implementing this FeatureStore. |
FeatureReader<SimpleFeatureType,SimpleFeature> |
getfeatureReader(SimpleFeatureType targetSchema,
Query query)
|
FeatureCollection<SimpleFeatureType,SimpleFeature> |
getFeatures()
Loads all features from the datasource into the return FeatureResults. |
FeatureCollection<SimpleFeatureType,SimpleFeature> |
getFeatures(Filter filter)
Loads features from the datasource into the returned FeatureResults, based on the passed filter. |
FeatureCollection<SimpleFeatureType,SimpleFeature> |
getFeatures(Query query)
Loads features from the datasource into the returned FeatureResults, based on the passed query. |
ArcSdeResourceInfo |
getInfo()
Information describing the contents of this resoruce. |
Name |
getName()
Returns the same name than the feature type (ie, getSchema().getName() to honor the
simple feature land common practice of calling the same both the Features produces and their
types |
QueryCapabilities |
getQueryCapabilities()
Returns and indication of what query capabilities this FeatureSource supports natively. |
SimpleFeatureType |
getSchema()
Retrieves the featureType that features extracted from this datasource will be created with. |
protected ISession |
getSession()
Returns a session appropriate for the current transaction This is convenient way to get a connection for getBounds() and
getCount(Query) . |
Set |
getSupportedHints()
ArcSDE features are always "detached", so we return the FEATURE_DETACHED hint here. |
ArcSdeVersionHandler |
getVersionHandler()
|
void |
removeFeatureListener(FeatureListener listener)
Removes a listener from the list that's notified each time a change to the FeatureStore occurs. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Transaction transaction
protected FeatureTypeInfo typeInfo
protected ArcSDEDataStore dataStore
Constructor Detail |
---|
public ArcSdeFeatureSource(FeatureTypeInfo typeInfo, ArcSDEDataStore dataStore)
Method Detail |
---|
public Name getName()
getSchema().getName()
to honor the
simple feature land common practice of calling the same both the Features produces and their
types
getName
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
FeatureSource.getName()
public ArcSdeResourceInfo getInfo()
FeatureSource
Please note that for FeatureContent:
getInfo
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
FeatureSource.getInfo()
public QueryCapabilities getQueryCapabilities()
FeatureSource
getQueryCapabilities
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
public final void addFeatureListener(FeatureListener listener)
FeatureSource
addFeatureListener
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
listener
- FeatureListenerFeatureSource.addFeatureListener(FeatureListener)
public final void removeFeatureListener(FeatureListener listener)
FeatureSource
removeFeatureListener
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
listener
- FeatureListenerFeatureSource.removeFeatureListener(FeatureListener)
public final ReferencedEnvelope getBounds() throws IOException
FeatureSource
With getBounds(Query) this becomes a convenience method for getBounds(Query.ALL), that is the bounds for all features contained here.
If getBounds() returns null
due to expense consider using
getFeatures().getBounds()
as a an alternative.
getBounds
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
IOException
- if there are errors getting the bounding box.FeatureSource.getBounds()
public final ReferencedEnvelope getBounds(Query query) throws IOException
FeatureSource
To retrieve the bounds of the DataSource please use getBounds(
Query.ALL )
.
This method is needed if we are to stream features to a gml out, since a
FeatureCollection
If getBounds(Query) returns null
due to expense consider
using getFeatures(Query).getBounds()
as a an alternative.
getBounds
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
query
- Contains the Filter, and optionally MaxFeatures and StartIndex to
find the bounds for.
IOException
- DOCUMENT ME!FeatureSource.getBounds(Query)
protected ReferencedEnvelope getBounds(Query namedQuery, ISession session) throws DataSourceException, IOException
namedQuery
- session
-
DataSourceException
IOException
public final int getCount(Query query) throws IOException
FeatureSource
If getBounds(Query) returns -1
due to expense consider
using getFeatures(Query).getCount()
as a an alternative.
This method should take into account the Query's maxFeatures
and startIndex
, if present, in order to
consistently return the number of features the query would return.
getCount
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
query
- Contains the Filter, and optionally MaxFeatures and StartIndex to
find the count for.
-1
if count is too expensive to calculate or any errors or occur.
IOException
- if there are errors getting the countFeatureSource.getCount(Query)
protected int getCount(Query namedQuery, ISession session) throws IOException
IOException
FeatureSource.getCount(Query)
protected final ISession getSession() throws IOException
This is convenient way to get a connection for getBounds()
and
getCount(Query)
. ArcSdeFeatureStore
overrides to get the connection from the
transaction instead of the pool.
IOException
public final ArcSDEDataStore getDataStore()
FeatureSource
getDataStore
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
FeatureSource.getDataStore()
public final FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures(Query query) throws IOException
FeatureSource
getFeatures
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
query
- a datasource query object. It encapsulates requested
information, such as typeName, maxFeatures and filter.
IOException
- For all data source errors.FeatureSource.getFeatures(Query)
public final FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures(Filter filter) throws IOException
FeatureSource
getFeatures
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
filter
- An OpenGIS filter; specifies which features to retrieve.
null is not allowed, use Filter.INCLUDE instead.
IOException
- For all data source errors.FeatureSource.getFeatures(Filter)
public final FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures() throws IOException
FeatureSource
Filter.INCLUDE can also be used to get all features. Calling this function
is equivalent to using Query.ALL
getFeatures
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
IOException
- For all data source errors.FeatureSource.getFeatures()
public final SimpleFeatureType getSchema()
FeatureSource
The schema returned is the LCD supported by all available Features. In the common case of shapfiles and database table this schema will match that of every feature available. In the degenerate GML case this will simply reflect the gml:AbstractFeatureType.
getSchema
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
FeatureSource.getSchema();
public final Set getSupportedHints()
getSupportedHints
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Hints.FEATURE_DETACHED
FeatureSource.getSupportedHints()
public ArcSdeVersionHandler getVersionHandler() throws IOException
IOException
public FeatureReader<SimpleFeatureType,SimpleFeature> getfeatureReader(SimpleFeatureType targetSchema, Query query) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |