public interface FeatureStore extends DataStore, UndoRedoStack, Cloneable, java.lang.Iterable<Feature>, PropertiesSupport, Size64
A FeatureStore is a type of store whose data consists on sets of
Feature(s). Feature(s) from the same FeatureStore can be of
different FeatureType(s) (as in GML format for instance).
FeatureStore allows:
FeatureType. A FeatureStore always has one
and only one default FeatureType.
FeatureType(s) defined in the FeatureStore.
FeatureSet)
through FeatureQuery, as well as background loading.
Envelope (AKA bounding box or extent) of the
store.
FeatureType(s).
Geometry types.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METADATA_DEFINITION_NAME |
static int |
MODE_APPEND
Indicates that this store is in append mode
|
static int |
MODE_FULLEDIT
Indicates that this store is in full edit mode
|
static int |
MODE_PASS_THROUGH |
static int |
MODE_QUERY
Indicates that this store is in query mode
|
static int |
MODE_UNKNOWN |
static int |
SUBMODE_MERGE
En este modo hace un merge contra la base de datos, si existe lo actualizada y si no lo inserta
|
static int |
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| Modifier and Type | Method and Description |
|---|---|
boolean |
allowGeometry(java.lang.String name,
Geometry geometry) |
boolean |
allowWrite()
Indicates whether this store allows writing.
|
void |
beginEditingGroup(java.lang.String description)
Initiates an editing group.
|
boolean |
canBeEdited() |
void |
cancelEditing()
Cancels all editing since the last edit().
|
boolean |
cancelEditingQuietly() |
static boolean |
cancelEditingQuietly(FeatureStore store) |
boolean |
canCommitChanges()
Returns true if you can call CommitChanges method.
|
boolean |
canWriteGeometry(int gvSIGgeometryType)
Deprecated.
Mirar de cambiarlo a metadatos
|
void |
commitChanges()
Save changes in the provider without leaving the edit mode.
|
void |
copyTo(FeatureStore target) |
void |
createCache(java.lang.String name,
DynObject parameters) |
ExpressionBuilder |
createExpression()
Deprecated.
use createExpressionBuilder
|
ExpressionBuilder |
createExpressionBuilder() |
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 |
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) |
void |
delete(Expression filter) |
void |
delete(Feature feature)
Deletes a
Feature from the store. |
void |
delete(java.lang.String filter) |
void |
edit()
Enters editing state.
|
void |
edit(int mode)
Enters editing state specifying the editing mode.
|
void |
edit(int mode,
int submode) |
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.
|
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() |
static boolean |
finishEditingQuietly(FeatureStore store) |
Feature |
first()
Return the first
Feature of the store. |
java.lang.Throwable |
getBreakingsCause() |
FeatureCache |
getCache() |
FeatureType |
getDefaultFeatureType()
Returns this store's default
FeatureType. |
FeatureType |
getDefaultFeatureTypeQuietly() |
java.util.List<FeatureReference> |
getEditedFeatures() |
java.util.List<FeatureReference> |
getEditedFeaturesNotValidated() |
java.lang.String |
getEditingSession() |
Envelope |
getEnvelope()
Returns this store's total envelope (extent).
|
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.
|
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
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
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
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
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 featureQuery,
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) |
FeatureType |
getFeatureType(java.lang.String featureTypeId)
Returns this store's featureType
FeatureType matches with
featureTypeId. |
java.util.List |
getFeatureTypes()
Returns this store's
FeatureType(s). |
FeatureIndexes |
getIndexes()
Returns a FeatureIndexes structure containing all available indexes in
the store.
|
java.lang.String |
getLabel() |
static java.lang.String |
getLabel(FeatureStore store) |
FeatureLocks |
getLocks()
Returns the set of locked features
|
int |
getMode() |
Feature |
getOriginalFeature(Feature feature) |
Feature |
getOriginalFeature(FeatureReference id) |
DataStoreParameters |
getParameters()
Returns this store's parameters.
|
long |
getPendingChangesCount()
Devuelbe el numero de operaciones pendientes de guardar en una sesion
de edicion.
|
int |
getRetrievedFeaturesLimit()
If the
FeatureStoreProvider#hasRetrievedFeaturesLimit() returns
true,
it returns the limit of features retrieved from the provider. |
Feature |
getSampleFeature() |
IProjection |
getSRSDefaultGeometry()
Deprecated.
use getDefaultFeatureType().getDefaultSRS()
|
int |
getSubmode() |
FeatureStoreTransforms |
getTransforms()
Returns this store transforms
|
boolean |
hasRetrievedFeaturesLimit()
Return if the maximum number of features provided by the
provider are limited.
|
void |
insert(EditableFeature feature)
Inserts a
Feature in the store. |
void |
insert(FeatureSet set)
Inserts a set of
Feature in the store. |
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.function.Predicate<FeatureStoreNotification> |
setNotificationsFilter(java.util.function.Predicate<FeatureStoreNotification> filter) |
void |
setSelection(FeatureSet selection)
Sets the selection to the passed
FeatureSet |
void |
setTemporary(java.lang.Boolean temporary) |
boolean |
supportReferences()
Return true when the default feature type of the store
support references.
|
void |
update(EditableFeature feature)
Updates a
Feature in the store with the changes in the
EditableFeature. |
void |
update(EditableFeatureType featureType)
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.
|
SpatialIndex |
wrapSpatialIndex(SpatialIndex index) |
accept, accept, createQuery, createSelection, getChildren, getDataSet, getDataSet, getDataSet, getDataSet, getExplorer, getFullName, getFullNameQuietly, getInterval, getName, getNameQuietly, getProviderFactory, getProviderName, getResourcesStorage, getSelection, getStoresRepository, getTimes, getTimes, refresh, setSelection, useCachebeginComplexNotification, disableNotifications, enableNotifications, endComplexNotificationaddObserver, deleteObserver, deleteObserversloadFromState, saveToStategetMetadataChildren, getMetadataID, getMetadataNamedisposehasDynMethodclear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuecanRedo, canUndo, getRedoInfos, getUndoInfos, redo, redo, undo, undoclone, cloneQuietly, cloneQuietlygetProperties, getProperty, setPropertystatic final java.lang.String METADATA_DEFINITION_NAME
static final int MODE_UNKNOWN
static final int MODE_QUERY
static final int MODE_FULLEDIT
static final int MODE_APPEND
static final int MODE_PASS_THROUGH
static final int SUBMODE_NONE
static final int SUBMODE_MERGE
static java.lang.String getLabel(FeatureStore store)
boolean allowWrite()
FeatureType getDefaultFeatureType() throws DataException
FeatureType.FeatureType.DataExceptionFeatureType getDefaultFeatureTypeQuietly()
FeatureType getFeatureType(java.lang.String featureTypeId) throws DataException
FeatureType matches with
featureTypeId.featureTypeId - FeatureType.DataExceptionjava.util.List getFeatureTypes()
throws DataException
FeatureType(s).FeatureType(s).DataExceptionDataStoreParameters getParameters()
getParameters in interface DataStoreDataStoreParameters containing this store's parametersboolean canWriteGeometry(int gvSIGgeometryType)
throws DataException
gvSIGgeometryType - DataExceptionEnvelope getEnvelope() throws DataException
null if
store not have geometry informationDataExceptionIProjection getSRSDefaultGeometry() throws DataException
DataExceptionvoid export(DataServerExplorer explorer, java.lang.String provider, NewFeatureStoreParameters params, java.lang.String name) throws DataException
explorer - DataServerExplorer targetprovider - params - New parameters of this store that will be used on the target
explorerDataExceptionvoid copyTo(FeatureStore target)
FeatureQuery createFeatureQuery(java.lang.String filter, java.lang.String sortBy, boolean asc)
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".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}FeatureQuery createFeatureQuery(java.lang.String filter)
FeatureQuery createFeatureQuery(Expression filter)
FeatureQuery createFeatureQuery(Expression filter, java.lang.String sortBy, boolean asc)
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".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}FeatureQuery createFeatureQuery(Expression filter, Expression sortBy, boolean asc)
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".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}FeatureQuery createFeatureQuery(java.lang.String filter, Expression sortBy, boolean asc)
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".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}FeatureSet getFeatureSet() throws DataException
getFeatureSet(FeatureQuery)FeatureSetReadException - if there is any error while reading the featuresDataException#accept(org.gvsig.tools.visitor.Visitor)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(java.lang.String filter) throws DataException
getFeatureSet(FeatureQuery)filter - an String expression used to filter the features in the store.FeatureSetReadException - if there is any error while reading the featuresDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(java.lang.String filter, java.lang.String sortBy) throws DataException
getFeatureSet(FeatureQuery)
The sort order used is ascending.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.FeatureSetReadException - if there is any error while reading the featuresDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(java.lang.String filter, java.lang.String sortBy, boolean asc) throws DataException
getFeatureSet(FeatureQuery)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.FeatureSetReadException - if there is any error while reading the featuresDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(Expression filter) throws DataException
getFeatureSet(FeatureQuery)filter - an Expression used to filter the features in the store.FeatureSetDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(Expression filter, java.lang.String sortBy) throws DataException
getFeatureSet(FeatureQuery)
The sort order used is ascending.filter - an Expression used to filter the features in the store.sortBy - Attribute names separated by commas used to sort the list to return.FeatureSetReadException - if there is any error while reading the featuresDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(Expression filter, java.lang.String sortBy, boolean asc) throws DataException
getFeatureSet(FeatureQuery)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.FeatureSetDataException#createFeatureQuery(Expression,String,boolean)}, {@link #getFeatureSet(FeatureQuery)}FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException
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.
featureQuery - defines the characteristics of the features to return.FeatureSetReadException - if there is any error while reading the features.DataExceptionDataStore.accept(org.gvsig.tools.visitor.Visitor, org.gvsig.fmap.dal.DataQuery)void getFeatureSet(FeatureQuery featureQuery, Observer observer) throws DataException
FeatureSet loaded.featureQuery - 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 featuresvoid getFeatureSet(Observer observer) throws DataException
observer - to be notified of each loaded FeatureDataException - if there is any error while loading the featuresjava.util.List<Feature> getFeatures(FeatureQuery query, int pageSize)
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.query - to filter and sort the returned feature listpageSize - the page size of the listList/UnmodifiableBasicList64 of featuresjava.util.List<Feature> getFeatures(FeatureQuery query)
getFeatures(FeatureQuery, int)
using the default page size.query - to filter and sort the returned feature listList/UnmodifiableBasicList64 of features#getFeatures(FeatureQuery, int)}java.util.List<Feature> getFeatures()
getFeatures(FeatureQuery, int)
using the default page size.List/UnmodifiableBasicList64 of features#getFeatures(FeatureQuery, int)}java.util.List<Feature> getFeatures(java.lang.String filter)
getFeatures(FeatureQuery, int)filter - used to filter the features in the store.#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(String,String,boolean)}java.util.List<Feature> getFeatures(java.lang.String filter, java.lang.String sortBy)
getFeatures(FeatureQuery, int)
using the default page size.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)}java.util.List<Feature> getFeatures(java.lang.String filter, java.lang.String sortBy, boolean asc)
getFeatures(FeatureQuery, int)
using the default page size.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)}java.util.List<Feature> getFeatures(Expression filter)
getFeatures(FeatureQuery, int)
using the default page size.filter - an Expression used to filter the features in the store.#getFeatures(FeatureQuery, int)}, {@link #createFeatureQuery(Expression,String,boolean)}java.util.List<Feature> getFeatures(Expression filter, java.lang.String sortBy)
getFeatures(FeatureQuery, int)
using the default page size.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)}java.util.List<Feature> getFeatures(Expression filter, java.lang.String sortBy, boolean asc)
getFeatures(FeatureQuery, int)
using the default page size.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)}GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64()
GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(java.lang.String filter)
GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(java.lang.String filter, java.lang.String sortBy, boolean asc)
GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize)
Feature first() throws DataException
Feature of the store.Feature or null if the store is empty.DataExceptionFeature findFirst(java.lang.String filter) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(java.lang.String filter, java.lang.String sortBy) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(java.lang.String filter, java.lang.String sortBy, boolean asc) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(java.lang.String filter, Expression sortBy, boolean asc) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(Expression filter) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(Expression filter, java.lang.String sortBy) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(Expression filter, java.lang.String sortBy, boolean asc) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(Expression filter, Expression sortBy, boolean asc) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature findFirst(FeatureQuery query) throws DataException
Feature that meets the criteria indicated.
It is a utility method that calls findFirst(FeatureQuery).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)}Feature getFeatureByReference(FeatureReference reference) throws DataException
reference - a unique FeatureReferenceDataExceptionFeature getFeatureByReference(FeatureReference reference, FeatureType featureType) throws DataException
reference - a unique FeatureReferencefeatureType - FeatureType to which the requested Feature belongsDataExceptionvoid edit() throws DataException
DataExceptionvoid edit(int mode) throws DataException
mode - DataExceptionvoid edit(int mode,
int submode)
throws DataException
DataExceptionint getSubmode()
int getMode()
void cancelEditing()
throws DataException
DataExceptionboolean cancelEditingQuietly()
static boolean cancelEditingQuietly(FeatureStore store)
void finishEditing()
throws DataException
DataExceptionboolean finishEditingQuietly()
static boolean finishEditingQuietly(FeatureStore store)
void commitChanges()
throws DataException
DataExceptionboolean canCommitChanges()
throws DataException
DataExceptionboolean isEditing()
boolean isAppending()
FeatureSet.void update(EditableFeatureType featureType) throws DataException
FeatureType in the store with the changes in the
EditableFeatureType.FeatureSet from this store that are used will be invalidated.featureType - an EditableFeatureType with the changes.DataExceptionvoid update(EditableFeature feature) throws DataException
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).feature - the feature to be updatedDataExceptionvoid update(java.lang.Object... parameters)
throws DataException
Expression or a Stringparameters - DataExceptionvoid delete(Feature feature) throws DataException
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.feature - The feature to be deleted.DataExceptionvoid delete(java.lang.String filter)
void delete(Expression filter)
void insert(EditableFeature feature) throws DataException
Feature in the store.FeatureSet from this store that was still in use will be
invalidated. You can override this using
FeatureSet.insert(EditableFeature).feature - The feature to be insertedDataExceptionvoid insert(FeatureSet set) throws DataException
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.set, - set with the source features.DataExceptionEditableFeature createNewFeature() throws DataException
EditableFeatureDataExceptionEditableFeature createNewFeature(FeatureType type, Feature defaultValues) throws DataException
FeatureType and uses the given
Feature as default values to initialize it.type - the new feature's feature typedefaultValues - a feature whose values are used as default values for the new
feature.DataExceptionEditableFeature createNewFeature(FeatureType type, boolean defaultValues) throws DataException
FeatureType. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.type - the new feature's feature typedefaultValues - if true the new feature is initialized with each attribute's
default value.DataExceptionEditableFeature createNewFeature(boolean defaultValues) throws DataException
FeatureType. The flag
defaultValues is used to indicate whether the new feature should be
initialized with default values or not.defaultValues - if true the new feature is initialized with each attribute's
default value.DataExceptionEditableFeature createNewFeature(Feature defaultValues) throws DataException
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.defaultValues - the values to initialize the new feature.DataExceptionEditableFeature createNewFeature(JsonObject defaultValues) throws DataException
DataExceptionboolean isAppendModeSupported()
void beginEditingGroup(java.lang.String description)
throws NeedEditingModeException
description - Description of the editing group.NeedEditingModeExceptionvoid endEditingGroup()
throws NeedEditingModeException
NeedEditingModeExceptionFeatureIndex createIndex(FeatureType featureType, java.lang.String attributeName, java.lang.String indexName) throws DataException
featureType - 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 indexDataExceptionFeatureIndex createIndex(java.lang.String indexTypeName, FeatureType featureType, java.lang.String attributeName, java.lang.String indexName) throws DataException
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 nameFeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionFeatureIndex createIndex(FeatureType featureType, java.lang.String attributeName, java.lang.String indexName, Observer observer) throws DataException
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.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.FeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionFeatureStoreNotification.INDEX_FILLING_STARTED,
FeatureStoreNotification.INDEX_FILLING_SUCCESS,
FeatureStoreNotification.INDEX_FILLING_CANCELLED,
FeatureStoreNotification.INDEX_FILLING_ERRORFeatureIndex createIndex(java.lang.String indexTypeName, FeatureType featureType, java.lang.String attributeName, java.lang.String indexName, Observer observer) throws DataException
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.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.FeatureIndexFeatureIndexException - if there is an error creating the indexDataExceptionFeatureStoreNotification.INDEX_FILLING_STARTED,
FeatureStoreNotification.INDEX_FILLING_SUCCESS,
FeatureStoreNotification.INDEX_FILLING_CANCELLED,
FeatureStoreNotification.INDEX_FILLING_ERRORFeatureIndexes getIndexes()
void setSelection(FeatureSet selection) throws DataException
FeatureSetselection - A FeatureSet with the requested selectionDataExceptionFeatureSelection createFeatureSelection() throws DataException
FeatureSelectionFeatureSelectionDataExceptionFeatureSelection createLargeFeatureSelection() throws DataException
DataExceptionFeatureSelection createMemoryFeatureSelection() throws DataException
FeatureSelectionFeatureSelectionDataExceptionFeatureSelection getFeatureSelection() throws DataException
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.FeatureSelection.DataExceptionFeatureSelection getFeatureSelectionQuietly()
boolean isLocksSupported()
FeatureLocks getLocks() throws DataException
DataExceptionFeatureStoreTransforms getTransforms()
FeatureQuery createFeatureQuery()
FeatureQuery associated to this store.FeatureQuery associated to this store.long getFeatureCount()
throws DataException
DataExceptionboolean isKnownEnvelope()
FeatureStoreProvider#getEnvelope() method doesn't return
the full envelope.boolean hasRetrievedFeaturesLimit()
int getRetrievedFeaturesLimit()
FeatureStoreProvider#hasRetrievedFeaturesLimit() returns
true,
it returns the limit of features retrieved from the provider.Feature getFeature(DynObject dynobject)
dynobject - ExpressionBuilder createExpressionBuilder()
ExpressionBuilder createExpression()
void createCache(java.lang.String name,
DynObject parameters)
throws DataException
DataExceptionFeatureCache getCache()
boolean isBroken()
java.lang.Throwable getBreakingsCause()
boolean isTemporary()
void setTemporary(java.lang.Boolean temporary)
SpatialIndex wrapSpatialIndex(SpatialIndex index)
index - FeatureReference getFeatureReference(java.lang.String code)
long getPendingChangesCount()
Feature getSampleFeature()
boolean supportReferences()
Feature getOriginalFeature(FeatureReference id)
boolean isFeatureModified(FeatureReference id)
boolean isFeatureModified(Feature feature)
java.lang.String getEditingSession()
java.util.List<FeatureReference> getEditedFeatures()
java.util.List<FeatureReference> getEditedFeaturesNotValidated()
boolean isFeatureSelectionEmpty()
boolean isFeatureSelectionAvailable()
java.util.Iterator<Feature> getFeaturesIterator(java.util.Iterator<FeatureReference> references)
java.lang.Iterable<Feature> getFeaturesIterable(java.util.Iterator<FeatureReference> references)
boolean canBeEdited()
java.lang.String getLabel()
java.util.function.Predicate<FeatureStoreNotification> setNotificationsFilter(java.util.function.Predicate<FeatureStoreNotification> filter)
boolean allowGeometry(java.lang.String name,
Geometry geometry)