@faubulous/mentor-rdf 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +93 -1
- package/dist/index.js.map +2 -2
- package/dist/rdf/reasoners/rdfs-reasoner.d.ts +38 -0
- package/package.json +1 -1
|
@@ -9,10 +9,35 @@ export declare class RdfsReasoner extends SkosReasoner {
|
|
|
9
9
|
protected classes: Set<string>;
|
|
10
10
|
protected properties: Set<string>;
|
|
11
11
|
protected individuals: Set<rdfjs.Quad_Subject>;
|
|
12
|
+
/**
|
|
13
|
+
* The super properties of each property, as asserted with `rdfs:subPropertyOf`.
|
|
14
|
+
*/
|
|
15
|
+
private readonly _superProperties;
|
|
16
|
+
/**
|
|
17
|
+
* The ranges asserted for each property.
|
|
18
|
+
*/
|
|
19
|
+
private readonly _ranges;
|
|
20
|
+
/**
|
|
21
|
+
* The domains asserted for each property.
|
|
22
|
+
*/
|
|
23
|
+
private readonly _domains;
|
|
12
24
|
constructor(targetUriGenerator?: GraphUriGenerator);
|
|
13
25
|
protected isIgnoredNode(term: rdfjs.Quad_Subject | rdfjs.Quad_Object): boolean;
|
|
14
26
|
protected isClass(id: string): boolean;
|
|
15
27
|
protected afterInference(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Infers the ranges and domains that properties inherit from their super properties
|
|
30
|
+
* (OWL 2 RL rules scm-rng2 and scm-dom2), following `rdfs:subPropertyOf` chains.
|
|
31
|
+
*/
|
|
32
|
+
private _inferInheritedRangesAndDomains;
|
|
33
|
+
/**
|
|
34
|
+
* Gets the transitive super properties of a property, nearest first. Cycles in the
|
|
35
|
+
* property hierarchy are followed only once.
|
|
36
|
+
* @param property The IRI or blank node id of a property.
|
|
37
|
+
* @param superProperties The direct super properties of the property.
|
|
38
|
+
* @returns The IRIs of all super properties, excluding the property itself.
|
|
39
|
+
*/
|
|
40
|
+
private _getAncestorProperties;
|
|
16
41
|
protected resetState(): void;
|
|
17
42
|
applyInference(quad: rdfjs.Quad): void;
|
|
18
43
|
protected assertClass(subject: rdfjs.Quad_Subject): void;
|
|
@@ -25,4 +50,17 @@ export declare class RdfsReasoner extends SkosReasoner {
|
|
|
25
50
|
*/
|
|
26
51
|
protected assertPropertyFromUsage(predicate: rdfjs.Quad_Predicate): void;
|
|
27
52
|
protected inferPropertyAxioms(quad: rdfjs.Quad): void;
|
|
53
|
+
/**
|
|
54
|
+
* Records that a property is a sub property of another property.
|
|
55
|
+
* @param property The sub property.
|
|
56
|
+
* @param superProperty The super property.
|
|
57
|
+
*/
|
|
58
|
+
private _addSuperProperty;
|
|
59
|
+
/**
|
|
60
|
+
* Adds a value to the list stored under a key.
|
|
61
|
+
* @param map The map of lists.
|
|
62
|
+
* @param key The key of the list.
|
|
63
|
+
* @param value The value to add.
|
|
64
|
+
*/
|
|
65
|
+
private _addToList;
|
|
28
66
|
}
|