|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pasoa.util.ClientLib
ClientLib provides a number of convenience methods for recording, querying, (and hopefully in the future) managing provenance stores. The library takes care of serialization/deserialization from Java objects to SOAP.
The two methods of most use are probably record (Record rec, URL provenanceStore)
which allows you to build a Record object and send that to a provenance
store and query (String xquery, URL provenanceStore)
which allows you to query
a particular provenance store with an xquery string.
The documentation assumes you are familiar with the Provenance Modelling and Functionality section of the Architecture for Provenance Systems document.
Constructor Summary | |
---|---|
ClientLib()
|
Method Summary | |
---|---|
String |
makeRecordDocument(InteractionKey irid,
String viewKind,
Element asserter,
String content)
Generates a Record SOAP message from the given parameters. |
String |
makeRecordDocument(Record rec)
Given a Record object generate a Record SOAP message |
Document |
provenanceQuery(String qdhXPath,
String scopeXPath,
Map namespaces,
URL provenanceStore)
|
Document |
query(String xquery,
URL provenanceStore)
Send an XQuery to the specified provenance store. |
Document |
record(Record rec,
URL provenanceStore)
Record a Record object in the specified provenance store. |
Document |
record(String soap,
URL provenanceStore)
Record an already generated Record SOAP message in the specified provenance store This SOAP message must conform to PRecord.wsdl |
Document |
xpath(String xpath,
String root,
String item,
Map namespaces,
URL provenanceStore)
Send an XPath to the specified provenance store, specifying the form of the document returned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientLib()
Method Detail |
---|
public Document record(Record rec, URL provenanceStore) throws Exception
rec
- the Record objectprovenanceStore
- the URL of the provenance store
Exception
public Document record(String soap, URL provenanceStore) throws Exception
soap
- the record soap message to send to the provenance storeprovenanceStore
- the URL of the provenance store
Exception
public String makeRecordDocument(InteractionKey irid, String viewKind, Element asserter, String content)
irid
- the key that identifies the interactionviewKind
- the ViewKind as specified by Constants.CLIENT_VIEW or Constants.SERVICE_VIEWasserter
- the asserter as a DOM elementcontent
- the content (i.e. interactionPAssertion, actorStatePassertion, relationshipPAssertion
or submissionFinished) already seralized to XML
public String makeRecordDocument(Record rec)
rec
- a Record object
public Document query(String xquery, URL provenanceStore) throws Exception
xquery
- the xquery stringprovenanceStore
- the URL of the provenance store to query
Exception
public Document xpath(String xpath, String root, String item, Map namespaces, URL provenanceStore) throws Exception
<ex:root> <ex:result> <ps:interactionKey> ... </ex:result> <ex:result> <ps:interactionKey> ... </ex:result> ... </ex:root>
xpath
- the XPath stringroot
- the qname of the root element of the response documentitem
- the qname of the element surrounding each result in the response documentnamespaces
- a mapping of prefix to namespace used in the XPath or for root/itemprovenanceStore
- the URL of the provenance store to query
Exception
public Document provenanceQuery(String qdhXPath, String scopeXPath, Map namespaces, URL provenanceStore) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |