public class ProvQuery extends DefaultQuery
| Constructor and Description |
|---|
ProvQuery(java.io.InputStream stream,
org.openprovenance.prov.interop.InteropFramework.ProvFormat format)
Create a new ProvQuery from an input stream using a specific
format.
|
ProvQuery(java.lang.String filename)
Create a new ProvQuery for a PROV serialization in the
specified file.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_stringTokenValuesHaveSurroundingQuotes()
Returns false since ProvRecording saves StringToken values
using StringToken.stringValue(), which does not add
surrounding double-quotes.
|
void |
disconnect()
Disconnect from the underlying provenance store.
|
java.util.List<java.lang.Integer> |
getActorFiringForToken(int tokenId,
boolean read)
Get the firing id(s) of the actor(s) that read or wrote a token.
|
java.util.List<java.lang.Integer> |
getActorFirings(int execId)
Get the actor firing ids for a workflow execution id.
|
java.lang.String |
getActorName(int fireId)
Get the actor name for a firing id.
|
java.lang.Integer |
getChannelForToken(int tokenId,
boolean read,
java.lang.Integer fireId)
Get the channel that a token was read or written on.
|
KeplerLSID |
getExecutionLSIDForExecution(java.lang.Integer execId)
Get the execution LSID for a workflow execution id.
|
java.util.List<java.lang.Integer> |
getExecutions()
Get execution ids.
|
java.lang.String |
getInputRoleForTokenAndFireId(int tokenId,
int fireId)
Get the input role (port name) of a token.
|
java.lang.String |
getMoMLForExecution(int execId)
Get the MoML for an execution.
|
java.lang.String |
getOutputRoleToken(int tokenId)
Get the output role (port name) of a token.
|
java.util.Date |
getTimestampForTokenWrite(java.lang.Integer tokenId)
Get the timestamp when a token was written.
|
java.util.Date[] |
getTimestampsForActorFiring(int fireId)
Get the start and end timestamps of an actor firing.
|
java.util.Date[] |
getTimestampsForExecution(int execId)
Get the start and stop timestampes for a workflow execution id.
|
java.util.Date[] |
getTimestampsForTokenRead(java.lang.Integer tokenId)
Get the timestamp(s) when a token was read.
|
java.util.List<java.lang.Integer> |
getTokensForExecution(int execId,
java.lang.Integer portId,
boolean last)
Get an sequence of tokens for an execution.
|
java.util.List<java.lang.Integer> |
getTokensForFiring(int fireId,
boolean read)
Get tokens for a firing.
|
java.lang.String |
getTokenType(int tokenId)
Get the type of a token.
|
java.lang.String |
getTokenValue(int tokenId)
Get the value of a token.
|
static void |
main(java.lang.String[] args)
For testing.
|
_getLastExecutionId, close, getActorFiringIds, getActorType, getAssociatedDataForExecution, getAssociatedKeysValuesForExecution, getEntityId, getEntityId, getEntityType, getEntityWorkflowId, getErrorForExecution, getExecutionForExecutionLSID, getExecutionForExecutionLSIDWithoutRevision, getExecutionForOldestReferralExecutionLSIDWithoutRevision, getExecutionIdsForTags, getExecutionLSIDs, getExecutionLSIDsForWorkflowRuns, getExecutionsForAnnotation, getExecutionsForTimespan, getExecutionsForType, getExecutionsForWorkflow, getExecutionsForWorkflowRuns, getExecutionsForWorkflowRuns, getExecutionsForWorkflowRunsAfter, getExecutionsForWorkflowRunsBefore, getExecutionTimesForActor, getHostIdForExecution, getImmediateDependencies, getIOBytesForPort, getLastExecutionForWorkflow, getLastExecutionForWorkflow, getLastExecutionLSIDForWorkflow, getLastExecutionLSIDForWorkflow, getMoMLForExecution, getMoMLForExecutionLSIDs, getParameterAndPortParameterNameValuesForFiring, getParameterNameValuesForExecution, getParameterNameValuesForFiring, getParameterNameValuesOfSpecificTypeForExecution, getParameterValueAtTime, getParameterValueLatest, getPortsForActor, getTagClassesForExecutionId, getTagsForExecutionId, getToken, getTokensForExecution, getTotalExecutionTimeForActor, getTotalIOBytesForActor, getTypeForTag, getUserForExecution, getUserForExecution, getWorkflowForExecution, getWorkflowName, getWorkflowNameForExecution, getWorkflowRunsForExecutionLSIDs, getWorkflowRunsForUser, getWorkflows, isErrorForExecution, isImportedExecutionpublic ProvQuery(java.io.InputStream stream, org.openprovenance.prov.interop.InteropFramework.ProvFormat format) throws QueryException
QueryExceptionpublic ProvQuery(java.lang.String filename) throws QueryException
QueryExceptionpublic void disconnect() throws QueryException
disconnect in interface Queryabledisconnect in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getActorFirings(int execId) throws QueryException
getActorFirings in interface QueryablegetActorFirings in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getActorFiringForToken(int tokenId, boolean read) throws QueryException
getActorFiringForToken in interface QueryablegetActorFiringForToken in class DefaultQuerytokenId - the token idread - If true, return the actor(s) firing id(s) that read
the token. Otherwise, return the actor firing that wrote the token.QueryExceptionpublic java.lang.String getActorName(int fireId) throws QueryException
getActorName in interface QueryablegetActorName in class DefaultQueryQueryExceptionpublic KeplerLSID getExecutionLSIDForExecution(java.lang.Integer execId) throws QueryException
getExecutionLSIDForExecution in interface QueryablegetExecutionLSIDForExecution in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutions() throws QueryException
getExecutions in interface QueryablegetExecutions in class DefaultQueryQueryExceptionpublic java.lang.String getMoMLForExecution(int execId) throws QueryException
getMoMLForExecution in interface QueryablegetMoMLForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getOutputRoleToken(int tokenId) throws QueryException
getOutputRoleToken in interface QueryablegetOutputRoleToken in class DefaultQueryQueryExceptionpublic java.lang.String getInputRoleForTokenAndFireId(int tokenId, int fireId) throws QueryException
getInputRoleForTokenAndFireId in interface QueryablegetInputRoleForTokenAndFireId in class DefaultQueryQueryExceptionpublic java.util.Date[] getTimestampsForActorFiring(int fireId) throws QueryException
getTimestampsForActorFiring in interface QueryablegetTimestampsForActorFiring in class DefaultQueryQueryExceptionpublic java.util.Date[] getTimestampsForExecution(int execId) throws QueryException
getTimestampsForExecution in interface QueryablegetTimestampsForExecution in class DefaultQueryexecId - the execution idQueryExceptionpublic java.util.Date[] getTimestampsForTokenRead(java.lang.Integer tokenId) throws QueryException
getTimestampsForTokenRead in interface QueryablegetTimestampsForTokenRead in class DefaultQueryQueryExceptionpublic java.util.Date getTimestampForTokenWrite(java.lang.Integer tokenId) throws QueryException
getTimestampForTokenWrite in interface QueryablegetTimestampForTokenWrite in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getTokensForExecution(int execId, java.lang.Integer portId, boolean last) throws QueryException
getTokensForExecution in interface QueryablegetTokensForExecution in class DefaultQueryexecId - the execution idportId - the port id. If null, returns a the ids of
tokens read in entire execution.last - if true, the sequence starts at the last token created
and goes backwards to the first; otherwise the sequence starts at
the first.QueryExceptionpublic java.util.List<java.lang.Integer> getTokensForFiring(int fireId, boolean read) throws QueryException
getTokensForFiring in interface QueryablegetTokensForFiring in class DefaultQueryfireId - the firing idread - if true, get the tokens read; otherwise get the tokens
written.QueryExceptionpublic java.lang.String getTokenValue(int tokenId) throws QueryException
getTokenValue in interface QueryablegetTokenValue in class DefaultQueryQueryExceptionpublic java.lang.String getTokenType(int tokenId) throws QueryException
getTokenType in interface QueryablegetTokenType in class DefaultQueryQueryExceptionpublic java.lang.Integer getChannelForToken(int tokenId, boolean read, java.lang.Integer fireId) throws QueryException
getChannelForToken in interface QueryablegetChannelForToken in class DefaultQuerytokenId - the token idread - if true, return the channel the token was read on.
otherwise, return the channel the token was written on.fireId - the actor firing id. can be null for writes, but
must be specified for reads.QueryExceptionprotected boolean _stringTokenValuesHaveSurroundingQuotes()
_stringTokenValuesHaveSurroundingQuotes in class DefaultQuerypublic static void main(java.lang.String[] args)