public Execution(ChainExecution parent, Graph graph, BlankNodeOrIRI node) { this.chain = parent; this.graph = graph; this.node = node; BlankNodeOrIRI executionNode = ExecutionMetadataHelper.getExecutionNode(graph, node); if(executionNode != null){ this.executionNode = new ExecutionNode(graph, executionNode); } else { this.executionNode = null; } this.status = getReference(graph, node, ExecutionMetadata.STATUS); this.started = ExecutionMetadataHelper.getStarted(graph, node); this.completed = ExecutionMetadataHelper.getCompleted(graph, node); if(started != null && completed != null){ this.duration = completed.getTime() - started.getTime(); } else { this.duration = null; } }
public Execution(ChainExecution parent, Graph graph, BlankNodeOrIRI node) { this.chain = parent; this.graph = graph; this.node = node; BlankNodeOrIRI executionNode = ExecutionMetadataHelper.getExecutionNode(graph, node); if(executionNode != null){ this.executionNode = new ExecutionNode(graph, executionNode); } else { this.executionNode = null; } this.status = getReference(graph, node, ExecutionMetadata.STATUS); this.started = ExecutionMetadataHelper.getStarted(graph, node); this.completed = ExecutionMetadataHelper.getCompleted(graph, node); if(started != null && completed != null){ this.duration = completed.getTime() - started.getTime(); } else { this.duration = null; } }