@oml/owl 0.7.0
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/README.md +46 -0
- package/out/index.d.ts +10 -0
- package/out/index.js +12 -0
- package/out/index.js.map +1 -0
- package/out/owl/owl-abox.d.ts +79 -0
- package/out/owl/owl-abox.js +765 -0
- package/out/owl/owl-abox.js.map +1 -0
- package/out/owl/owl-imports.d.ts +9 -0
- package/out/owl/owl-imports.js +102 -0
- package/out/owl/owl-imports.js.map +1 -0
- package/out/owl/owl-interfaces.d.ts +121 -0
- package/out/owl/owl-interfaces.js +3 -0
- package/out/owl/owl-interfaces.js.map +1 -0
- package/out/owl/owl-mapper.d.ts +80 -0
- package/out/owl/owl-mapper.js +1217 -0
- package/out/owl/owl-mapper.js.map +1 -0
- package/out/owl/owl-service.d.ts +65 -0
- package/out/owl/owl-service.js +552 -0
- package/out/owl/owl-service.js.map +1 -0
- package/out/owl/owl-shacl.d.ts +28 -0
- package/out/owl/owl-shacl.js +337 -0
- package/out/owl/owl-shacl.js.map +1 -0
- package/out/owl/owl-sparql.d.ts +71 -0
- package/out/owl/owl-sparql.js +260 -0
- package/out/owl/owl-sparql.js.map +1 -0
- package/out/owl/owl-store.d.ts +32 -0
- package/out/owl/owl-store.js +142 -0
- package/out/owl/owl-store.js.map +1 -0
- package/out/owl/owl-tbox.d.ts +98 -0
- package/out/owl/owl-tbox.js +575 -0
- package/out/owl/owl-tbox.js.map +1 -0
- package/out/owl-module.d.ts +15 -0
- package/out/owl-module.js +22 -0
- package/out/owl-module.js.map +1 -0
- package/package.json +52 -0
- package/src/index.ts +12 -0
- package/src/owl/owl-abox.ts +930 -0
- package/src/owl/owl-imports.ts +108 -0
- package/src/owl/owl-interfaces.ts +145 -0
- package/src/owl/owl-mapper.ts +1510 -0
- package/src/owl/owl-service.ts +642 -0
- package/src/owl/owl-shacl.ts +400 -0
- package/src/owl/owl-sparql.ts +317 -0
- package/src/owl/owl-store.ts +173 -0
- package/src/owl/owl-tbox.ts +727 -0
- package/src/owl-module.ts +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# OML OWL
|
|
2
|
+
|
|
3
|
+
`@oml/owl` contains the semantic web layer for OML.
|
|
4
|
+
|
|
5
|
+
It is responsible for:
|
|
6
|
+
|
|
7
|
+
- mapping OML models to OWL/RDF
|
|
8
|
+
- reasoning services and prepared datasets
|
|
9
|
+
- SPARQL query and construct execution
|
|
10
|
+
- SHACL validation
|
|
11
|
+
- semantic service composition through `createOwlServices(...)`
|
|
12
|
+
|
|
13
|
+
## Package Boundary
|
|
14
|
+
|
|
15
|
+
- `@oml/language` owns syntax, AST, language services, validation, scope, rename, hover, formatting, and workspace mechanics
|
|
16
|
+
- `@oml/owl` depends on `@oml/language`
|
|
17
|
+
- `@oml/markdown` depends on `@oml/owl`
|
|
18
|
+
|
|
19
|
+
This keeps semantic web concerns out of the language package.
|
|
20
|
+
|
|
21
|
+
## Main Exports
|
|
22
|
+
|
|
23
|
+
- `createOwlServices`
|
|
24
|
+
- `ReasoningService`
|
|
25
|
+
- `PreparedReasonedModel`
|
|
26
|
+
- `Oml2OwlMapper`
|
|
27
|
+
- `createOwlOntologyQuads`
|
|
28
|
+
- `owlOntologyPrefixes`
|
|
29
|
+
- `deriveSelectQueryFromShape`
|
|
30
|
+
- `createDefaultShaclService`
|
|
31
|
+
- `registerShaclValidationRequests`
|
|
32
|
+
|
|
33
|
+
## Instructions
|
|
34
|
+
|
|
35
|
+
Use this package when you need OML semantic services instead of core language services alone.
|
|
36
|
+
|
|
37
|
+
Typical usage:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { createOwlServices } from '@oml/owl';
|
|
41
|
+
|
|
42
|
+
const { shared, Oml } = createOwlServices(context);
|
|
43
|
+
const reasoningService = Oml.reasoning.ReasoningService;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For pure language tooling without the semantic layer, use `@oml/language`.
|
package/out/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './owl-module.js';
|
|
2
|
+
export * from './owl/owl-mapper.js';
|
|
3
|
+
export * from './owl/owl-interfaces.js';
|
|
4
|
+
export * from './owl/owl-store.js';
|
|
5
|
+
export * from './owl/owl-abox.js';
|
|
6
|
+
export * from './owl/owl-imports.js';
|
|
7
|
+
export * from './owl/owl-service.js';
|
|
8
|
+
export * from './owl/owl-sparql.js';
|
|
9
|
+
export * from './owl/owl-shacl.js';
|
|
10
|
+
export * from './owl/owl-tbox.js';
|
package/out/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) 2026 Modelware. All rights reserved.
|
|
2
|
+
export * from './owl-module.js';
|
|
3
|
+
export * from './owl/owl-mapper.js';
|
|
4
|
+
export * from './owl/owl-interfaces.js';
|
|
5
|
+
export * from './owl/owl-store.js';
|
|
6
|
+
export * from './owl/owl-abox.js';
|
|
7
|
+
export * from './owl/owl-imports.js';
|
|
8
|
+
export * from './owl/owl-service.js';
|
|
9
|
+
export * from './owl/owl-sparql.js';
|
|
10
|
+
export * from './owl/owl-shacl.js';
|
|
11
|
+
export * from './owl/owl-tbox.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
package/out/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Quad } from 'n3';
|
|
2
|
+
import type { OwlStore } from './owl-interfaces.js';
|
|
3
|
+
import type { TBoxIndex } from './owl-tbox.js';
|
|
4
|
+
export interface ChainingResult {
|
|
5
|
+
complete: boolean;
|
|
6
|
+
iterations: number;
|
|
7
|
+
newQuadsCount: number;
|
|
8
|
+
validationWarnings: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class ABoxEntailmentCache {
|
|
11
|
+
private readonly state;
|
|
12
|
+
private readonly deltaPlus;
|
|
13
|
+
private readonly deltaMinus;
|
|
14
|
+
private readonly validationWarnings;
|
|
15
|
+
markDirty(modelUri: string): void;
|
|
16
|
+
markDirtyWithDelta(modelUri: string, asserted: Quad[], retracted: Quad[]): void;
|
|
17
|
+
markClean(modelUri: string): void;
|
|
18
|
+
markDirtyAll(modelUris: string[]): void;
|
|
19
|
+
isDirty(modelUri: string): boolean;
|
|
20
|
+
isAbsent(modelUri: string): boolean;
|
|
21
|
+
consumeDelta(modelUri: string): {
|
|
22
|
+
plus: Quad[];
|
|
23
|
+
minus: Quad[];
|
|
24
|
+
};
|
|
25
|
+
getValidationWarnings(modelUri: string): string[];
|
|
26
|
+
setValidationWarnings(modelUri: string, warnings: string[]): void;
|
|
27
|
+
invalidate(modelUri: string): void;
|
|
28
|
+
private quadKey;
|
|
29
|
+
}
|
|
30
|
+
export declare class ABoxChainer {
|
|
31
|
+
private readonly reasoningStore;
|
|
32
|
+
constructor(reasoningStore: OwlStore);
|
|
33
|
+
chain(modelUri: string, tboxIndex: TBoxIndex, readModelUris: ReadonlyArray<string>, deltaPlus: Quad[], deltaMinus: Quad[]): ChainingResult;
|
|
34
|
+
private overdelete;
|
|
35
|
+
private materializeAdd;
|
|
36
|
+
private forwardRules;
|
|
37
|
+
private reverseAnchoredHeads;
|
|
38
|
+
private hasSupport;
|
|
39
|
+
private hasTransitiveSupport;
|
|
40
|
+
private applyForwardRulesTriggeredByFact;
|
|
41
|
+
private hasForwardRuleSupport;
|
|
42
|
+
private resolveRuleBody;
|
|
43
|
+
private resolvePendingAtoms;
|
|
44
|
+
private findMatchesForAtom;
|
|
45
|
+
private candidateFacts;
|
|
46
|
+
private matchAtomToFact;
|
|
47
|
+
private matchPattern;
|
|
48
|
+
private resolvePatternTerm;
|
|
49
|
+
private instantiateRuleAtom;
|
|
50
|
+
private sameTerm;
|
|
51
|
+
private resolveScope;
|
|
52
|
+
private buildIndex;
|
|
53
|
+
private insertOwnEntailedFact;
|
|
54
|
+
private removeOwnEntailedFact;
|
|
55
|
+
private canInsertEntailedFact;
|
|
56
|
+
private getTypes;
|
|
57
|
+
private getEdgeFacts;
|
|
58
|
+
private getOutgoingEdges;
|
|
59
|
+
private getIncomingEdges;
|
|
60
|
+
private getIncomingEdgesByProperty;
|
|
61
|
+
private getSuperClasses;
|
|
62
|
+
private getSuperProperties;
|
|
63
|
+
private getDomains;
|
|
64
|
+
private getObjectRanges;
|
|
65
|
+
private getInverses;
|
|
66
|
+
private isSymmetricProperty;
|
|
67
|
+
private isTransitiveProperty;
|
|
68
|
+
private typeFact;
|
|
69
|
+
private edgeFact;
|
|
70
|
+
private isTypeFact;
|
|
71
|
+
private asFact;
|
|
72
|
+
private asQuadSubject;
|
|
73
|
+
private asQuadObject;
|
|
74
|
+
private factKey;
|
|
75
|
+
private uniqueFacts;
|
|
76
|
+
private indexAdd;
|
|
77
|
+
private indexRemove;
|
|
78
|
+
private collectValidationWarnings;
|
|
79
|
+
}
|