public class DefaultFeatureStore extends AbstractDataStore implements DataStoreInitializer2, FeatureStoreProviderServices, FeatureStore, SupportTransactions, Observer
Modifier and Type | Field and Description |
---|---|
static long |
sample_feature_cache_timeout_ms |
ignoreDALResource, LOGGER
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_NAME
METADATA_DEFINITION_NAME, MODE_APPEND, MODE_FULLEDIT, MODE_PASS_THROUGH, MODE_QUERY, MODE_UNKNOWN, SUBMODE_MERGE, SUBMODE_NONE
CSV_PROVIDER_NAME, DBASE_PROVIDER_NAME, FEATURE_METADATA_DEFINITION_NAME, GEOPACKAGE_PROVIDER_NAME, H2SPATIAL_PROVIDER_NAME, MDB_PROVIDER_NAME, METADATA_CONTAINERNAME, METADATA_CRS, METADATA_ENVELOPE, METADATA_FEATURETYPE, METADATA_PROVIDER, SHAPE_PROVIDER_NAME, 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) |
void |
addRequiredAttributes(FeatureQuery fq) |
boolean |
allowGeometry(java.lang.String name,
Geometry geometry) |
boolean |
allowWrite()
Indicates whether this store allows writing.
|
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
void |
beginEditingGroup(java.lang.String description)
Initiates an editing group.
|
boolean |
canBeEdited() |
void |
cancelEditing()
Cancels all editing since the last edit().
|
boolean |
cancelEditingQuietly() |
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() |
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
close() |
void |
commitChanges()
Save changes in the provider without leaving the edit mode.
|
void |
copyTo(FeatureStore target) |
void |
createCache(java.lang.String name,
DynObject parameters) |
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 |
ExpressionBuilder |
createExpression() |
ExpressionBuilder |
createExpressionBuilder() |
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. |
FeatureQuery |
createFeatureQuery(Expression filter) |
FeatureQuery |
createFeatureQuery(Expression filter,
Expression sortBy,
boolean asc)
Create a
FeatureQuery with the restrictions indicateds. |
FeatureQuery |
createFeatureQuery(Expression filter,
java.lang.String sortBy,
boolean asc)
Create a
FeatureQuery with the restrictions indicateds. |
FeatureQuery |
createFeatureQuery(java.lang.String filter) |
FeatureQuery |
createFeatureQuery(java.lang.String filter,
Expression sortBy,
boolean asc)
Create a
FeatureQuery with the restrictions indicateds. |
FeatureQuery |
createFeatureQuery(java.lang.String filter,
java.lang.String sortBy,
boolean asc)
Create a
FeatureQuery with the restrictions indicateds. |
FeatureSelection |
createFeatureSelection()
Creates a
FeatureSelection |
EditableFeatureType |
createFeatureType()
Creates a new instance of EditableFeatureType.
|
EditableFeatureType |
createFeatureType(java.lang.String id)
Creates a new instance of EditableFeatureType.Uses 'id' as identifier.
|
FeatureIndex |
createIndex(FeatureType featureType,
java.lang.String attributeName,
java.lang.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,
java.lang.String attributeName,
java.lang.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(java.lang.String indexTypeName,
FeatureType featureType,
java.lang.String attributeName,
java.lang.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(java.lang.String indexTypeName,
FeatureType featureType,
java.lang.String attributeName,
java.lang.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.
|
FeatureSelection |
createLargeFeatureSelection() |
FeatureSelection |
createMemoryFeatureSelection()
Creates a
FeatureSelection |
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. |
EditableFeature |
createNewFeature(JsonObject defaultValues)
Creates a new feature of default
FeatureType . |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery . |
DataSet |
createSelection()
Creates a new selection.
|
java.lang.String |
createUniqueID() |
void |
delegate(DynObject dynObject) |
void |
delete(Expression filter) |
void |
delete(Feature feature)
Deletes a
Feature from the store. |
void |
delete(java.lang.String filter) |
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 |
edit(int mode,
int submode) |
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,
java.lang.String provider,
NewFeatureStoreParameters params,
java.lang.String name)
Exports this store to another store.
|
FeatureSet |
features() |
Feature |
findFirst(Expression filter)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(Expression filter,
Expression sortBy,
boolean asc)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(Expression filter,
java.lang.String sortBy)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(Expression filter,
java.lang.String sortBy,
boolean asc)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(FeatureQuery query)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(java.lang.String filter)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(java.lang.String filter,
Expression sortBy,
boolean asc)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(java.lang.String filter,
java.lang.String sortBy)
Returns the first
Feature that meets the criteria indicated. |
Feature |
findFirst(java.lang.String filter,
java.lang.String sortBy,
boolean asc)
Returns the first
Feature that meets the criteria indicated. |
void |
finishEditing()
Exits editing state.
|
boolean |
finishEditingQuietly() |
Feature |
first()
Return the first
Feature of the store. |
java.lang.Throwable |
getBreakingsCause() |
FeatureCache |
getCache() |
UnmodifiableBasicMap<java.lang.String,DataStore> |
getChildren()
Returns an UnmodifiableBasicMap with this store children.
|
FeatureCommandsStack |
getCommandsStack() |
protected DataManager |
getDataManager() |
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 |
FeatureType |
getDefaultFeatureTypeQuietly() |
DynClass |
getDynClass() |
java.lang.Object |
getDynValue(java.lang.String name) |
java.util.List<FeatureReference> |
getEditedFeatures() |
java.util.List<FeatureReference> |
getEditedFeaturesNotValidated() |
java.lang.String |
getEditingSession() |
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. |
FeatureReference |
getFeatureReference(java.lang.String code) |
java.util.List<Feature> |
getFeatures()
Return a paginated list with al Features in the store.
|
java.util.List<Feature> |
getFeatures(Expression filter)
Return a paginated list of Features
It is a utility method that calls
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size. |
java.util.List<Feature> |
getFeatures(Expression filter,
java.lang.String sortBy)
Return a paginated list of Features
It is a utility method that calls
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size. |
java.util.List<Feature> |
getFeatures(Expression filter,
java.lang.String sortBy,
boolean asc)
Return a paginated list of Features
It is a utility method that calls
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size. |
java.util.List<Feature> |
getFeatures(FeatureQuery query)
Return a paginated list of Features.
|
java.util.List<Feature> |
getFeatures(FeatureQuery query,
int pageSize)
Return a paginated list of Features filtered by the query.
|
java.util.List<Feature> |
getFeatures(java.lang.String filter)
Return a paginated list of Features
It is a utility method that calls
FeatureStore.getFeatures(FeatureQuery, int) |
java.util.List<Feature> |
getFeatures(java.lang.String filter,
java.lang.String sortBy)
Return a paginated list of Features.
|
java.util.List<Feature> |
getFeatures(java.lang.String filter,
java.lang.String sortBy,
boolean asc)
Return a paginated list of Features.
|
GetItemWithSizeIsEmptyAndIterator64<Feature> |
getFeatures64() |
GetItemWithSizeIsEmptyAndIterator64<Feature> |
getFeatures64(FeatureQuery query,
int pageSize) |
GetItemWithSizeIsEmptyAndIterator64<Feature> |
getFeatures64(java.lang.String filter) |
GetItemWithSizeIsEmptyAndIterator64<Feature> |
getFeatures64(java.lang.String filter,
java.lang.String sortBy,
boolean asc) |
FeatureSelection |
getFeatureSelection()
Returns the current
FeatureSelection . |
FeatureSelection |
getFeatureSelectionQuietly() |
FeatureSet |
getFeatureSet()
Returns all available features in the store.
|
FeatureSet |
getFeatureSet(Expression filter)
Return a subset of features.
|
FeatureSet |
getFeatureSet(Expression filter,
java.lang.String sortBy)
Return a subset of features.
|
FeatureSet |
getFeatureSet(Expression filter,
java.lang.String sortBy,
boolean asc)
Return a subset of features.
|
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.
|
FeatureSet |
getFeatureSet(java.lang.String filter)
Return a subset of features.
|
FeatureSet |
getFeatureSet(java.lang.String filter,
java.lang.String sortBy)
Return a subset of features.
|
FeatureSet |
getFeatureSet(java.lang.String filter,
java.lang.String sortBy,
boolean asc)
Return a subset of features.
|
java.lang.Iterable<Feature> |
getFeaturesIterable(java.util.Iterator<FeatureReference> references) |
java.util.Iterator<Feature> |
getFeaturesIterator(java.util.Iterator<FeatureReference> references) |
FeatureStore |
getFeatureStore()
Return current FeatureStore
|
FeatureType |
getFeatureType(FeatureQuery featureQuery) |
FeatureType |
getFeatureType(java.lang.String featureTypeId)
Returns this store's featureType
FeatureType matches with
featureTypeId. |
FeatureTypeManager |
getFeatureTypeManager() |
java.util.List |
getFeatureTypes()
Returns this store's
FeatureType (s). |
java.lang.String |
getFullName()
Returns a more descriptive name for the store that getName.
|
protected java.lang.String |
getFullNameForTraces() |
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. |
java.lang.String |
getLabel() |
FeatureLocks |
getLocks()
Returns the set of locked features
|
DataManager |
getManager()
Reaturn
DataManager instance. |
java.util.Set |
getMetadataChildren()
Returns an unsorted set of child Metadata objects.
|
java.lang.Object |
getMetadataID()
Returns the unique identifier of the Metadata.
|
java.lang.String |
getMetadataName()
Returns the name of the Metadata, which allows to identify the type in
the Metadata registry.
|
int |
getMode() |
java.lang.String |
getName()
Returns the name associated to the store.
|
Feature |
getOriginalFeature(Feature feature) |
Feature |
getOriginalFeature(FeatureReference id) |
FeatureType |
getOriginalFeatureType(FeatureType featureType) |
DataStoreParameters |
getParameters()
Return the of parameters of this store
|
long |
getPendingChangesCount()
Devuelbe el numero de operaciones pendientes de guardar en una sesion
de edicion.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String name) |
FeatureStoreProvider |
getProvider()
Return the instance of
FeatureStoreProvider for this store. |
FeatureType |
getProviderDefaultFeatureType() |
DataStoreProviderFactory |
getProviderFactory() |
FeatureType |
getProviderFeatureType(java.lang.String featureTypeId)
Return original
FeatureType of FeatureStoreProvider . |
java.util.List |
getProviderFeatureTypes() |
java.lang.String |
getProviderName()
Return the provider name that use this store.
|
java.util.List |
getRedoInfos()
Returns the list of UndoRedoInfo in the REDO stack
|
ResourcesStorage |
getResourcesStorage() |
int |
getRetrievedFeaturesLimit()
If the
FeatureStoreProvider#hasRetrievedFeaturesLimit() returns
true,
it returns the limit of features retrieved from the provider. |
Feature |
getSampleFeature() |
DataSet |
getSelection()
Returns the selected set of data
|
IProjection |
getSRSDefaultGeometry()
Deprecated.
use getDefaultFeatureType().getDefaultSRS()
|
DataStore |
getStore()
Return the Store instance
|
DataStoreProviderServices |
getStoreProviderServices() |
StoresRepository |
getStoresRepository() |
int |
getSubmode() |
java.util.Collection |
getTimes()
Gets all the possible values of time for which the store has data.
|
java.util.Collection |
getTimes(Interval interval)
Gets all the possible values of time for which the store has data
and intersects with an interval.
|
DataTransaction |
getTransaction() |
FeatureStoreTransforms |
getTransforms()
Returns this store transforms
|
java.util.List |
getUndoInfos()
Returns the list of UndoRedoInfo in the UNDO stack
|
boolean |
hasDynMethod(java.lang.String name) |
boolean |
hasDynValue(java.lang.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 |
insert(FeatureSet set)
Inserts a set of
Feature in the store. |
void |
intialize(DataManager dataManager,
DataStoreParameters parameters) |
java.lang.Object |
invokeDynMethod(int code,
java.lang.Object[] args) |
java.lang.Object |
invokeDynMethod(java.lang.String name,
java.lang.Object[] args) |
boolean |
isAppending()
Indicates whether this store is in appending state.
|
boolean |
isAppendModeSupported()
Indicates whether this store supports append mode.
|
boolean |
isBroken() |
boolean |
isEditing()
Indicates whether this store is in editing state.
|
boolean |
isFeatureModified(Feature feature) |
boolean |
isFeatureModified(FeatureReference id) |
boolean |
isFeatureSelectionAvailable() |
boolean |
isFeatureSelectionEmpty() |
boolean |
isKnownEnvelope()
Return if the provider knows the real envelope of a layer.
|
boolean |
isLocksSupported()
Indicates whether this store supports locks.
|
boolean |
isTemporary()
Indicates if the storage is temporary.
|
java.util.Iterator |
iterator() |
void |
loadFromState(PersistentState persistentState)
Set the state of the object from the state passed as parameter.
|
FeatureStoreNotification |
notifyChange(FeatureStoreNotification storeNotification)
Call this to send a notification to observers of this store
|
FeatureStoreNotification |
notifyChange(java.lang.String notification)
Call this to send a notification to observers of this store
|
FeatureStoreNotification |
notifyChange(java.lang.String notification,
Command command) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
EditableFeatureType type) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
Expression expression) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
Feature feature) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
FeatureProvider data)
Call this to send a notification to observers of this store
|
FeatureStoreNotification |
notifyChange(java.lang.String notification,
java.util.Iterator<FeatureReference> deleteds,
java.util.Iterator<EditableFeature> inserteds,
java.util.Iterator<EditableFeature> updateds,
java.util.Iterator<FeatureType.FeatureTypeChanged> featureTypesChanged,
boolean isSelectionCompromised) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
Resource resource)
Call this to send a notification to observers of this store relative to
Resources
|
FeatureStoreNotification |
notifyChange(java.lang.String notification,
java.lang.String editingSessionCode) |
FeatureStoreNotification |
notifyChange(java.lang.String notification,
java.lang.String editingSessionCode,
int editMode) |
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.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
static void |
selfRegister(java.util.List<java.lang.Exception> exs) |
void |
setDynValue(java.lang.String name,
java.lang.Object value) |
void |
setFeatureTypes(java.util.List types,
FeatureType defaultType)
Sets
FeatureType available from this store. |
java.util.function.Predicate<FeatureStoreNotification> |
setNotificationsFilter(java.util.function.Predicate<FeatureStoreNotification> filter) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setProvider(DataStoreProvider provider) |
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 |
setTemporary(java.lang.Boolean temporary) |
void |
setTimeSupport(FeatureStoreTimeSupport timeSupport) |
void |
setTransaction(DataTransaction transaction) |
long |
size64() |
boolean |
supportReferences()
Return true when the default feature type of the store
support references.
|
java.lang.String |
toString() |
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(java.lang.Object... parameters)
Updates Features in the store with the values of the parameters.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
void |
useCache(java.lang.String providerName,
DynObject parameters) |
SpatialIndex |
wrapSpatialIndex(SpatialIndex index) |
setIgnoreDALResource
dispose, dispose
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cancelEditingQuietly, finishEditingQuietly, getLabel
getFullNameQuietly, getNameQuietly
dispose
cloneQuietly, cloneQuietly
protected DataManager getDataManager()
getDataManager
in class AbstractDataStore
public void intialize(DataManager dataManager, DataStoreParameters parameters) throws InitializeException
intialize
in interface DataStoreInitializer2
InitializeException
public void setProvider(DataStoreProvider provider)
setProvider
in interface DataStoreInitializer2
public DataStoreParameters getParameters()
DataStore
getParameters
in interface DataStore
getParameters
in interface FeatureStore
public int getMode()
getMode
in interface FeatureStore
public DataManager getManager()
FeatureStoreProviderServices
DataManager
instance.getManager
in interface FeatureStoreProviderServices
public UnmodifiableBasicMap<java.lang.String,DataStore> getChildren()
DataStore
getChildren
in interface DataStore
getChildren
in class AbstractDataStore
public FeatureStoreProvider getProvider()
FeatureStoreProviderServices
FeatureStoreProvider
for this store.getProvider
in interface FeatureStoreProviderServices
public FeatureManager getFeatureManager()
public void setFeatureTypes(java.util.List types, FeatureType defaultType)
FeatureStoreProviderServices
setFeatureTypes
in interface FeatureStoreProviderServices
public void open() throws OpenException
OpenException
public void refresh() throws OpenException, InitializeException
DataStore
refresh
in interface DataStore
OpenException
InitializeException
public void close() throws CloseException
CloseException
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDisposable
BaseException
AbstractDisposable.dispose()
public boolean allowWrite()
FeatureStore
allowWrite
in interface FeatureStore
public boolean canWriteGeometry(int geometryType) throws DataException
canWriteGeometry
in interface FeatureStore
DataException
public DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
DataStore
getExplorer
in interface DataStore
null
if this was not accessed through any
DataServerExplorer.ValidateDataParametersException
ReadException
public Envelope getEnvelope() throws DataException
FeatureStore
getEnvelope
in interface FeatureStore
null
if
store not have geometry informationDataException
public IProjection getSRSDefaultGeometry() throws DataException
getSRSDefaultGeometry
in interface FeatureStore
DataException
public FeatureSelection createDefaultFeatureSelection() throws DataException
FeatureStoreProviderServices
FeatureSelection
createDefaultFeatureSelection
in interface FeatureStoreProviderServices
FeatureSelection
DataException
public FeatureProvider createDefaultFeatureProvider(FeatureType type) throws DataException
FeatureStoreProviderServices
FeatureProvider
createDefaultFeatureProvider
in interface FeatureStoreProviderServices
FeatureProvider
DataException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState persistentState) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public DataStoreProviderServices getStoreProviderServices()
public static void selfRegister(java.util.List<java.lang.Exception> exs)
public void setSelection(DataSet selection) throws DataException
DataStore
setSelection
in interface DataStore
DataException
public DataSet createSelection() throws DataException
DataStore
createSelection
in interface DataStore
DataException
public DataSet getSelection() throws DataException
DataStore
getSelection
in interface DataStore
DataException
public void setSelection(FeatureSet selection) throws DataException
FeatureStore
FeatureSet
setSelection
in interface FeatureStore
selection
- A FeatureSet
with the requested selectionDataException
public void setSelection(FeatureSet selection, boolean undoable) throws DataException
DataException
public FeatureSelection createFeatureSelection() throws DataException
FeatureStore
FeatureSelection
createFeatureSelection
in interface FeatureStore
FeatureSelection
DataException
public FeatureSelection createLargeFeatureSelection() throws DataException
createLargeFeatureSelection
in interface FeatureStore
DataException
public FeatureSelection createMemoryFeatureSelection() throws DataException
FeatureStore
FeatureSelection
createMemoryFeatureSelection
in interface FeatureStore
FeatureSelection
DataException
public FeatureSelection getFeatureSelection() throws DataException
FeatureStore
FeatureSelection
.
Create a empty selection if not exits.
Manage of the selection can be slow on some data sources.
Use with care.
In data sources that do not support position access to records,
it may be slow to retrieve items from the selection. In some data
sources it may be necessary to access to this to retrieve each
item in the selection.getFeatureSelection
in interface FeatureStore
FeatureSelection
.DataException
public FeatureSelection getFeatureSelectionQuietly()
getFeatureSelectionQuietly
in interface FeatureStore
public boolean isFeatureSelectionEmpty()
isFeatureSelectionEmpty
in interface FeatureStore
public FeatureStoreNotification notifyChange(FeatureStoreNotification storeNotification)
FeatureStoreProviderServices
notifyChange
in interface FeatureStoreProviderServices
public FeatureStoreNotification notifyChange(java.lang.String notification)
FeatureStoreProviderServices
notifyChange
in interface FeatureStoreProviderServices
public FeatureStoreNotification notifyChange(java.lang.String notification, java.lang.String editingSessionCode)
public FeatureStoreNotification notifyChange(java.lang.String notification, java.lang.String editingSessionCode, int editMode)
public FeatureStoreNotification notifyChange(java.lang.String notification, java.util.Iterator<FeatureReference> deleteds, java.util.Iterator<EditableFeature> inserteds, java.util.Iterator<EditableFeature> updateds, java.util.Iterator<FeatureType.FeatureTypeChanged> featureTypesChanged, boolean isSelectionCompromised)
public FeatureStoreNotification notifyChange(java.lang.String notification, FeatureProvider data)
FeatureStoreProviderServices
notifyChange
in interface FeatureStoreProviderServices
public FeatureStoreNotification notifyChange(java.lang.String notification, Feature feature)
public FeatureStoreNotification notifyChange(java.lang.String notification, Expression expression)
public FeatureStoreNotification notifyChange(java.lang.String notification, Command command)
public FeatureStoreNotification notifyChange(java.lang.String notification, EditableFeatureType type)
public FeatureStoreNotification notifyChange(java.lang.String notification, Resource resource)
FeatureStoreProviderServices
notifyChange
in interface FeatureStoreProviderServices
public boolean isLocksSupported()
FeatureStore
isLocksSupported
in interface FeatureStore
public FeatureLocks getLocks() throws DataException
FeatureStore
getLocks
in interface FeatureStore
DataException
public void disableNotifications()
ComplexObservable
disableNotifications
in interface ComplexObservable
public void enableNotifications()
ComplexObservable
enableNotifications
in interface ComplexObservable
public void beginComplexNotification()
ComplexObservable
beginComplexNotification
in interface ComplexObservable
public 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 ComplexObservable
public void addObserver(Observer observer)
addObserver
in interface Observable
public void deleteObserver(Observer observer)
deleteObserver
in interface Observable
public void deleteObservers()
deleteObservers
in interface Observable
public void update(Observable observable, java.lang.Object notification)
Observer
Observable
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 Observer
s 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 int getSubmode()
getSubmode
in interface FeatureStore
public void edit() throws DataException
FeatureStore
edit
in interface FeatureStore
DataException
public void edit(int mode) throws DataException
FeatureStore
edit
in interface FeatureStore
DataException
public void edit(int mode, int submode) throws DataException
edit
in interface FeatureStore
DataException
public boolean isEditing()
FeatureStore
isEditing
in interface FeatureStore
public boolean isAppending()
FeatureStore
FeatureSet
.isAppending
in interface FeatureStore
public void update(EditableFeatureType type) throws DataException
FeatureStore
FeatureType
in the store with the changes in the
EditableFeatureType
.FeatureSet
from this store that are used will be invalidated.update
in interface FeatureStore
type
- an EditableFeatureType
with the changes.DataException
public void delete(Feature feature) throws DataException
FeatureStore
Feature
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 FeatureStore
feature
- The feature to be deleted.DataException
public void delete(java.lang.String filter)
delete
in interface FeatureStore
public void delete(Expression filter)
delete
in interface FeatureStore
public void doDelete(Feature feature) throws DataException
DataException
public void insert(FeatureSet set) throws DataException
FeatureStore
Feature
in the store.
The attributes of the feature are copied from the features of the set
by name, forcing the conversion of types if necessary.
Any FeatureSet
from this store that was still in use will be
invalidated.insert
in interface FeatureStore
DataException
public void insert(EditableFeature feature) throws DataException
FeatureStore
Feature
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 FeatureStore
feature
- The feature to be insertedDataException
public void doInsert(EditableFeature feature) throws DataException
DataException
public void update(EditableFeature feature) throws DataException
FeatureStore
Feature
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 FeatureStore
feature
- the feature to be updatedDataException
public void update(java.lang.Object... parameters) throws DataException
FeatureStore
Expression
or a Stringupdate
in interface FeatureStore
DataException
public void doUpdate(EditableFeature feature, Feature oldFeature) throws DataException
DataException
public void redo() throws RedoException
UndoRedoStack
redo
in interface UndoRedoStack
RedoException
- if there is an error performing de redo elementpublic void undo() throws UndoException
UndoRedoStack
undo
in interface UndoRedoStack
UndoException
- if there is an error performing de undo elementpublic java.util.List getRedoInfos()
UndoRedoStack
getRedoInfos
in interface UndoRedoStack
public java.util.List getUndoInfos()
UndoRedoStack
getUndoInfos
in interface UndoRedoStack
public FeatureCommandsStack getCommandsStack() throws DataException
DataException
public boolean cancelEditingQuietly()
cancelEditingQuietly
in interface FeatureStore
public void cancelEditing() throws DataException
FeatureStore
cancelEditing
in interface FeatureStore
DataException
public boolean finishEditingQuietly()
finishEditingQuietly
in interface FeatureStore
public void finishEditing() throws DataException
FeatureStore
finishEditing
in interface FeatureStore
DataException
public java.lang.String getEditingSession()
getEditingSession
in interface FeatureStore
public void commitChanges() throws DataException
commitChanges
in interface FeatureStore
DataException
public boolean canCommitChanges() throws DataException
FeatureStore
canCommitChanges
in interface FeatureStore
DataException
public void beginEditingGroup(java.lang.String description) throws NeedEditingModeException
FeatureStore
beginEditingGroup
in interface FeatureStore
description
- Description of the editing group.NeedEditingModeException
public void endEditingGroup() throws NeedEditingModeException
FeatureStore
endEditingGroup
in interface FeatureStore
NeedEditingModeException
public boolean isAppendModeSupported()
FeatureStore
isAppendModeSupported
in interface FeatureStore
public void export(DataServerExplorer explorer, java.lang.String provider, NewFeatureStoreParameters params, java.lang.String name) throws DataException
FeatureStore
export
in interface FeatureStore
explorer
- DataServerExplorer
targetparams
- New parameters of this store that will be used on the target
explorerDataException
public void copyTo(FeatureStore target)
copyTo
in interface FeatureStore
public DataSet getDataSet() throws DataException
DataStore
getDataSet
in interface DataStore
DataException
- if there is any error while loading the datapublic DataSet getDataSet(DataQuery dataQuery) throws DataException
DataStore
getDataSet
in interface DataStore
dataQuery
- defines the properties of the requested dataDataException
- if there is any error while loading the datapublic void getDataSet(Observer observer) throws DataException
DataStore
getDataSet
in interface DataStore
observer
- 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
DataStore
getDataSet
in interface DataStore
dataQuery
- 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
FeatureStore.getFeatureSet(FeatureQuery)
getFeatureSet
in interface FeatureStore
FeatureSet
ReadException
- if there is any error while reading the featuresDataException
#accept(org.gvsig.tools.visitor.Visitor)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException
FeatureStore
FeatureQuery
.
If FeatureQuery
is null, return al features in the store.
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 FeatureStore
featureQuery
- defines the characteristics of the features to return.FeatureSet
ReadException
- if there is any error while reading the features.DataException
DataStore.accept(org.gvsig.tools.visitor.Visitor, org.gvsig.fmap.dal.DataQuery)
public FeatureSet getFeatureSet(java.lang.String filter) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
getFeatureSet
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.FeatureSet
ReadException
- if there is any error while reading the featuresDataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(java.lang.String filter, java.lang.String sortBy) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
The sort order used is ascending.getFeatureSet
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.FeatureSet
ReadException
- if there is any error while reading the featuresDataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(Expression filter) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
getFeatureSet
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.FeatureSet
DataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(Expression filter, java.lang.String sortBy) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
The sort order used is ascending.getFeatureSet
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.FeatureSet
ReadException
- if there is any error while reading the featuresDataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(Expression filter, java.lang.String sortBy, boolean asc) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
getFeatureSet
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.FeatureSet
DataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public FeatureSet getFeatureSet(java.lang.String filter, java.lang.String sortBy, boolean asc) throws DataException
FeatureStore
FeatureStore.getFeatureSet(FeatureQuery)
getFeatureSet
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.FeatureSet
ReadException
- if there is any error while reading the featuresDataException
#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}
public java.util.List<Feature> getFeatures(java.lang.String filter)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
getFeatures
in interface FeatureStore
filter
- used to filter the features in the store.#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(String,String,boolean)}
public java.util.List<Feature> getFeatures(java.lang.String filter, java.lang.String sortBy)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
filter
- used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.List
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(String,String,boolean)}
public java.util.List<Feature> getFeatures(java.lang.String filter, java.lang.String sortBy, boolean asc)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.List
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(String,String,boolean)}
public java.util.List<Feature> getFeatures(Expression filter)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(Expression,String,boolean)}
public java.util.List<Feature> getFeatures(Expression filter, java.lang.String sortBy)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.List
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(Expression,String,boolean)}
public java.util.List<Feature> getFeatures(Expression filter, java.lang.String sortBy, boolean asc)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
filter
- an Expression
used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.List
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(Expression,String,boolean)}
public java.util.List<Feature> getFeatures(FeatureQuery query)
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
query
- to filter and sort the returned feature listList
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}
public java.util.List<Feature> getFeatures(FeatureQuery query, int pageSize)
FeatureStore
List
and UnmodifiableBasicList64
to support large list of features.
The returned list of Features is paginated, and the page size
used is "pageSize".
If the page size is less than or equal to 0, the default page size of
100 will be used.getFeatures
in interface FeatureStore
query
- to filter and sort the returned feature listpageSize
- the page size of the listList
/UnmodifiableBasicList64
of featurespublic java.util.List<Feature> getFeatures()
FeatureStore
FeatureStore.getFeatures(FeatureQuery, int)
using the default page size.getFeatures
in interface FeatureStore
List
/UnmodifiableBasicList64
of features#getFeatures(FeatureQuery, int)}
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64()
getFeatures64
in interface FeatureStore
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(java.lang.String filter)
getFeatures64
in interface FeatureStore
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(java.lang.String filter, java.lang.String sortBy, boolean asc)
getFeatures64
in interface FeatureStore
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize)
getFeatures64
in interface FeatureStore
public Feature first() throws DataException
FeatureStore
Feature
of the store.first
in interface FeatureStore
Feature
or null if the store is empty.DataException
public Feature findFirst(java.lang.String filter) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(String,String,boolean)}
public Feature findFirst(java.lang.String filter, java.lang.String sortBy) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- Attribute names separated by commas used to sort the list to return.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(String,String,boolean)}
public Feature findFirst(java.lang.String filter, java.lang.String sortBy, boolean asc) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(String,String,boolean)}
public Feature findFirst(java.lang.String filter, Expression sortBy, boolean asc) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- Expressionasc
- use order ascending, true, or descending, false.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(String,String,boolean)}
public Feature findFirst(Expression filter) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(Expession,String,boolean)}
public Feature findFirst(Expression filter, java.lang.String sortBy) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- Attribute names separated by commas used to sort the list to return.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(Expession,String,boolean)}
public Feature findFirst(Expression filter, java.lang.String sortBy, boolean asc) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(Expession,String,boolean)}
public Feature findFirst(Expression filter, Expression sortBy, boolean asc) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
filter
- String
expression used to filter the features.sortBy
- expression used to sort featuresasc
- use order ascending, true, or descending, false.Feature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(Expession,String,boolean)}
public Feature findFirst(FeatureQuery query) throws DataException
FeatureStore
Feature
that meets the criteria indicated.
It is a utility method that calls FeatureStore.findFirst(FeatureQuery)
.findFirst
in interface FeatureStore
query
- to filter and sort the returned feature listFeature
or null if the filter don't return any feature.DataException
#findFirst(FeatureQuery)}, {@link #createFeatureQuery(Expession,String,boolean)}
public void accept(Visitor visitor) throws BaseException
DataStore
Visitor
.
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 DataStore
accept
in interface Visitable
visitor
- 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
DataStore
Visitor
.
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 DataStore
visitor
- 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
DataException
public void getFeatureSet(Observer observer) throws DataException
FeatureStore
getFeatureSet
in interface FeatureStore
observer
- to be notified of each loaded FeatureDataException
- if there is any error while loading the featurespublic void getFeatureSet(FeatureQuery query, Observer observer) throws DataException
FeatureStore
FeatureSet
loaded.getFeatureSet
in interface FeatureStore
query
- defines the characteristics of the features to return.observer
- to be notified when loading is finished.DataException
- if there is any error while loading the featurespublic Feature getFeatureByReference(FeatureReference reference) throws DataException
FeatureStore
getFeatureByReference
in interface FeatureStore
reference
- a unique FeatureReferenceDataException
public Feature getFeatureByReference(FeatureReference reference, FeatureType featureType) throws DataException
FeatureStore
getFeatureByReference
in interface FeatureStore
reference
- a unique FeatureReferencefeatureType
- FeatureType to which the requested Feature belongsDataException
public FeatureType getDefaultFeatureType() throws DataException
FeatureStoreProviderServices
FeatureType
of the storegetDefaultFeatureType
in interface FeatureStore
getDefaultFeatureType
in interface FeatureStoreProviderServices
FeatureType
.DataException
public FeatureType getDefaultFeatureTypeQuietly()
getDefaultFeatureTypeQuietly
in interface FeatureStore
public FeatureType getFeatureType(java.lang.String featureTypeId) throws DataException
FeatureStore
FeatureType
matches with
featureTypeId.getFeatureType
in interface FeatureStore
FeatureType
.DataException
public FeatureType getProviderDefaultFeatureType()
public java.util.List getFeatureTypes() throws DataException
FeatureStore
FeatureType
(s).getFeatureTypes
in interface FeatureStore
getFeatureTypes
in interface FeatureStoreProviderServices
FeatureType
(s).DataException
public java.util.List getProviderFeatureTypes() throws DataException
DataException
public Feature createFeature(FeatureProvider data) throws DataException
FeatureStoreProviderServices
Feature
instance for FeatureProvider
data
FeatureProvider
instances instead FeaturecreateFeature
in interface FeatureStoreProviderServices
Feature
DataException
public Feature createFeature(FeatureProvider data, FeatureType type) throws DataException
DataException
public EditableFeature createNewFeature(FeatureType type, Feature defaultValues) throws DataException
FeatureStore
FeatureType
and uses the given
Feature
as default values to initialize it.createNewFeature
in interface FeatureStore
type
- the new feature's feature typedefaultValues
- a feature whose values are used as default values for the new
feature.DataException
public EditableFeature createNewFeature(FeatureType type, boolean defaultValues) throws DataException
FeatureStore
FeatureType
. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.createNewFeature
in interface FeatureStore
type
- the new feature's feature typedefaultValues
- if true the new feature is initialized with each attribute's
default value.DataException
public EditableFeature createNewFeature(boolean defaultValues) throws DataException
FeatureStore
FeatureType
. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.createNewFeature
in interface FeatureStore
defaultValues
- if true the new feature is initialized with each attribute's
default value.DataException
public EditableFeature createNewFeature() throws DataException
FeatureStore
EditableFeature
createNewFeature
in interface FeatureStore
DataException
public EditableFeature createNewFeature(Feature defaultValues) throws DataException
FeatureStore
FeatureType
.
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 FeatureStore
defaultValues
- the values to initialize the new feature.DataException
public EditableFeature createNewFeature(JsonObject defaultValues) throws DataException
FeatureStore
FeatureType
. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.createNewFeature
in interface FeatureStore
defaultValues
- if true the new feature is initialized with each attribute's
default value.DataException
public EditableFeatureType createFeatureType()
FeatureStoreProviderServices
createFeatureType
in interface FeatureStoreProviderServices
public EditableFeatureType createFeatureType(java.lang.String id)
FeatureStoreProviderServices
createFeatureType
in interface FeatureStoreProviderServices
public FeatureIndexes getIndexes()
FeatureStore
getIndexes
in interface FeatureStore
public FeatureIndex createIndex(FeatureType featureType, java.lang.String attributeName, java.lang.String indexName) throws DataException
FeatureStore
createIndex
in interface FeatureStore
featureType
- The FeatureType to which the indexed attribute belongs.attributeName
- The name of the attributed to be indexedindexName
- The index nameFeatureIndex
FeatureIndexException
- if there is an error creating the indexDataException
public FeatureIndex createIndex(java.lang.String indexTypeName, FeatureType featureType, java.lang.String attributeName, java.lang.String indexName) throws DataException
FeatureStore
createIndex
in interface FeatureStore
indexTypeName
- 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 nameFeatureIndex
FeatureIndexException
- if there is an error creating the indexDataException
public FeatureIndex createIndex(FeatureType featureType, java.lang.String attributeName, java.lang.String indexName, Observer observer) throws DataException
FeatureStore
Observer
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 FeatureStore
featureType
- 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.FeatureIndex
FeatureIndexException
- if there is an error creating the indexDataException
FeatureStoreNotification.INDEX_FILLING_STARTED
,
FeatureStoreNotification.INDEX_FILLING_SUCCESS
,
FeatureStoreNotification.INDEX_FILLING_CANCELLED
,
FeatureStoreNotification.INDEX_FILLING_ERROR
public FeatureIndex createIndex(java.lang.String indexTypeName, FeatureType featureType, java.lang.String attributeName, java.lang.String indexName, Observer observer) throws DataException
FeatureStore
Observer
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 FeatureStore
indexTypeName
- 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.FeatureIndex
FeatureIndexException
- if there is an error creating the indexDataException
FeatureStoreNotification.INDEX_FILLING_STARTED
,
FeatureStoreNotification.INDEX_FILLING_SUCCESS
,
FeatureStoreNotification.INDEX_FILLING_CANCELLED
,
FeatureStoreNotification.INDEX_FILLING_ERROR
public FeatureStoreTransforms getTransforms()
FeatureStore
getTransforms
in interface FeatureStore
public FeatureQuery createFeatureQuery()
FeatureStore
FeatureQuery
associated to this store.createFeatureQuery
in interface FeatureStore
FeatureQuery
associated to this store.public FeatureQuery createFeatureQuery(Expression filter, java.lang.String sortBy, boolean asc)
FeatureStore
FeatureQuery
with the restrictions indicateds.
"filter" will be null or Expression
valid for the store.
"sortBy" can be null to use the store's default order.
The parameter sortBy can be an attribute name or a comma separated list.
Each attribute name can be preceded or followed by "+" or "-" to indicate
the order to use to sort by that attribute.
If no "+" or "-" is indicated, the "asc" parameter will be used to
determine if the order is ascending, "true" or decent, "false".createFeatureQuery
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.FeatureQuery
with the restrictions.FeatureQuery}
public FeatureQuery createFeatureQuery(java.lang.String filter)
createFeatureQuery
in interface FeatureStore
public FeatureQuery createFeatureQuery(Expression filter)
createFeatureQuery
in interface FeatureStore
public FeatureQuery createFeatureQuery(java.lang.String filter, java.lang.String sortBy, boolean asc)
FeatureStore
FeatureQuery
with the restrictions indicateds.
"filter" will be null or a valid filter expression for the store.
"sortBy" can be null to use the store's default order.
The parameter sortBy can be an attribute name or a comma separated list.
Each attribute name can be preceded or followed by "+" or "-" to indicate
the order to use to sort by that attribute.
If no "+" or "-" is indicated, the "asc" parameter will be used to
determine if the order is ascending, "true" or decent, "false".createFeatureQuery
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- Attribute names separated by commas used to sort the list to return.asc
- use order ascending, true, or descending, false.FeatureQuery
with the restrictions.FeatureQuery}
public FeatureQuery createFeatureQuery(Expression filter, Expression sortBy, boolean asc)
FeatureStore
FeatureQuery
with the restrictions indicateds.
"filter" will be null or Expression
valid for the store.
"sortBy" can be null to use the store's default order.
The parameter sortBy can be an attribute name or a comma separated list.
Each attribute name can be preceded or followed by "+" or "-" to indicate
the order to use to sort by that attribute.
If no "+" or "-" is indicated, the "asc" parameter will be used to
determine if the order is ascending, "true" or decent, "false".createFeatureQuery
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- expression used to order the features in the store.asc
- use order ascending, true, or descending, false.FeatureQuery
with the restrictions.FeatureQuery}
public FeatureQuery createFeatureQuery(java.lang.String filter, Expression sortBy, boolean asc)
FeatureStore
FeatureQuery
with the restrictions indicateds.
"filter" will be null or Expression
valid for the store.
"sortBy" can be null to use the store's default order.
The parameter sortBy can be an attribute name or a comma separated list.
Each attribute name can be preceded or followed by "+" or "-" to indicate
the order to use to sort by that attribute.
If no "+" or "-" is indicated, the "asc" parameter will be used to
determine if the order is ascending, "true" or decent, "false".createFeatureQuery
in interface FeatureStore
filter
- an String
expression used to filter the features in the store.sortBy
- expression used to order the features in the store.asc
- use order ascending, true, or descending, false.FeatureQuery
with the restrictions.FeatureQuery}
public DataQuery createQuery()
DataStore
DataQuery
.createQuery
in interface DataStore
DataQuery
instance.public boolean canRedo()
UndoRedoStack
canRedo
in interface UndoRedoStack
public boolean canUndo()
UndoRedoStack
canUndo
in interface UndoRedoStack
public void redo(int num) throws RedoException
UndoRedoStack
redo
in interface UndoRedoStack
num
- the number of elements to redoRedoException
- if there is an error performing de redo elementpublic void undo(int num) throws UndoException
UndoRedoStack
undo
in interface UndoRedoStack
num
- the number of elements to undoUndoException
- if there is an error performing de undo elementpublic java.lang.Object getMetadataID()
Metadata
getMetadataID
in interface Metadata
public DynClass getDynClass()
getDynClass
in interface DynObject
public java.lang.Object getDynValue(java.lang.String name) throws DynFieldNotFoundException
getDynValue
in interface DynObject
DynFieldNotFoundException
public boolean hasDynValue(java.lang.String name)
hasDynValue
in interface DynObject
public boolean hasDynMethod(java.lang.String name)
hasDynMethod
in interface DynObject_v2
public java.lang.Object invokeDynMethod(java.lang.String name, java.lang.Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public java.lang.Object invokeDynMethod(int code, java.lang.Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public void setDynValue(java.lang.String name, java.lang.Object value) throws DynFieldNotFoundException
setDynValue
in interface DynObject
DynFieldNotFoundException
public java.util.Set getMetadataChildren()
Metadata
getMetadataChildren
in interface Metadata
public java.lang.String getMetadataName()
Metadata
getMetadataName
in interface Metadata
public FeatureTypeManager getFeatureTypeManager()
public long getFeatureCount() throws DataException
FeatureStore
getFeatureCount
in interface FeatureStore
DataException
public FeatureType getProviderFeatureType(java.lang.String featureTypeId)
FeatureStoreProviderServices
FeatureType
of FeatureStoreProvider
.getProviderFeatureType
in interface FeatureStoreProviderServices
public FeatureProvider getFeatureProviderFromFeature(Feature feature)
FeatureStoreProviderServices
FeatureProvider
from a Feature
instance.getFeatureProviderFromFeature
in interface FeatureStoreProviderServices
public DataStore getStore()
DataStoreProviderServices
getStore
in interface DataStoreProviderServices
public FeatureStore getFeatureStore()
FeatureStoreProviderServices
getFeatureStore
in interface FeatureStoreProviderServices
public void createCache(java.lang.String name, DynObject parameters) throws DataException
createCache
in interface FeatureStore
DataException
public FeatureCache getCache()
getCache
in interface DataStore
getCache
in interface FeatureStore
public java.lang.String getName()
DataStore
getName
in interface DataStore
getName
in interface FeatureStoreProviderServices
public java.lang.String getFullName()
DataStore
getFullName
in interface DataStore
protected java.lang.String getFullNameForTraces()
public java.lang.String getProviderName()
DataStore
getProviderName
in interface DataStore
public boolean isKnownEnvelope()
FeatureStore
FeatureStoreProvider#getEnvelope()
method doesn't return
the full envelope.isKnownEnvelope
in interface FeatureStore
public boolean hasRetrievedFeaturesLimit()
FeatureStore
hasRetrievedFeaturesLimit
in interface FeatureStore
public int getRetrievedFeaturesLimit()
FeatureStore
FeatureStoreProvider#hasRetrievedFeaturesLimit()
returns
true,
it returns the limit of features retrieved from the provider.getRetrievedFeaturesLimit
in interface FeatureStore
public Interval getInterval()
DataStore
Interval
of the store, that means the temporal
interval where the store has valid data.getInterval
in interface DataStore
public java.util.Collection getTimes()
DataStore
public java.util.Collection getTimes(Interval interval)
DataStore
public void setTimeSupport(FeatureStoreTimeSupport timeSupport)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- 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)
FeatureStore
getFeature
in interface FeatureStore
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable<Feature>
public ExpressionBuilder createExpressionBuilder()
createExpressionBuilder
in interface FeatureStore
public ExpressionBuilder createExpression()
createExpression
in interface FeatureStore
public FeatureSet features() throws DataException
DataException
public DataStoreProviderFactory getProviderFactory()
getProviderFactory
in interface DataStore
public void useCache(java.lang.String providerName, DynObject parameters) throws DataException
useCache
in interface DataStore
DataException
public boolean isBroken()
isBroken
in interface FeatureStore
public java.lang.Throwable getBreakingsCause()
getBreakingsCause
in interface FeatureStore
public SpatialIndex wrapSpatialIndex(SpatialIndex index)
wrapSpatialIndex
in interface FeatureStore
public FeatureReference getFeatureReference(java.lang.String code)
getFeatureReference
in interface FeatureStore
public long getPendingChangesCount()
FeatureStore
getPendingChangesCount
in interface FeatureStore
public ResourcesStorage getResourcesStorage()
getResourcesStorage
in interface DataStore
getResourcesStorage
in class AbstractDataStore
public StoresRepository getStoresRepository()
getStoresRepository
in interface DataStore
getStoresRepository
in class AbstractDataStore
public Feature getSampleFeature()
getSampleFeature
in interface FeatureStore
public boolean supportReferences()
FeatureStore
supportReferences
in interface FeatureStore
public boolean isTemporary()
FeatureStore
isTemporary
in interface FeatureStore
public void setTemporary(java.lang.Boolean temporary)
setTemporary
in interface FeatureStore
public FeatureType getOriginalFeatureType(FeatureType featureType)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface PropertiesSupport
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface PropertiesSupport
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface PropertiesSupport
public Feature getOriginalFeature(FeatureReference id)
getOriginalFeature
in interface FeatureStore
public Feature getOriginalFeature(Feature feature)
getOriginalFeature
in interface FeatureStore
public boolean isFeatureModified(FeatureReference id)
isFeatureModified
in interface FeatureStore
public boolean isFeatureModified(Feature feature)
isFeatureModified
in interface FeatureStore
public void setTransaction(DataTransaction transaction)
setTransaction
in interface SupportTransactions
public DataTransaction getTransaction()
getTransaction
in interface SupportTransactions
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String createUniqueID()
public java.util.List<FeatureReference> getEditedFeatures()
getEditedFeatures
in interface FeatureStore
public java.util.List<FeatureReference> getEditedFeaturesNotValidated()
getEditedFeaturesNotValidated
in interface FeatureStore
public java.util.Iterator<Feature> getFeaturesIterator(java.util.Iterator<FeatureReference> references)
getFeaturesIterator
in interface FeatureStore
public java.lang.Iterable<Feature> getFeaturesIterable(java.util.Iterator<FeatureReference> references)
getFeaturesIterable
in interface FeatureStore
public boolean isFeatureSelectionAvailable()
isFeatureSelectionAvailable
in interface FeatureStore
public boolean canBeEdited()
canBeEdited
in interface FeatureStore
public java.lang.String getLabel()
getLabel
in interface FeatureStore
public void addRequiredAttributes(FeatureQuery fq)
public java.util.function.Predicate<FeatureStoreNotification> setNotificationsFilter(java.util.function.Predicate<FeatureStoreNotification> filter)
setNotificationsFilter
in interface FeatureStore
public boolean allowGeometry(java.lang.String name, Geometry geometry)
allowGeometry
in interface FeatureStore