|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BaclavaDataService
Defines the API that a concrete backing store must implement. Note that DataThing objects must be created on the fly in response to LSID based requests, and that there is no way to retrieve any data other than by LSID. This is entirely intentional, we rely on the attached metadata for each DataThing in order to store it correctly. Implementations of this class must therefore be used with an implementation of the LSIDProvider interface in order to ensure that all values in the DataThing have been allocated identifiers. As with most things, if you can't talk about it it might as well not exist.
| Method Summary | |
|---|---|
DataThing |
fetchDataThing(java.lang.String LSID)
Return a DataThing object from the store, extracting the child if this is not already a top level DataThing document. |
java.lang.String |
getMetadata(java.lang.String LSID)
Returns a string of all the metadata statements that reference the given LSID |
boolean |
hasData(java.lang.String LSID)
Whether the given LSID is resolvable to a concrete data object |
boolean |
hasMetadata(java.lang.String LSID)
Whether the given LSID is resolvable to a metadata reference |
void |
storeDataThing(DataThing theDataThing,
boolean silent)
Store a DataThing in the backing store, this must introspect on the DataThing object, determine any LSID values contained within and maintain appropriate references to such values. |
void |
storeMetadata(java.lang.String theMetadata)
Store a string containing RDF format metadata and one or more LSIDs as resources |
| Method Detail |
|---|
void storeDataThing(DataThing theDataThing,
boolean silent)
throws DuplicateLSIDException
theDataThing - DataThing object to storesilent - whether to throw exceptions if duplicate LSID values are
found. If set to false then the storage operation will fail
under this condition, if set to true then the store will
always succeed, but duplicate LSID values will not be stored.
This is potentially useful when a DataThing is a composition
of some previously stored entities and some new ones,
effectively setting silent to true allows these new data to be
stored and the duplicates safely ignored.
DuplicateLSIDException - if an LSID in the DataThing is already held in the store and
the silent parameter is set to false
DataThing fetchDataThing(java.lang.String LSID)
throws NoSuchLSIDException
LSID - a URI referencing an object within a previously stored
DataThing contained by the backing store.
NoSuchLSIDException - if the LSID is not found within the store.boolean hasData(java.lang.String LSID)
boolean hasMetadata(java.lang.String LSID)
void storeMetadata(java.lang.String theMetadata)
java.lang.String getMetadata(java.lang.String LSID)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||