How to use the rdf-ext.setPrefix function in rdf-ext

To help you get started, we’ve selected a few rdf-ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rdf2h / rdf2h / dist / rdf2h.js View on Github external
/* global rdf, Mustache */

var rdf = require("rdf-ext");
var clownface = require("clownface");
var Mustache = require("mustache");
var Logger = require("./logger.js");
var NodeSet = require("./node-set.js");

rdf.setPrefix("r2h", "");

function RDF2h(matcherGraph) {"To see more debug output invoke RDF2h.logger.setLevel(Logger.DEBUG) or even RDF2h.logger.setLevel(Logger.TRACE)");
    this.matcherGraph = matcherGraph;
    var unorderedMatchers = new NodeSet();
    var rdfTypeProperty = rdf.createNamedNode("");
    var matcherType = rdf.createNamedNode("");
    var matcherStatements = matcherGraph.match(null, rdfTypeProperty, matcherType);
    matcherStatements.forEach(function(t) {
     * Choose any matcher that is not the object of any before statement . 
     * Remove all before statements with that matcher as subject. 
     * Repeat till there are no more matchers that are not the object of a