org.embl.ebi.escience.baclava.store
Class RemoteSOAPStore

java.lang.Object
  extended by org.embl.ebi.escience.baclava.store.RemoteSOAPStore
All Implemented Interfaces:
LSIDProvider, BaclavaDataService

public class RemoteSOAPStore
extends java.lang.Object
implements BaclavaDataService, LSIDProvider

Connects to the DataService.jws axis service in the Ouzo1.0 project to provide data / metadata storage and LSID allocation

Author:
Tom Oinn

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.embl.ebi.escience.baclava.LSIDProvider
LSIDProvider.NamespaceEnumeration
 
Field Summary
 
Fields inherited from interface org.embl.ebi.escience.baclava.LSIDProvider
DATATHINGCOLLECTION, DATATHINGLEAF, WFDEFINITION, WFINSTANCE
 
Constructor Summary
RemoteSOAPStore()
           
RemoteSOAPStore(java.util.Properties props)
           
 
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 getID(LSIDProvider.NamespaceEnumeration namespaceObject)
          Return a unique identifier to be used as an LSID or similar
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSOAPStore

public RemoteSOAPStore()

RemoteSOAPStore

public RemoteSOAPStore(java.util.Properties props)
Method Detail

storeDataThing

public void storeDataThing(DataThing theDataThing,
                           boolean silent)
                    throws DuplicateLSIDException
Description copied from interface: BaclavaDataService
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.

Specified by:
storeDataThing in interface BaclavaDataService
Parameters:
theDataThing - DataThing object to store
silent - 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.
Throws:
DuplicateLSIDException - if an LSID in the DataThing is already held in the store and the silent parameter is set to false

fetchDataThing

public DataThing fetchDataThing(java.lang.String LSID)
                         throws NoSuchLSIDException
Description copied from interface: BaclavaDataService
Return a DataThing object from the store, extracting the child if this is not already a top level DataThing document. This means that the DataThing returned may or may not have a container LSID, the dataObject contained within it will always have the LSID supplied to the call.

Specified by:
fetchDataThing in interface BaclavaDataService
Parameters:
LSID - a URI referencing an object within a previously stored DataThing contained by the backing store.
Returns:
the DataThing object constructed from the data within the specified LSID.
Throws:
NoSuchLSIDException - if the LSID is not found within the store.

storeMetadata

public void storeMetadata(java.lang.String theMetadata)
Description copied from interface: BaclavaDataService
Store a string containing RDF format metadata and one or more LSIDs as resources

Specified by:
storeMetadata in interface BaclavaDataService

getID

public java.lang.String getID(LSIDProvider.NamespaceEnumeration namespaceObject)
Description copied from interface: LSIDProvider
Return a unique identifier to be used as an LSID or similar

Specified by:
getID in interface LSIDProvider

hasData

public boolean hasData(java.lang.String LSID)
Description copied from interface: BaclavaDataService
Whether the given LSID is resolvable to a concrete data object

Specified by:
hasData in interface BaclavaDataService

hasMetadata

public boolean hasMetadata(java.lang.String LSID)
Description copied from interface: BaclavaDataService
Whether the given LSID is resolvable to a metadata reference

Specified by:
hasMetadata in interface BaclavaDataService

getMetadata

public java.lang.String getMetadata(java.lang.String LSID)
Description copied from interface: BaclavaDataService
Returns a string of all the metadata statements that reference the given LSID

Specified by:
getMetadata in interface BaclavaDataService