public class DefaultFeatureStore extends AbstractDisposable implements DataStoreInitializer, FeatureStoreProviderServices, FeatureStore, Observer
BASE_NEWPARAMETERS_PROVIDER_DEFINITION_FULLNAME, BASE_NEWPARAMETERS_PROVIDER_DEFINITION_NAME, BASE_PARAMETERS_PROVIDER_DEFINITION_FULLNAME, BASE_PARAMETERS_PROVIDER_DEFINITION_NAME, PROVIDER_PARAMTER_FULLNAME, PROVIDER_PARAMTER_NAMEMETADATA_DEFINITION_NAME, MODE_APPEND, MODE_FULLEDIT, MODE_QUERYFEATURE_METADATA_DEFINITION_NAME, METADATA_CONTAINERNAME, METADATA_CRS, METADATA_ENVELOPE, METADATA_FEATURETYPE, METADATA_PROVIDER, SPATIAL_METADATA_DEFINITION_NAME| Constructor and Description |
|---|
DefaultFeatureStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Provides each value of this Store to the provided
Visitor. |
void |
accept(Visitor visitor,
DataQuery dataQuery)
Provides each value of this Store to the provided
Visitor. |
void |
addObserver(Observer observer) |
boolean |
allowWrite()
Indicates whether this store allows writing.
|
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
void |
beginEditingGroup(String description)
Initiates an editing group.
|
void |
cancelEditing()
Cancels all editing since the last edit().
|
boolean |
canCommitChanges()
Returns true if you can call CommitChanges method.
|
boolean |
canRedo()
If a redo can be performed on the stack.
|
boolean |
canUndo()
If an undo can be performed on the stack.
|
boolean |
canWriteGeometry(int geometryType) |
void |
clear() |
Object |
clone()
Creates a copy of the object.
|
void |
close() |
void |
commitChanges()
Save changes in the provider without leaving the edit mode.
|
void |
createCache(String name,
DynObject parameters)
Creates a vectorial cache that is used to save and retrieve data.
|
FeatureProvider |
createDefaultFeatureProvider(FeatureType type)
Create a new instance of default implementation of a
FeatureProvider |
FeatureSelection |
createDefaultFeatureSelection()
Create a new instance of default implementation of a
FeatureSelection |
Feature |
createFeature(FeatureProvider data)
Create a
Feature instance for FeatureProvider
data
NOTE: Normaly Providers must use FeatureProvider instances instead Feature |
Feature |
createFeature(FeatureProvider data,
FeatureType type) |
FeatureQuery |
createFeatureQuery()
Returns a new
FeatureQuery associated to this store. |
FeatureSelection |
createFeatureSelection()
Creates a
FeatureSelection |
EditableFeatureType |
createFeatureType()
Creates a new instance of EditableFeatureType.
|
EditableFeatureType |
createFeatureType(String id)
Creates a new instance of EditableFeatureType.
|
FeatureIndex |
createIndex(FeatureType featureType,
String attributeName,
String indexName)
Creates an index which will be applied to the features of the given type,
by using the data of the given attribute.
|
FeatureIndex |
createIndex(FeatureType featureType,
String attributeName,
String indexName,
Observer observer)
Creates an index which will be applied to the features of the given type,
by using the data of the given attribute.
|
FeatureIndex |
createIndex(String indexTypeName,
FeatureType featureType,
String attributeName,
String indexName)
Creates an index which will be applied to the features of the given type,
by using the data of the given attribute.
|
FeatureIndex |
createIndex(String indexTypeName,
FeatureType featureType,
String attributeName,
String indexName,
Observer observer)
Creates an index which will be applied to the features of the given type,
by using the data of the given attribute.
|
EditableFeature |
createNewFeature()
Creates a new feature using the default feature type and returns it as an
EditableFeature |
EditableFeature |
createNewFeature(boolean defaultValues)
Creates a new feature of default
FeatureType. |
EditableFeature |
createNewFeature(Feature defaultValues)
Creates a new feature of default
FeatureType. |
EditableFeature |
createNewFeature(FeatureType type,
boolean defaultValues)
Creates a new feature of the given
FeatureType. |
EditableFeature |
createNewFeature(FeatureType type,
Feature defaultValues)
Creates a new feature of the given
FeatureType and uses the given
Feature as default values to initialize it. |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery. |
DataSet |
createSelection()
Creates a new selection.
|
void |
delegate(DynObject dynObject) |
void |
delete(Feature feature)
Deletes a
Feature from the store. |
void |
deleteObserver(Observer observer) |
void |
deleteObservers() |
void |
disableNotifications()
Disable the notification of events to registered Observers.
|
void |
doDelete(Feature feature) |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
doInsert(EditableFeature feature) |
void |
doUpdate(EditableFeature feature,
Feature oldFeature) |
void |
edit()
Enters editing state.
|
void |
edit(int mode)
Enters editing state specifying the editing mode.
|
void |
enableNotifications()
Enable (default) the notification of events to registered Observers.
|
void |
endComplexNotification()
Ends the complex notification mode.
|
void |
endEditingGroup()
Finishes an editing group.
|
void |
export(DataServerExplorer explorer,
String provider,
NewFeatureStoreParameters params)
Exports this store to another store.
|
void |
finishEditing()
Exits editing state.
|
FeatureCache |
getCache() |
Iterator |
getChildren()
Returns an iterator over this store children
|
FeatureCommandsStack |
getCommandsStack() |
DataSet |
getDataSet()
Returns all available data.
|
DataSet |
getDataSet(DataQuery dataQuery)
Returns a subset of data taking into account the properties and
restrictions of the DataQuery.
|
void |
getDataSet(DataQuery dataQuery,
Observer observer)
Loads a subset of data taking into account the properties and
restrictions of the DataQuery.
|
void |
getDataSet(Observer observer)
Loads all available data and notifies the observer for each loaded block of data.
|
FeatureType |
getDefaultFeatureType()
Return default
FeatureType of the store |
DynClass |
getDynClass() |
Object |
getDynValue(String name) |
Envelope |
getEnvelope()
Returns this store's total envelope (extent).
|
DataServerExplorer |
getExplorer()
Returns the DataServerExplorer to which this DataStore belongs, if there
is any.
|
Feature |
getFeature(DynObject dynobject)
Return the associated feature to the dynobject.
|
Feature |
getFeatureByReference(FeatureReference reference)
Returns the feature given its reference.
|
Feature |
getFeatureByReference(FeatureReference reference,
FeatureType featureType)
Returns the feature given its reference and feature type.
|
long |
getFeatureCount()
Returns featue count of this store.
|
FeatureManager |
getFeatureManager() |
FeatureProvider |
getFeatureProviderFromFeature(Feature feature)
Extract
FeatureProvider from a Feature instance. |
List<Feature> |
getFeatures(FeatureQuery query,
int pageSize)
Return a paginated list of Features filtered by the query.
|
FeatureSelection |
getFeatureSelection()
Returns the current
FeatureSelection. |
FeatureSet |
getFeatureSet()
Returns all available features in the store.
|
FeatureSet |
getFeatureSet(FeatureQuery featureQuery)
Returns a subset of features taking into account the properties and
restrictions of the FeatureQuery.
|
void |
getFeatureSet(FeatureQuery query,
Observer observer)
Loads a subset of features taking into account the properties and
restrictions of the FeatureQuery.
|
void |
getFeatureSet(Observer observer)
Loads all available feature in the store.
|
FeatureStore |
getFeatureStore()
Return current FeatureStore
|
FeatureType |
getFeatureType(FeatureQuery featureQuery) |
FeatureType |
getFeatureType(String featureTypeId)
Returns this store's featureType
FeatureType matches with
featureTypeId. |
FeatureTypeManager |
getFeatureTypeManager() |
List |
getFeatureTypes()
Returns this store's
FeatureType(s). |
String |
getFullName()
Returns a more descriptive name for the store that getName.
|
FeatureIndexes |
getIndexes()
Returns a FeatureIndexes structure containing all available indexes in
the store.
|
Interval |
getInterval()
Gets the
Interval of the store, that means the temporal
interval where the store has valid data. |
FeatureLocks |
getLocks()
Returns the set of locked features
|
DataManager |
getManager()
Reaturn
DataManager instance. |
Set |
getMetadataChildren()
Returns an unsorted set of child Metadata objects.
|
Object |
getMetadataID()
Returns the unique identifier of the Metadata.
|
String |
getMetadataName()
Returns the name of the Metadata, which allows to identify the type in
the Metadata registry.
|
int |
getMode() |
String |
getName()
Return current FeatureStore name.
|
DataStoreParameters |
getParameters()
Returns this store's parameters.
|
FeatureStoreProvider |
getProvider()
Return the instance of
FeatureStoreProvider for this store. |
FeatureType |
getProviderDefaultFeatureType() |
FeatureType |
getProviderFeatureType(String featureTypeId)
Return original
FeatureType of FeatureStoreProvider. |
List |
getProviderFeatureTypes() |
String |
getProviderName()
Return the provider name that use this store.
|
List |
getRedoInfos()
Returns the list of UndoRedoInfo in the REDO stack
|
int |
getRetrievedFeaturesLimit()
If the
FeatureStoreProvider#hasRetrievedFeaturesLimit() returns
true,
it returns the limit of features retrieved from the provider. |
DataSet |
getSelection()
Returns the selected set of data
|
IProjection |
getSRSDefaultGeometry()
Deprecated.
use getDefaultFeatureType().getDefaultSRS()
|
DataStore |
getStore()
Return the Store instance
|
Collection |
getTimes()
Gets all the possible values of time for which the store has data.
|
Collection |
getTimes(Interval interval)
Gets all the possible values of time for which the store has data
and intersects with an interval.
|
FeatureStoreTransforms |
getTransforms()
Returns this store transforms
|
List |
getUndoInfos()
Returns the list of UndoRedoInfo in the UNDO stack
|
boolean |
hasDynValue(String name) |
boolean |
hasRetrievedFeaturesLimit()
Return if the maximum number of features provided by the
provider are limited.
|
void |
implement(DynClass dynClass) |
void |
insert(EditableFeature feature)
Inserts a
Feature in the store. |
void |
intializePhase1(DataManager dataManager,
DataStoreParameters parameters) |
void |
intializePhase2(DataStoreProvider provider) |
Object |
invokeDynMethod(int code,
Object[] args) |
Object |
invokeDynMethod(String name,
Object[] args) |
boolean |
isAppending()
Indicates whether this store is in appending state.
|
boolean |
isAppendModeSupported()
Indicates whether this store supports append mode.
|
boolean |
isEditing()
Indicates whether this store is in editing state.
|
boolean |
isKnownEnvelope()
Return if the provider knows the real envelope of a layer.
|
boolean |
isLocksSupported()
Indicates whether this store supports locks.
|
Iterator |
iterator() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifyChange(FeatureStoreNotification storeNotification)
Call this to send a notification to observers of this store
|
void |
notifyChange(String notification)
Call this to send a notification to observers of this store
|
void |
notifyChange(String notification,
Command command) |
void |
notifyChange(String notification,
EditableFeatureType type) |
void |
notifyChange(String notification,
Feature feature) |
void |
notifyChange(String notification,
FeatureProvider data)
Call this to send a notification to observers of this store
|
void |
notifyChange(String notification,
Resource resource)
Call this to send a notification to observers of this store relative to
Resources
|
void |
open() |
void |
redo()
Re-does the following redoable elements.
|
void |
redo(int num)
Re-does a number of the following redoable element.
|
void |
refresh()
Refreshes this store state.
|
static void |
registerMetadataDefinition() |
static void |
registerPersistenceDefinition() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setDynValue(String name,
Object value) |
void |
setFeatureTypes(List types,
FeatureType defaultType)
Sets
FeatureType available from this store. |
void |
setSelection(DataSet selection)
Sets the current data selection with the given data set.
|
void |
setSelection(FeatureSet selection)
Sets the selection to the passed
FeatureSet |
void |
setSelection(FeatureSet selection,
boolean undoable) |
void |
undo()
Undoes the following undoable elements.
|
void |
undo(int num)
Undoes a number of the following undoable elements.
|
void |
update(EditableFeature feature)
Updates a
Feature in the store with the changes in the
EditableFeature. |
void |
update(EditableFeatureType type)
Updates a
FeatureType in the store with the changes in the
EditableFeatureType. |
void |
update(Observable observable,
Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
void |
validateFeatures(int mode)
Applies the validation rules associated to the given mode to the active
FeatureSet. |
dispose, disposeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisposepublic void intializePhase1(DataManager dataManager, DataStoreParameters parameters) throws InitializeException
intializePhase1 in interface DataStoreInitializerInitializeExceptionpublic void intializePhase2(DataStoreProvider provider)
intializePhase2 in interface DataStoreInitializerpublic DataStoreParameters getParameters()
FeatureStoregetParameters in interface DataStoregetParameters in interface FeatureStoreDataStoreParameters containing this store's parameterspublic int getMode()
public DataManager getManager()
FeatureStoreProviderServicesDataManager instance.getManager in interface FeatureStoreProviderServicespublic Iterator getChildren()
DataStoregetChildren in interface DataStorepublic FeatureStoreProvider getProvider()
FeatureStoreProviderServicesFeatureStoreProvider for this store.getProvider in interface FeatureStoreProviderServicespublic FeatureManager getFeatureManager()
public void setFeatureTypes(List types, FeatureType defaultType)
FeatureStoreProviderServicessetFeatureTypes in interface FeatureStoreProviderServicespublic void open()
throws OpenException
OpenExceptionpublic void refresh()
throws OpenException,
InitializeException
DataStorerefresh in interface DataStoreOpenExceptionInitializeExceptionpublic void close()
throws CloseException
CloseExceptionprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()public boolean allowWrite()
FeatureStoreallowWrite in interface FeatureStorepublic boolean canWriteGeometry(int geometryType)
throws DataException
canWriteGeometry in interface FeatureStoreDataExceptionpublic DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
DataStoregetExplorer in interface DataStorenull if this was not accessed through any
DataServerExplorer.ValidateDataParametersExceptionReadExceptionpublic Envelope getEnvelope() throws DataException
FeatureStoregetEnvelope in interface FeatureStorenull if
store not have geometry informationDataExceptionpublic IProjection getSRSDefaultGeometry() throws DataException
getSRSDefaultGeometry in interface FeatureStoreDataExceptionpublic FeatureSelection createDefaultFeatureSelection() throws DataException
FeatureStoreProviderServicesFeatureSelectioncreateDefaultFeatureSelection in interface FeatureStoreProviderServicesFeatureSelectionDataExceptionpublic FeatureProvider createDefaultFeatureProvider(FeatureType type) throws DataException
FeatureStoreProviderServicesFeatureProvidercreateDefaultFeatureProvider in interface FeatureStoreProviderServicesFeatureProviderDataExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic static void registerPersistenceDefinition()
public static void registerMetadataDefinition()
throws MetadataException
MetadataExceptionpublic void setSelection(DataSet selection) throws DataException
DataStoresetSelection in interface DataStoreDataExceptionpublic DataSet createSelection() throws DataException
DataStorecreateSelection in interface DataStoreDataExceptionpublic DataSet getSelection() throws DataException
DataStoregetSelection in interface DataStoreDataExceptionpublic void setSelection(FeatureSet selection) throws DataException
FeatureStoreFeatureSetsetSelection in interface FeatureStoreselection - A FeatureSet with the requested selectionDataExceptionpublic void setSelection(FeatureSet selection, boolean undoable) throws DataException
undoable - if the action must be undoableDataExceptionsetSelection(FeatureSet)public FeatureSelection createFeatureSelection() throws DataException
FeatureStoreFeatureSelectioncreateFeatureSelection in interface FeatureStoreFeatureSelectionDataExceptionpublic FeatureSelection getFeatureSelection() throws DataException
FeatureStoreFeatureSelection.
Create a empty selection if not exits.getFeatureSelection in interface FeatureStoreFeatureSelection.DataExceptionpublic void notifyChange(String notification)
FeatureStoreProviderServicesnotifyChange in interface FeatureStoreProviderServicespublic void notifyChange(String notification, FeatureProvider data)
FeatureStoreProviderServicesnotifyChange in interface FeatureStoreProviderServicespublic void notifyChange(String notification, EditableFeatureType type)
public void notifyChange(FeatureStoreNotification storeNotification)
FeatureStoreProviderServicesnotifyChange in interface FeatureStoreProviderServicespublic void notifyChange(String notification, Resource resource)
FeatureStoreProviderServicesnotifyChange in interface FeatureStoreProviderServicespublic boolean isLocksSupported()
FeatureStoreisLocksSupported in interface FeatureStorepublic FeatureLocks getLocks() throws DataException
FeatureStoregetLocks in interface FeatureStoreDataExceptionpublic void disableNotifications()
ComplexObservabledisableNotifications in interface ComplexObservablepublic void enableNotifications()
ComplexObservableenableNotifications in interface ComplexObservablepublic void beginComplexNotification()
ComplexObservablebeginComplexNotification in interface ComplexObservablepublic void endComplexNotification()
ComplexObservable
If a observer is a ComplexObserver, it will be notified with a
single DefaultComplexNotification instead of each of the notifications.
Some important notes to take into account when calling this method.
Observer is processing a notification another Observer is
registered to the source Observable, it won't get any of the
notifications currently being notified, but future ones.endComplexNotification in interface ComplexObservablepublic void addObserver(Observer observer)
addObserver in interface Observablepublic void deleteObserver(Observer observer)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic void update(Observable observable, Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public void edit()
throws DataException
FeatureStoreedit in interface FeatureStoreDataExceptionpublic void edit(int mode)
throws DataException
FeatureStoreedit in interface FeatureStoreDataExceptionpublic boolean isEditing()
FeatureStoreisEditing in interface FeatureStorepublic boolean isAppending()
FeatureStoreFeatureSet.isAppending in interface FeatureStorepublic void update(EditableFeatureType type) throws DataException
FeatureStoreFeatureType in the store with the changes in the
EditableFeatureType.FeatureSet from this store that are used will be invalidated.update in interface FeatureStoretype - an EditableFeatureType with the changes.DataExceptionpublic void delete(Feature feature) throws DataException
FeatureStoreFeature from the store.FeatureSet from this store that was still in use will be
invalidated. You can override this using Iterator.remove() from
FeatureSet.delete in interface FeatureStorefeature - The feature to be deleted.DataExceptionpublic void doDelete(Feature feature) throws DataException
DataExceptionpublic void insert(EditableFeature feature) throws DataException
FeatureStoreFeature in the store.FeatureSet from this store that was still in use will be
invalidated. You can override this using
FeatureSet.insert(EditableFeature).insert in interface FeatureStorefeature - The feature to be insertedDataExceptionpublic void doInsert(EditableFeature feature) throws DataException
DataExceptionpublic void update(EditableFeature feature) throws DataException
FeatureStoreFeature in the store with the changes in the
EditableFeature.FeatureSet from this store that was still in use will be
invalidated. You can override this using
FeatureSet.update(EditableFeature).update in interface FeatureStorefeature - the feature to be updatedDataExceptionpublic void doUpdate(EditableFeature feature, Feature oldFeature) throws DataException
DataExceptionpublic void redo()
throws RedoException
UndoRedoStackredo in interface UndoRedoStackRedoException - if there is an error performing de redo elementpublic void undo()
throws UndoException
UndoRedoStackundo in interface UndoRedoStackUndoException - if there is an error performing de undo elementpublic List getRedoInfos()
UndoRedoStackgetRedoInfos in interface UndoRedoStackpublic List getUndoInfos()
UndoRedoStackgetUndoInfos in interface UndoRedoStackpublic FeatureCommandsStack getCommandsStack() throws DataException
DataExceptionpublic void cancelEditing()
throws DataException
FeatureStorecancelEditing in interface FeatureStoreDataExceptionpublic void finishEditing()
throws DataException
FeatureStorefinishEditing in interface FeatureStoreDataExceptionpublic void commitChanges()
throws DataException
commitChanges in interface FeatureStoreDataExceptionpublic boolean canCommitChanges()
throws DataException
FeatureStorecanCommitChanges in interface FeatureStoreDataExceptionpublic void beginEditingGroup(String description) throws NeedEditingModeException
FeatureStorebeginEditingGroup in interface FeatureStoredescription - Description of the editing group.NeedEditingModeExceptionpublic void endEditingGroup()
throws NeedEditingModeException
FeatureStoreendEditingGroup in interface FeatureStoreNeedEditingModeExceptionpublic boolean isAppendModeSupported()
FeatureStoreisAppendModeSupported in interface FeatureStorepublic void export(DataServerExplorer explorer, String provider, NewFeatureStoreParameters params) throws DataException
FeatureStoreexport in interface FeatureStoreexplorer - DataServerExplorer targetparams - New parameters of this store that will be used on the target
explorerDataExceptionpublic DataSet getDataSet() throws DataException
DataStoregetDataSet in interface DataStoreDataException - if there is any error while loading the datapublic DataSet getDataSet(DataQuery dataQuery) throws DataException
DataStoregetDataSet in interface DataStoredataQuery - defines the properties of the requested dataDataException - if there is any error while loading the datapublic void getDataSet(Observer observer) throws DataException
DataStoregetDataSet in interface DataStoreobserver - to be notified for each block of data loadedDataException - if there is any error while loading the datapublic void getDataSet(DataQuery dataQuery, Observer observer) throws DataException
DataStoregetDataSet in interface DataStoredataQuery - defines the properties of the requested dataobserver - to be notified for each block of data loadedDataException - if there is any error while loading the datapublic FeatureSet getFeatureSet() throws DataException
FeatureStore
NOTE: if you use this method to get a
FeatureSet, you must get sure it is disposed
(@see Disposable.dispose()) in any case, even if an
error occurs while getting the data. It is recommended to use the
accept methods instead, which handle everything for you.
Take into account the accept methods may use a fast iterator to
get the features.
getFeatureSet in interface FeatureStoreReadException - if there is any error while reading the featuresDataExceptionDataStore.accept(org.gvsig.tools.visitor.Visitor)public FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException
FeatureStore
NOTE: if you use this method to get a
FeatureSet, you must get sure it is disposed
(@see Disposable.dispose()) in any case, even if an
error occurs while getting the data. It is recommended to use the
accept methods instead, which handle everything for you.
Take into account the accept methods may use a fast iterator to
get the features.
getFeatureSet in interface FeatureStorefeatureQuery - defines the characteristics of the features to returnReadException - if there is any error while reading the featuresDataExceptionDataStore.accept(org.gvsig.tools.visitor.Visitor,
org.gvsig.fmap.dal.DataQuery)public List<Feature> getFeatures(FeatureQuery query, int pageSize)
FeatureStoregetFeatures in interface FeatureStorequery - to filter the returned feature listpageSize - the page size of the listpublic void accept(Visitor visitor) throws BaseException
DataStoreVisitor.
The values received through the Visitor.visit(Object) method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object) method execution, create a copy or clone
the received value in order to be stored.accept in interface DataStoreaccept in interface Visitablevisitor - the visitor to apply to each value.BaseException - if there is an error while performing the visitpublic void accept(Visitor visitor, DataQuery dataQuery) throws BaseException
DataStoreVisitor.
The values received through the Visitor.visit(Object) method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object) method execution, create a copy or clone
the received value in order to be stored.accept in interface DataStorevisitor - the visitor to apply to each value.dataQuery - defines the properties of the data to visitBaseException - if there is an error while performing the visitpublic FeatureType getFeatureType(FeatureQuery featureQuery) throws DataException
DataExceptionpublic void getFeatureSet(Observer observer) throws DataException
FeatureStoregetFeatureSet in interface FeatureStoreobserver - to be notified of each loaded FeatureDataException - if there is any error while loading the featurespublic void getFeatureSet(FeatureQuery query, Observer observer) throws DataException
FeatureStoregetFeatureSet in interface FeatureStorequery - defines the characteristics of the features to returnobserver - to be notified of each loaded FeatureDataException - if there is any error while loading the featurespublic Feature getFeatureByReference(FeatureReference reference) throws DataException
FeatureStoregetFeatureByReference in interface FeatureStorereference - a unique FeatureReferenceDataExceptionpublic Feature getFeatureByReference(FeatureReference reference, FeatureType featureType) throws DataException
FeatureStoregetFeatureByReference in interface FeatureStorereference - a unique FeatureReferencefeatureType - FeatureType to which the requested Feature belongsDataExceptionpublic void validateFeatures(int mode)
throws DataException
FeatureStoreFeatureSet.validateFeatures in interface FeatureStoremode - can be one of {MODE_QUERY, MODE_FULLEDIT, MODE_APPEND}DataExceptionpublic FeatureType getDefaultFeatureType() throws DataException
FeatureStoreProviderServicesFeatureType of the storegetDefaultFeatureType in interface FeatureStoregetDefaultFeatureType in interface FeatureStoreProviderServicesFeatureType.DataExceptionpublic FeatureType getFeatureType(String featureTypeId) throws DataException
FeatureStoreFeatureType matches with
featureTypeId.getFeatureType in interface FeatureStoreFeatureType.DataExceptionpublic FeatureType getProviderDefaultFeatureType()
public List getFeatureTypes() throws DataException
FeatureStoreFeatureType(s).getFeatureTypes in interface FeatureStoreFeatureType(s).DataExceptionpublic List getProviderFeatureTypes() throws DataException
DataExceptionpublic Feature createFeature(FeatureProvider data) throws DataException
FeatureStoreProviderServicesFeature instance for FeatureProvider
data
FeatureProvider instances instead FeaturecreateFeature in interface FeatureStoreProviderServicesFeatureDataExceptionpublic Feature createFeature(FeatureProvider data, FeatureType type) throws DataException
DataExceptionpublic EditableFeature createNewFeature(FeatureType type, Feature defaultValues) throws DataException
FeatureStoreFeatureType and uses the given
Feature as default values to initialize it.createNewFeature in interface FeatureStoretype - the new feature's feature typedefaultValues - a feature whose values are used as default values for the new
feature.DataExceptionpublic EditableFeature createNewFeature(FeatureType type, boolean defaultValues) throws DataException
FeatureStoreFeatureType. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.createNewFeature in interface FeatureStoretype - the new feature's feature typedefaultValues - if true the new feature is initialized with each attribute's
default value.DataExceptionpublic EditableFeature createNewFeature(boolean defaultValues) throws DataException
FeatureStoreFeatureType. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.createNewFeature in interface FeatureStoredefaultValues - if true the new feature is initialized with each attribute's
default value.DataExceptionpublic EditableFeature createNewFeature() throws DataException
FeatureStoreEditableFeaturecreateNewFeature in interface FeatureStoreDataExceptionpublic EditableFeature createNewFeature(Feature defaultValues) throws DataException
FeatureStoreFeatureType.
The new feature should be initialized with the values of the feature
passed as parameter.
Values are inicialiced by name from the feature specified. Error in
value assignement are ignoreds.createNewFeature in interface FeatureStoredefaultValues - the values to initialize the new feature.DataExceptionpublic EditableFeatureType createFeatureType()
FeatureStoreProviderServicescreateFeatureType in interface FeatureStoreProviderServicespublic EditableFeatureType createFeatureType(String id)
FeatureStoreProviderServicescreateFeatureType in interface FeatureStoreProviderServicespublic FeatureIndexes getIndexes()
FeatureStoregetIndexes in interface FeatureStorepublic FeatureIndex createIndex(FeatureType featureType, String attributeName, String indexName) throws DataException
FeatureStorecreateIndex in interface FeatureStorefeatureType - The FeatureType to which the indexed attribute belongs.attributeName - The name of the attributed to be indexedindexName - The index nameFeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionpublic FeatureIndex createIndex(String indexTypeName, FeatureType featureType, String attributeName, String indexName) throws DataException
FeatureStorecreateIndex in interface FeatureStoreindexTypeName - the type of the index to be created. That name is
related to one of the registered index providersfeatureType - The FeatureType to which the indexed attribute belongs.attributeName - The name of the attributed to be indexedindexName - The index nameFeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionpublic FeatureIndex createIndex(FeatureType featureType, String attributeName, String indexName, Observer observer) throws DataException
FeatureStoreObserver parameter is provided to be
notified ( FeatureStoreNotification.INDEX_FILLING_SUCCESS )
when the index has finished filling with data and is available to be
used.createIndex in interface FeatureStorefeatureType - The FeatureType to which the indexed attribute belongs.attributeName - The name of the attributed to be indexedindexName - The index nameobserver - to notify to when the created index has finished filling
with data and is available to be used. The observer will
receive then a
FeatureStoreNotification.INDEX_FILLING_SUCCESS
notification, with the index object if it has finished
successfully, or a
FeatureStoreNotification.INDEX_FILLING_ERROR
notification with the exception object if there has been
any error in the process. Optional.FeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionFeatureStoreNotification.INDEX_FILLING_STARTED,
FeatureStoreNotification.INDEX_FILLING_SUCCESS,
FeatureStoreNotification.INDEX_FILLING_CANCELLED,
FeatureStoreNotification.INDEX_FILLING_ERRORpublic FeatureIndex createIndex(String indexTypeName, FeatureType featureType, String attributeName, String indexName, Observer observer) throws DataException
FeatureStoreObserver parameter is provided to be
notified ( FeatureStoreNotification.INDEX_FILLING_SUCCESS )
when the index has finished filling with data and is available to be
used.createIndex in interface FeatureStoreindexTypeName - the type of the index to be created. That name is
related to one of the registered index providersfeatureType - The FeatureType to which the indexed attribute belongs.attributeName - The name of the attributed to be indexedindexName - The index nameobserver - to notify to when the created index has finished filling
with data and is available to be used. The observer will
receive then a
FeatureStoreNotification.INDEX_FILLING_SUCCESS
notification, with the index object if it has finished
successfully, or a
FeatureStoreNotification.INDEX_FILLING_ERROR
notification with the exception object if there has been
any error in the process. Optional.FeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionFeatureStoreNotification.INDEX_FILLING_STARTED,
FeatureStoreNotification.INDEX_FILLING_SUCCESS,
FeatureStoreNotification.INDEX_FILLING_CANCELLED,
FeatureStoreNotification.INDEX_FILLING_ERRORpublic FeatureStoreTransforms getTransforms()
FeatureStoregetTransforms in interface FeatureStorepublic FeatureQuery createFeatureQuery()
FeatureStoreFeatureQuery associated to this store.createFeatureQuery in interface FeatureStoreFeatureQuery associated to this store.public DataQuery createQuery()
DataStoreDataQuery.createQuery in interface DataStoreDataQuery instance.public boolean canRedo()
UndoRedoStackcanRedo in interface UndoRedoStackpublic boolean canUndo()
UndoRedoStackcanUndo in interface UndoRedoStackpublic void redo(int num)
throws RedoException
UndoRedoStackredo in interface UndoRedoStacknum - the number of elements to redoRedoException - if there is an error performing de redo elementpublic void undo(int num)
throws UndoException
UndoRedoStackundo in interface UndoRedoStacknum - the number of elements to undoUndoException - if there is an error performing de undo elementpublic Object getMetadataID()
MetadatagetMetadataID in interface Metadatapublic DynClass getDynClass()
getDynClass in interface DynObjectpublic Object getDynValue(String name) throws DynFieldNotFoundException
getDynValue in interface DynObjectDynFieldNotFoundExceptionpublic boolean hasDynValue(String name)
hasDynValue in interface DynObjectpublic Object invokeDynMethod(String name, Object[] args) throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic Object invokeDynMethod(int code, Object[] args) throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic void setDynValue(String name, Object value) throws DynFieldNotFoundException
setDynValue in interface DynObjectDynFieldNotFoundExceptionpublic Set getMetadataChildren()
MetadatagetMetadataChildren in interface Metadatapublic String getMetadataName()
MetadatagetMetadataName in interface Metadatapublic FeatureTypeManager getFeatureTypeManager()
public long getFeatureCount()
throws DataException
FeatureStoregetFeatureCount in interface FeatureStoreDataExceptionpublic FeatureType getProviderFeatureType(String featureTypeId)
FeatureStoreProviderServicesFeatureType of FeatureStoreProvider.getProviderFeatureType in interface FeatureStoreProviderServicespublic FeatureProvider getFeatureProviderFromFeature(Feature feature)
FeatureStoreProviderServicesFeatureProvider from a Feature instance.getFeatureProviderFromFeature in interface FeatureStoreProviderServicespublic DataStore getStore()
DataStoreProviderServicesgetStore in interface DataStoreProviderServicespublic FeatureStore getFeatureStore()
FeatureStoreProviderServicesgetFeatureStore in interface FeatureStoreProviderServicespublic void createCache(String name, DynObject parameters) throws DataException
FeatureStorecreateCache in interface FeatureStorename - the cache name.parameters - parameters to create the stores used to save data.DataExceptionpublic FeatureCache getCache()
getCache in interface FeatureStorepublic String getName()
FeatureStoreProviderServicesgetName in interface DataStoregetName in interface FeatureStoreProviderServicespublic String getFullName()
DataStoregetFullName in interface DataStorepublic String getProviderName()
DataStoregetProviderName in interface DataStorepublic boolean isKnownEnvelope()
FeatureStoreFeatureStoreProvider#getEnvelope() method doesn't return
the full envelope.isKnownEnvelope in interface FeatureStorepublic boolean hasRetrievedFeaturesLimit()
FeatureStorehasRetrievedFeaturesLimit in interface FeatureStorepublic int getRetrievedFeaturesLimit()
FeatureStoreFeatureStoreProvider#hasRetrievedFeaturesLimit() returns
true,
it returns the limit of features retrieved from the provider.getRetrievedFeaturesLimit in interface FeatureStorepublic Interval getInterval()
DataStoreInterval of the store, that means the temporal
interval where the store has valid data.getInterval in interface DataStorepublic Collection getTimes()
DataStorepublic Collection getTimes(Interval interval)
DataStorepublic Object clone() throws CloneNotSupportedException
Cloneableclone in class ObjectCloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.public Feature getFeature(DynObject dynobject)
FeatureStoregetFeature in interface FeatureStorepublic Iterator iterator()
iterator in interface FeatureStore