Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
).flatMap(metadataGraph => {
if (metadataGraph.length !== 0) {
triples.push(Rdf.triple(subject,
VocabWorkflow.metadata, workflowMetadataIri));
metadataGraph.forEach(item => {
triples.push(Rdf.triple(item.s, item.p, item.o));
});
}
const workflowGraph = Rdf.graph(triples);
return this.ldpService.addResource(
workflowGraph,
Maybe.Just(subjectIri)
);
});
} catch (error) {
private selectRelation = (option: {value: Model.Relation}) => {
const relation = Maybe.Just(option.value);
this.props.context.setVisualizationContext(relation);
this.setState({relation});
}
([assertionPg, bs]) => {
const service = new LdpService(rso.AssertionsContainer.value);
if (assertion.iri.isJust) {
return service.update(assertion.iri.get(), assertionPg.graph).map(
_ => ({assertion: assertion.iri.get(), beliefs: bs})
);
} else {
return new LdpService(rso.AssertionsContainer.value).addResource(
assertionPg.graph, Maybe.Just(assertionIri.value)
).map(
iri => ({assertion: iri, beliefs: bs})
);
}
}
);
function savePropositionSet(
propositions: PropositionSet, beliefIri: Rdf.Iri, belief: Belief
): Kefir.Property {
const propositionSetIri = createPropositionIri(beliefIri);
const propositionSetGraph = serializePropSet(belief, propositions);
const service = ldpc(rso.PropositionsContainer.value);
if (belief.iri.isJust) {
return service.update(propositionSetIri, propositionSetGraph);
}
return service.addResource(
propositionSetGraph, maybe.Just(propositionSetIri.value)
);
}
argumentGraph =>
container.addResource(
argumentGraph, Maybe.Just(argumentIri.value)
)
);