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, isImportedExecution
public ProvQuery(java.io.InputStream stream, org.openprovenance.prov.interop.InteropFramework.ProvFormat format) throws QueryException
QueryException
public ProvQuery(java.lang.String filename) throws QueryException
QueryException
public void disconnect() throws QueryException
disconnect
in interface Queryable
disconnect
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getActorFirings(int execId) throws QueryException
getActorFirings
in interface Queryable
getActorFirings
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getActorFiringForToken(int tokenId, boolean read) throws QueryException
getActorFiringForToken
in interface Queryable
getActorFiringForToken
in class DefaultQuery
tokenId
- 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.QueryException
public java.lang.String getActorName(int fireId) throws QueryException
getActorName
in interface Queryable
getActorName
in class DefaultQuery
QueryException
public KeplerLSID getExecutionLSIDForExecution(java.lang.Integer execId) throws QueryException
getExecutionLSIDForExecution
in interface Queryable
getExecutionLSIDForExecution
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutions() throws QueryException
getExecutions
in interface Queryable
getExecutions
in class DefaultQuery
QueryException
public java.lang.String getMoMLForExecution(int execId) throws QueryException
getMoMLForExecution
in interface Queryable
getMoMLForExecution
in class DefaultQuery
QueryException
public java.lang.String getOutputRoleToken(int tokenId) throws QueryException
getOutputRoleToken
in interface Queryable
getOutputRoleToken
in class DefaultQuery
QueryException
public java.lang.String getInputRoleForTokenAndFireId(int tokenId, int fireId) throws QueryException
getInputRoleForTokenAndFireId
in interface Queryable
getInputRoleForTokenAndFireId
in class DefaultQuery
QueryException
public java.util.Date[] getTimestampsForActorFiring(int fireId) throws QueryException
getTimestampsForActorFiring
in interface Queryable
getTimestampsForActorFiring
in class DefaultQuery
QueryException
public java.util.Date[] getTimestampsForExecution(int execId) throws QueryException
getTimestampsForExecution
in interface Queryable
getTimestampsForExecution
in class DefaultQuery
execId
- the execution idQueryException
public java.util.Date[] getTimestampsForTokenRead(java.lang.Integer tokenId) throws QueryException
getTimestampsForTokenRead
in interface Queryable
getTimestampsForTokenRead
in class DefaultQuery
QueryException
public java.util.Date getTimestampForTokenWrite(java.lang.Integer tokenId) throws QueryException
getTimestampForTokenWrite
in interface Queryable
getTimestampForTokenWrite
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getTokensForExecution(int execId, java.lang.Integer portId, boolean last) throws QueryException
getTokensForExecution
in interface Queryable
getTokensForExecution
in class DefaultQuery
execId
- 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.QueryException
public java.util.List<java.lang.Integer> getTokensForFiring(int fireId, boolean read) throws QueryException
getTokensForFiring
in interface Queryable
getTokensForFiring
in class DefaultQuery
fireId
- the firing idread
- if true, get the tokens read; otherwise get the tokens
written.QueryException
public java.lang.String getTokenValue(int tokenId) throws QueryException
getTokenValue
in interface Queryable
getTokenValue
in class DefaultQuery
QueryException
public java.lang.String getTokenType(int tokenId) throws QueryException
getTokenType
in interface Queryable
getTokenType
in class DefaultQuery
QueryException
public java.lang.Integer getChannelForToken(int tokenId, boolean read, java.lang.Integer fireId) throws QueryException
getChannelForToken
in interface Queryable
getChannelForToken
in class DefaultQuery
tokenId
- 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.QueryException
protected boolean _stringTokenValuesHaveSurroundingQuotes()
_stringTokenValuesHaveSurroundingQuotes
in class DefaultQuery
public static void main(java.lang.String[] args)