Package org.apache.sis.storage
Interface WritableAggregate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Resource
add(Resource resource)
Adds a newResource
in thisAggregate
.void
remove(Resource resource)
Removes aResource
from thisAggregate
.-
Methods inherited from interface Aggregate
components
-
Methods inherited from interface Resource
addListener, getIdentifier, getMetadata, removeListener
-
-
-
-
Method Detail
-
add
Resource add(Resource resource) throws DataStoreException
Adds a newResource
in thisAggregate
. The givenResource
will be copied, and the effectively added resource returned. The effectively added resource may differ from the given resource in many aspects. The possible changes may include the followings but not only:- types and properties names
CoordinateReferenceSystem
Metadata
Warning: copying information between stores may produce differences in many aspects. The range of changes depends both on the originalResource
structure and the targetResource
structure. If the differences are too large, then thisAggregate
may throw an exception.- Parameters:
resource
- the resource to copy in thisAggregate
.- Returns:
- the effectively added resource. May be
resource
itself if it has been added verbatim. - Throws:
DataStoreException
- if the given resource can not be stored in thisAggregate
.
-
remove
void remove(Resource resource) throws DataStoreException
Removes aResource
from thisAggregate
. The given resource should be one of the instances returned byAggregate.components()
. This operation is destructive in two aspects:- The
Resource
and it's data will be deleted from theDataStore
. - The given resource may become invalid and should not be used anymore after this method call.
- Parameters:
resource
- child resource to remove from thisAggregate
.- Throws:
DataStoreException
- if the given resource could not be removed.
- The
-
-