Files
natural-language-report-ser…/node_modules/rdf-data-factory/lib/Quad.js
felix 4ef33c6417 WIP
2026-09-14 13:57:42 +02:00

27 lines
961 B
JavaScript

"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