public interface GranuleStore extends GranuleSource
GranuleSource
providing capabilities to add, delete and modify granules.Modifier and Type | Method and Description |
---|---|
void |
addGranules(SimpleFeatureCollection granules)
Add all the granules from the specified collection to this
GranuleStore . |
Transaction |
getTransaction()
Gets the
Transaction that this GranuleStore is currently operating against. |
int |
removeGranules(Filter filter)
Removes granules selected by the given filter.
|
default int |
removeGranules(Filter filter,
Hints hints)
Removes granules selected by the given filter, controlled by a set of hints (might be
implementation dependent and eventually ignored).
|
void |
setTransaction(Transaction transaction)
Provide a transaction for commit/rollback control of a modifying operation on this
GranuleStore . |
void |
updateGranules(String[] attributeNames,
Object[] attributeValues,
Filter filter)
Modifies the attributes with the supplied values in all granules selected by the given
filter.
|
dispose, getBounds, getCount, getGranules, getSchema
void addGranules(SimpleFeatureCollection granules)
GranuleStore
.granules
- the granules to addint removeGranules(Filter filter)
filter
- an OpenGIS filterIOException
- if an error occurs modifying the data sourcedefault int removeGranules(Filter filter, Hints hints)
filter
- an OpenGIS filterhints
- a set of hints to control how the removal is performedIOException
- if an error occurs modifying the data sourcevoid updateGranules(String[] attributeNames, Object[] attributeValues, Filter filter)
attributeNames
- the attributes to modifyattributeValues
- the new values for the attributesfilter
- an OpenGIS filterIOException
- if the attribute and object arrays are not equal in length; if the value
types do not match the attribute types; if modification is not supported; or if there
errors accessing the data sourceTransaction getTransaction()
Transaction
that this GranuleStore
is currently operating against.
Transaction t = GranuleStore.getTransaction();
try {
GranuleStore.addGranules (granules);
t.commit();
} catch( IOException erp ){
// something went wrong;
t.rollback();
}
void setTransaction(Transaction transaction)
GranuleStore
.
Transation t = new DefaultTransaction();
GranuleStore.setTransaction(t);
try {
GranuleStore.addGranules (granules);
t.commit();
} catch ( IOException ex ) {
// something went wrong;
t.rollback();
} finally {
t.close();
}
transaction
- the transactionCopyright © 1996–2019 Geotools. All rights reserved.