|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.taverna.t2.provenance.api.ProvenanceAccess
public class ProvenanceAccess
net.sf.taverna.t2.provenance.apic.client.resources
. Class net.sf.taverna.t2.provenance.api.client.ProvenanceAPISampleClient
provides an example of API client that third parties would use to interact with this API.pquery.xsd
in net.sf.taverna.t2.provenance.apic.client.resources
Constructor Summary | |
---|---|
ProvenanceAccess(java.lang.String connectorType)
|
Method Summary | |
---|---|
java.sql.Statement |
execSQLQuery(java.lang.String q)
pass-through query method |
QueryAnswer |
executeQuery(Query pq)
Executes a provenance query. |
Dependencies |
fetchPortData(java.lang.String wfInstance,
java.lang.String workflowId,
java.lang.String pname,
java.lang.String port,
java.lang.String iteration)
Returns individal records from the provenance DB in response to a query that specifies specific elements within values associated with a processor port, in the context of a specific run of a workflow. |
java.util.List<WorkflowInstance> |
getAllWorkflowIDs()
|
java.util.List<Arc> |
getArcs(java.util.Map<java.lang.String,java.lang.String> queryConstraints)
|
java.util.List<Collection> |
getCollectionsForRun(java.lang.String wfInstanceID)
|
java.lang.String |
getContainingCollection(LineageQueryResultRecord record)
|
java.util.List<Workflow> |
getContainingWorkflowsForProcessor(java.lang.String pname)
|
net.sf.taverna.t2.invocation.InvocationContext |
getInvocationContext()
|
java.lang.String |
getLatestRunID()
|
ProvenanceAnalysis |
getPa()
|
java.util.List<Var> |
getPortsForDataflow(java.lang.String workflowID)
lists all ports for a processor |
java.util.List<Var> |
getPortsForProcessor(java.lang.String workflowID,
java.lang.String processorName)
list all ports for a specific processor within a workflow |
ProvenanceQuery |
getPq()
|
java.util.List<ProcBinding> |
getProcBindings(java.util.Map<java.lang.String,java.lang.String> constraints)
|
java.util.List<ProvenanceProcessor> |
getProcessorsForWorkflowID(java.lang.String workflowID)
|
java.util.Map<java.lang.String,java.util.List<ProvenanceProcessor>> |
getProcessorsInWorkflow(java.lang.String workflowID)
|
ProvenanceConnector |
getProvenanceConnector()
|
java.lang.String |
getTopLevelWorkflowID(java.lang.String runID)
|
java.util.List<VarBinding> |
getVarBindings(java.util.Map<java.lang.String,java.lang.String> constraints)
|
java.util.List<Var> |
getVars(java.util.Map<java.lang.String,java.lang.String> queryConstraints)
|
java.util.List<Workflow> |
getWorkflowForRun(java.lang.String runID)
|
java.util.List<java.lang.String> |
getWorkflowID(java.lang.String runID)
returns a set of workflowIDs for a given runID. |
java.lang.String |
getWorkflowIDForExternalName(java.lang.String workflowName)
|
void |
init()
|
static void |
initDataSource(java.lang.String driverClassName,
java.lang.String jdbcUrl)
The recommended data source intitialisation method, where only a driver name and jdbc url are required. If the driver supports multiple connections, then a pool will be created of 10 min idle, 50 max idle, and 50 max active connections. |
static void |
initDataSource(java.lang.String driverClassName,
java.lang.String jdbcUrl,
java.lang.String username,
java.lang.String password,
int minIdle,
int maxIdle,
int maxActive)
Initialises a named JNDI DataSource if not already set up externally. |
net.sf.taverna.t2.invocation.InvocationContext |
initDefaultReferenceService()
Initialises a default Reference Service for storing data and their associated references. |
net.sf.taverna.t2.invocation.InvocationContext |
initReferenceService(java.lang.String hibernateContext)
Initialises the Reference Service for a given hibernate context definition. |
boolean |
isAttachOPMArtifactValues()
|
boolean |
isIncludeProcessorOutputs()
|
boolean |
isOPMGenerationActive()
|
boolean |
isTopLevelDataflow(java.lang.String wfNameID)
|
java.util.List<WorkflowInstance> |
listRuns(java.lang.String workflowId,
java.util.Map<java.lang.String,java.lang.String> conditions)
|
java.util.Set<java.lang.String> |
removeRun(java.lang.String runID)
Removes all records that pertain to a specific run (but not the static specification of the workflow run) |
void |
removeWorkflow(java.lang.String wfName)
removes all records pertaining to the static structure of a workflow. |
void |
setPa(ProvenanceAnalysis pa)
|
void |
setPq(ProvenanceQuery pq)
|
void |
setProvenanceConnector(ProvenanceConnector provenanceConnector)
|
void |
toggleAttachOPMArtifactValues(boolean active)
should actual artifact values be attached to OPM artifact nodes? default is FALSE THIS IS CURRENTLY UNSUPPORTED -- DEFAULTS TO FALSE |
void |
toggleIncludeProcessorOutputs(boolean active)
include valus of output ports in the query result? input port values are always included default is FALSE |
void |
toggleOPMGeneration(boolean active)
should an OPM graph be generated in response to a query? default is TRUE |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProvenanceAccess(java.lang.String connectorType)
Method Detail |
---|
public static void initDataSource(java.lang.String driverClassName, java.lang.String jdbcUrl)
driverClassName
- jdbcUrl
- public static void initDataSource(java.lang.String driverClassName, java.lang.String jdbcUrl, java.lang.String username, java.lang.String password, int minIdle, int maxIdle, int maxActive)
driverClassName
- - the classname for the driver to be used.jdbcUrl
- - the jdbc connection urlusername
- - the username, if required (otherwise null)password
- - the password, if required (oteherwise null)minIdle
- - if the driver supports multiple connections, then the minumum number of idle connections in the poolmaxIdle
- - if the driver supports multiple connections, then the maximum number of idle connections in the poolmaxActive
- - if the driver supports multiple connections, then the minumum number of connections in the poolpublic net.sf.taverna.t2.invocation.InvocationContext initDefaultReferenceService()
ProvenanceConnector
, enabling data references to be resolved
public net.sf.taverna.t2.invocation.InvocationContext initReferenceService(java.lang.String hibernateContext)
hibernateContext
- initDefaultReferenceService()
public void init()
public java.sql.Statement execSQLQuery(java.lang.String q) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.sql.SQLException
q
- valid JDBC query string for the T2provenance schema
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.sql.SQLException
public QueryAnswer executeQuery(Query pq) throws java.sql.SQLException
java.sql.SQLException
public Dependencies fetchPortData(java.lang.String wfInstance, java.lang.String workflowId, java.lang.String pname, java.lang.String port, java.lang.String iteration)
wfInstance
- lineage scope -- a specific instancepname
- for a specific processor [required]a
- specific (input or output) variable [optional]iteration
- and a specific iteration [optional]
Dependencies
object
java.sql.SQLException
public java.lang.String getContainingCollection(LineageQueryResultRecord record)
record
- a record representing a single value -- possibly within a list hierarchy
public java.util.List<WorkflowInstance> listRuns(java.lang.String workflowId, java.util.Map<java.lang.String,java.lang.String> conditions)
workflowId
- defines the scope of the query - if null then the query runs on all available workflowsconditions
- additional conditions to be defined. This is a placeholder as conditions are currently ignored
public boolean isTopLevelDataflow(java.lang.String wfNameID)
public java.lang.String getLatestRunID() throws java.sql.SQLException
java.sql.SQLException
public java.util.Set<java.lang.String> removeRun(java.lang.String runID)
runID
- the internal ID of a run. This can be obtained using listRuns(String, Map)
public void removeWorkflow(java.lang.String wfName)
wfName
- the ID (not the external name) of the workflow whose static structure is to be deleted from the DBpublic java.util.List<java.lang.String> getWorkflowID(java.lang.String runID)
runID
- the internal ID for a specific workflow run
public java.util.List<Workflow> getWorkflowForRun(java.lang.String runID) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getTopLevelWorkflowID(java.lang.String runID)
runID
- the internal ID for a specific workflow run
public java.util.List<WorkflowInstance> getAllWorkflowIDs()
WorkflowInstance
beans, each representing the complete description of a workflow run (note that this is
not just the ID of the run)public java.util.List<Workflow> getContainingWorkflowsForProcessor(java.lang.String pname)
a
- workflow processor name
public java.util.Map<java.lang.String,java.util.List<ProvenanceProcessor>> getProcessorsInWorkflow(java.lang.String workflowID)
workflowID
-
public java.util.List<Var> getVars(java.util.Map<java.lang.String,java.lang.String> queryConstraints) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<Arc> getArcs(java.util.Map<java.lang.String,java.lang.String> queryConstraints) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<ProcBinding> getProcBindings(java.util.Map<java.lang.String,java.lang.String> constraints) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<Collection> getCollectionsForRun(java.lang.String wfInstanceID)
public java.util.List<VarBinding> getVarBindings(java.util.Map<java.lang.String,java.lang.String> constraints) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<Var> getPortsForDataflow(java.lang.String workflowID)
workflowID
-
Var
beans, each representing an input or output port for the workflowpublic java.util.List<Var> getPortsForProcessor(java.lang.String workflowID, java.lang.String processorName)
workflowID
- processorName
-
Var
beans, each representing an input or output port for the input processorpublic void toggleIncludeProcessorOutputs(boolean active)
public boolean isIncludeProcessorOutputs()
public net.sf.taverna.t2.invocation.InvocationContext getInvocationContext()
InvocationContext
that can be used by a client to deref a Taverna data referencepublic void toggleOPMGeneration(boolean active)
public boolean isOPMGenerationActive()
public void toggleAttachOPMArtifactValues(boolean active)
active
- public boolean isAttachOPMArtifactValues()
public java.lang.String getWorkflowIDForExternalName(java.lang.String workflowName)
public java.util.List<ProvenanceProcessor> getProcessorsForWorkflowID(java.lang.String workflowID)
public ProvenanceConnector getProvenanceConnector()
ProvenanceConnector
used by the API to operate on the DB. Currently we support
MySQL MySQLProvenanceConnector
and Derby DerbyProvenanceConnector
connectors.
The set of supported connectors is extensible. The available connectors are discovered automatically by the API
upon startup, and it includes all the connectors that are mentioned in the <dependencies> section of pom.xml
for Maven module net.sf.taverna.t2.core.provenanceconnector
public void setProvenanceConnector(ProvenanceConnector provenanceConnector)
a
- specific provenanceConnector used by the APIpublic ProvenanceAnalysis getPa()
public void setPa(ProvenanceAnalysis pa)
pa
- the pa to setpublic ProvenanceQuery getPq()
public void setPq(ProvenanceQuery pq)
pq
- the pq to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |