Log an array of triples to the console as a table with three columns: subject, predicate and object
Creates a triple matcher callback function for use in e.g. an Array#filter() expression
For example:
tripleArray.filter(Rdf.matchesTriple('someSubject', null, null));
can be null if not wanting to match by subject
can be null if not wanting to match by predicate
can be null if not wanting to match by object
Rename the object of a triple based on a map with original objects as keys and replacement objects as values
For example:
const transformedTriple = Rdf.transformObject({
"oldObject1": "newObject1",
"oldObject2": "newObject2",
}, someTriple));
Rename the predicate of a triple based on a map with original predicates as keys and replacement predicates as values
For example:
const transformedTriple = Rdf.transformPredicate({
"oldPredicate1": "newPredicate1",
"oldPredicate2": "newPredicate2",
}, someTriple));
Generated using TypeDoc
Utility class with functions dealing with rdf triples