Class: ProvenanceExecutionMutation

ProvenanceExecutionMutation()

new ProvenanceExecutionMutation()

Update the program runs belonging to one provenance graph.
Since:
  • 2.39.0
Source:

Methods

addExecutionProgramRelationship(options) → {Provenance}

Record that a program run produced or consumed a data object.
Parameters:
Name Type Description
options object Relationship options
Properties
Name Type Attributes Description
dataPid string Data PID in the relationship
programPid string Program PID in the relationship
predicate string PROV relationship name
dataFromObject boolean <optional>
Whether the data is on the object side of the RDF statement
Source:
Throws:
When the program's execution graph is not safely editable
Type
ResourceMapConflictError
Returns:
Updated provenance instance
Type
Provenance

ensureExecutionForProgram(programMember) → {NamedNode|BlankNode}

Find or create the single program run used to connect a program package member to data.
Parameters:
Name Type Description
programMember Object Exact program package member whose run is needed
Source:
Throws:
When the program's execution graph is not safely editable
Type
ResourceMapConflictError
Returns:
Existing or newly created execution node Intended to be called inside `Provenance.mutateGraph()`
Type
NamedNode | BlankNode

normalizeExecutionGraph(executionInspections)

Add a missing program run type or identifier only when existing relationships make the node's role certain. Ambiguous imported structures are left untouched.
Parameters:
Name Type Description
executionInspections Array.<object> Precomputed execution summaries
Source:

removeDanglingQualifiedAssociations(associationNodes)

Remove an unnamed Association node after its program link is deleted, but only when it contains no other imported information.
Parameters:
Name Type Description
associationNodes Array.<(BlankNode|NamedNode)> Changed associations
Source:

removeExecutionProgramRelationship(options) → {Provenance}

Remove the record that a program run produced or consumed a data object.
Parameters:
Name Type Description
options object Relationship options
Properties
Name Type Attributes Description
dataPid string Data PID in the relationship
programPid string Program PID in the relationship
predicate string PROV relationship name
dataFromObject boolean <optional>
Whether the data is on the object side of the RDF statement
Source:
Throws:
When identifiers are invalid, member resolution fails, or the program provenance is read-only
Type
Error
Returns:
Updated provenance instance
Type
Provenance

ProvenanceExecutionMutation(options)

new ProvenanceExecutionMutation(options)

Create a mutation helper for one provenance model.
Parameters:
Name Type Description
options object Mutation options
Properties
Name Type Description
provenance Provenance Provenance instance being updated
Source:

Methods

addExecutionProgramRelationship(options) → {Provenance}

Record that a program run produced or consumed a data object.
Parameters:
Name Type Description
options object Relationship options
Properties
Name Type Attributes Description
dataPid string Data PID in the relationship
programPid string Program PID in the relationship
predicate string PROV relationship name
dataFromObject boolean <optional>
Whether the data is on the object side of the RDF statement
Source:
Throws:
When the program's execution graph is not safely editable
Type
ResourceMapConflictError
Returns:
Updated provenance instance
Type
Provenance

ensureExecutionForProgram(programMember) → {NamedNode|BlankNode}

Find or create the single program run used to connect a program package member to data.
Parameters:
Name Type Description
programMember Object Exact program package member whose run is needed
Source:
Throws:
When the program's execution graph is not safely editable
Type
ResourceMapConflictError
Returns:
Existing or newly created execution node Intended to be called inside `Provenance.mutateGraph()`
Type
NamedNode | BlankNode

normalizeExecutionGraph(executionInspections)

Add a missing program run type or identifier only when existing relationships make the node's role certain. Ambiguous imported structures are left untouched.
Parameters:
Name Type Description
executionInspections Array.<object> Precomputed execution summaries
Source:

removeDanglingQualifiedAssociations(associationNodes)

Remove an unnamed Association node after its program link is deleted, but only when it contains no other imported information.
Parameters:
Name Type Description
associationNodes Array.<(BlankNode|NamedNode)> Changed associations
Source:

removeExecutionProgramRelationship(options) → {Provenance}

Remove the record that a program run produced or consumed a data object.
Parameters:
Name Type Description
options object Relationship options
Properties
Name Type Attributes Description
dataPid string Data PID in the relationship
programPid string Program PID in the relationship
predicate string PROV relationship name
dataFromObject boolean <optional>
Whether the data is on the object side of the RDF statement
Source:
Throws:
When identifiers are invalid, member resolution fails, or the program provenance is read-only
Type
Error
Returns:
Updated provenance instance
Type
Provenance