Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 27x 20x 20x 20x 20x 20x 12x 11x 7x 5x | import { _SH, SH } from "@faubulous/mentor-rdf";
import { ClassNodeBase } from "../classes/class-node-base";
import { DefinitionTreeNode } from "../../definition-tree-node";
import { RuleNode } from "./rule-node";
export class RuleClassNode extends ClassNodeBase {
override getOntologyGraphs(): string[] {
return [_SH, ...this.document.graphs];
}
override *getSubClassIris(): IterableIterator<string> {
const options = this.getQueryOptions();
options.notDefinedBy?.add(_SH);
const uri = this.uri.startsWith('mentor') ? SH.Rule : this.uri;
const classIris = this.vocabulary.getSubClasses(this.getOntologyGraphs(), uri);
for (const c of classIris) {
if (this.vocabulary.hasSubjectsOfType(this.getDocumentGraphs(), c, options)) {
yield c;
}
}
}
override getClassNode(iri: string) {
return this.createChildNode(RuleClassNode, iri);
}
override getIndividualNode(iri: string): DefinitionTreeNode {
return this.createChildNode(RuleNode, iri);
}
} |