UNPKG

rdf-data-factory

Version:

A TypeScript/JavaScript implementation of the RDF/JS data factory.

27 lines 961 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Quad = void 0; /** * An instance of DefaultGraph represents the default graph. * It's only allowed to assign a DefaultGraph to the .graph property of a Quad. */ class Quad { constructor(subject, predicate, object, graph) { this.termType = 'Quad'; this.value = ''; this.subject = subject; this.predicate = predicate; this.object = object; this.graph = graph; } equals(other) { // `|| !other.termType` is for backwards-compatibility with old factories without RDF* support. return !!other && (other.termType === 'Quad' || !other.termType) && this.subject.equals(other.subject) && this.predicate.equals(other.predicate) && this.object.equals(other.object) && this.graph.equals(other.graph); } } exports.Quad = Quad; //# sourceMappingURL=Quad.js.map