@faubulous/mentor-rdf 0.1.12 → 0.1.13

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.
@@ -9,8 +9,10 @@ interface OwlRestriction {
9
9
  minCardinality?: number;
10
10
  maxCardinality?: number;
11
11
  qualifiedCardinality?: number;
12
- onClass?: n3.NamedNode;
13
- onDataRange?: n3.NamedNode;
12
+ onClass?: n3.Term;
13
+ onDataRange?: n3.Term;
14
+ allValuesFrom?: n3.Term;
15
+ someValuesFrom?: n3.Term;
14
16
  }
15
17
  /**
16
18
  * A simple OWL reasoner that expands the graph with inferred triples.
@@ -20,8 +22,8 @@ export declare class OwlReasoner extends RdfsReasoner {
20
22
  [subject: string]: OwlRestriction;
21
23
  };
22
24
  constructor();
23
- expand(store: n3.Store, sourceGraph: string | n3.Quad_Graph, targetGraph: string | n3.Quad_Graph): n3.Store;
24
- protected inferClassAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
25
- protected inferPropertyAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
25
+ protected afterInference(): void;
26
+ protected inferClassAxioms(lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
27
+ protected inferPropertyAxioms(lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
26
28
  }
27
29
  export {};
@@ -11,25 +11,29 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
11
11
  super();
12
12
  this.restrictions = {};
13
13
  }
14
- expand(store, sourceGraph, targetGraph) {
15
- this.restrictions = {};
16
- super.expand(store, sourceGraph, targetGraph);
17
- let t = this.getGraphNode(targetGraph);
14
+ afterInference() {
15
+ super.afterInference();
18
16
  for (let r of Object.values(this.restrictions)) {
19
17
  const p = r.onProperty;
20
18
  if (!p)
21
19
  continue;
22
20
  if (r.onDataRange) {
23
- store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.DatatypeProperty, t);
21
+ this.store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.DatatypeProperty, this.targetGraph);
24
22
  }
25
23
  else if (r.onClass) {
26
- store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.ObjectProperty, t);
24
+ this.store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.ObjectProperty, this.targetGraph);
25
+ }
26
+ else if (r.allValuesFrom) {
27
+ this.store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.ObjectProperty, this.targetGraph);
28
+ }
29
+ else if (r.someValuesFrom) {
30
+ this.store.addQuad(p, ontologies_1.rdf.type, ontologies_1.owl.ObjectProperty, this.targetGraph);
27
31
  }
28
32
  }
29
- return store;
33
+ this.restrictions = {};
30
34
  }
31
- inferClassAxioms(store, targetGraph, lists, quad) {
32
- super.inferClassAxioms(store, targetGraph, lists, quad);
35
+ inferClassAxioms(lists, quad) {
36
+ super.inferClassAxioms(lists, quad);
33
37
  let s = quad.subject;
34
38
  let p = quad.predicate;
35
39
  let o = quad.object.termType != "Literal" ? quad.object : undefined;
@@ -45,22 +49,23 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
45
49
  break;
46
50
  }
47
51
  }
52
+ break;
48
53
  }
49
54
  case ontologies_1.owl.equivalentClass.id:
50
55
  case ontologies_1.owl.complementOf.id:
51
56
  case ontologies_1.owl.disjointWith.id: {
52
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, targetGraph);
57
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
53
58
  if (o && !o.value.startsWith("http://www.w3.org")) {
54
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, targetGraph);
59
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
55
60
  }
56
61
  // The opposite is also true.
57
62
  if (o.termType == "NamedNode") {
58
- store.addQuad(o, ontologies_1.owl.equivalentClass, s, targetGraph);
63
+ this.store.addQuad(o, ontologies_1.owl.equivalentClass, s, this.targetGraph);
59
64
  }
60
65
  break;
61
66
  }
62
67
  case ontologies_1.owl.intersectionOf.id: {
63
- let equivalentSubjects = [...store.match(null, ontologies_1.owl.equivalentClass, s)]
68
+ let equivalentSubjects = [...this.store.match(null, ontologies_1.owl.equivalentClass, s)]
64
69
  .map(q => q.subject)
65
70
  .filter(q => q.termType == "NamedNode");
66
71
  // Rule #scm-int
@@ -68,15 +73,15 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
68
73
  if (c.termType != "NamedNode") {
69
74
  continue;
70
75
  }
71
- store.addQuad(s, ontologies_1.rdfs.subClassOf, c, targetGraph);
76
+ this.store.addQuad(s, ontologies_1.rdfs.subClassOf, c, this.targetGraph);
72
77
  for (let es of equivalentSubjects) {
73
- store.addQuad(es, ontologies_1.rdfs.subClassOf, c, targetGraph);
78
+ this.store.addQuad(es, ontologies_1.rdfs.subClassOf, c, this.targetGraph);
74
79
  }
75
80
  }
76
81
  break;
77
82
  }
78
83
  case ontologies_1.owl.unionOf.id: {
79
- let equivalentSubjects = [...store.match(null, ontologies_1.owl.equivalentClass, s)]
84
+ let equivalentSubjects = [...this.store.match(null, ontologies_1.owl.equivalentClass, s)]
80
85
  .map(q => q.subject)
81
86
  .filter(q => q.termType == "NamedNode");
82
87
  // Rule #scm-uni
@@ -84,25 +89,45 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
84
89
  if (c.termType != "NamedNode") {
85
90
  continue;
86
91
  }
87
- store.addQuad(c, ontologies_1.rdfs.subClassOf, s, targetGraph);
92
+ this.store.addQuad(c, ontologies_1.rdfs.subClassOf, s, this.targetGraph);
88
93
  for (let es of equivalentSubjects) {
89
- store.addQuad(c, ontologies_1.rdfs.subClassOf, es, targetGraph);
94
+ this.store.addQuad(c, ontologies_1.rdfs.subClassOf, es, this.targetGraph);
90
95
  }
91
96
  }
92
97
  break;
93
98
  }
94
99
  case ontologies_1.owl.onClass.id: {
95
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, targetGraph);
100
+ if (o.termType == "NamedNode") {
101
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
102
+ }
96
103
  break;
97
104
  }
98
105
  case ontologies_1.owl.onDataRange.id: {
99
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Datatype, targetGraph);
106
+ if (o.termType == "NamedNode") {
107
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Datatype, this.targetGraph);
108
+ }
100
109
  break;
101
110
  }
111
+ // Note:
112
+ // e.g. Gist also uses these on xsd:string, so inferring that this is a
113
+ // class is technically true, however, it would lead to undesirable results.
114
+ //
115
+ // case owl.allValuesFrom.id: {
116
+ // if (o.termType == "NamedNode") {
117
+ // this.store.addQuad(o, rdf.type, rdfs.Class, this.targetGraph);
118
+ // }
119
+ // break;
120
+ // }
121
+ // case owl.someValuesFrom.id: {
122
+ // if (o.termType == "NamedNode") {
123
+ // this.store.addQuad(o, rdf.type, rdfs.Class, this.targetGraph);
124
+ // }
125
+ // break;
126
+ // }
102
127
  }
103
128
  }
104
- inferPropertyAxioms(store, targetGraph, lists, quad) {
105
- super.inferPropertyAxioms(store, targetGraph, lists, quad);
129
+ inferPropertyAxioms(lists, quad) {
130
+ super.inferPropertyAxioms(lists, quad);
106
131
  let s = quad.subject;
107
132
  let p = quad.predicate;
108
133
  let o = quad.object.termType != "Literal" ? quad.object : undefined;
@@ -111,30 +136,42 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
111
136
  }
112
137
  switch (p.id) {
113
138
  case ontologies_1.owl.onProperty.id: {
114
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
139
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdf.Property, this.targetGraph);
115
140
  if (this.restrictions[s.value] && o.termType == "NamedNode") {
116
141
  this.restrictions[s.value].onProperty = o;
117
142
  }
118
143
  break;
119
144
  }
120
145
  case ontologies_1.owl.onClass.id: {
121
- if (this.restrictions[s.value] && o.termType == "NamedNode") {
146
+ if (this.restrictions[s.value]) {
122
147
  this.restrictions[s.value].onClass = o;
123
148
  }
124
149
  break;
125
150
  }
126
151
  case ontologies_1.owl.onDataRange.id: {
127
- if (this.restrictions[s.value] && o.termType == "NamedNode") {
152
+ if (this.restrictions[s.value]) {
128
153
  this.restrictions[s.value].onDataRange = o;
129
154
  }
130
155
  break;
131
156
  }
157
+ case ontologies_1.owl.allValuesFrom.id: {
158
+ if (this.restrictions[s.value]) {
159
+ this.restrictions[s.value].allValuesFrom = o;
160
+ }
161
+ break;
162
+ }
163
+ case ontologies_1.owl.someValuesFrom.id: {
164
+ if (this.restrictions[s.value]) {
165
+ this.restrictions[s.value].someValuesFrom = o;
166
+ }
167
+ break;
168
+ }
132
169
  case ontologies_1.owl.equivalentProperty.id: {
133
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
134
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
170
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, this.targetGraph);
171
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdf.Property, this.targetGraph);
135
172
  // The opposite is also true.
136
173
  if (o.termType == "NamedNode") {
137
- store.addQuad(o, ontologies_1.owl.equivalentProperty, s, targetGraph);
174
+ this.store.addQuad(o, ontologies_1.owl.equivalentProperty, s, this.targetGraph);
138
175
  }
139
176
  break;
140
177
  }
@@ -152,7 +189,7 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
152
189
  case ontologies_1.owl.ReflexiveProperty.id:
153
190
  case ontologies_1.owl.SymmetricProperty.id:
154
191
  case ontologies_1.owl.TransitiveProperty.id: {
155
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
192
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, this.targetGraph);
156
193
  break;
157
194
  }
158
195
  }
@@ -1 +1 @@
1
- {"version":3,"file":"owl-reasoner.js","sourceRoot":"","sources":["../../../src/rdf/reasoners/owl-reasoner.ts"],"names":[],"mappings":";;;AACA,iDAAkD;AAClD,mDAA+C;AAe/C;;GAEG;AACH,MAAa,WAAY,SAAQ,4BAAY;IAGzC;QACI,KAAK,EAAE,CAAC;QAHF,iBAAY,GAA0C,EAAE,CAAC;IAInE,CAAC;IAEM,MAAM,CAAC,KAAe,EAAE,WAAmC,EAAE,WAAmC;QACnG,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAE9C,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAEvC,KAAK,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;YAC5C,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;YAEvB,IAAI,CAAC,CAAC;gBAAE,SAAS;YAEjB,IAAI,CAAC,CAAC,WAAW,EAAE;gBACf,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAG,CAAC,IAAI,EAAE,gBAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;aACvD;iBAAM,IAAI,CAAC,CAAC,OAAO,EAAE;gBAClB,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAG,CAAC,IAAI,EAAE,gBAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;aACrD;SACJ;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAES,gBAAgB,CAAC,KAAe,EAAE,WAA0B,EAAE,KAAgC,EAAE,IAAa;QACnH,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAExD,IA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AE,CAAC;oBAC/B,KAAK,gBAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBAC7B,KAAK,gBAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBAC/B,KAAK,gBAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBAC/B,KAAK,gBAAG,CAAC,yBAAyB,CAAC,EAAE,CAAC;oBACtC,KAAK,gBAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;oBAChC,KAAK,gBAAG,CAAC,cAAc,CAAC,EAAE,CAAC;oBAC3B,KAAK,gBAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBAC7B,KAAK,gBAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;oBAC9B,KAAK,gBAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;oBAC9B,KAAK,gBAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;wBAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAG,CAAC,IAAI,EAAE,gBAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;wBAChE,MAAM;qBACT;iBACJ;gBACD,MAAM;aACT;SACJ;IACL,CAAC;CACJ;AA9ND,kCA8NC"}
@@ -4,9 +4,15 @@ import { IReasoner } from "./reasoner";
4
4
  * A simple RDFS reasoner that expands the graph with inferred triples.
5
5
  */
6
6
  export declare class RdfsReasoner implements IReasoner {
7
+ protected store: n3.Store;
8
+ sourceGraph: n3.Quad_Graph | undefined;
9
+ targetGraph: n3.Quad_Graph | undefined;
10
+ constructor();
7
11
  expand(store: n3.Store, sourceGraph: string | n3.Quad_Graph, targetGraph: string | n3.Quad_Graph): n3.Store;
8
12
  protected getGraphNode(graph: string | n3.Quad_Graph): n3.Quad_Graph;
9
- protected inferClassAxioms(store: n3.Store, graph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
10
- protected inferPropertyAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
11
- protected inferNamedIndividualAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
13
+ protected beforeInference(): void;
14
+ protected afterInference(): void;
15
+ protected inferClassAxioms(lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
16
+ protected inferPropertyAxioms(lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
17
+ protected inferNamedIndividualAxioms(lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
12
18
  }
@@ -8,16 +8,25 @@ const ontologies_1 = require("../../ontologies");
8
8
  * A simple RDFS reasoner that expands the graph with inferred triples.
9
9
  */
10
10
  class RdfsReasoner {
11
+ constructor() {
12
+ this.store = new n3.Store();
13
+ }
11
14
  expand(store, sourceGraph, targetGraph) {
12
- let s = this.getGraphNode(sourceGraph);
13
- let t = this.getGraphNode(targetGraph);
15
+ if (!this.store || !sourceGraph || !targetGraph) {
16
+ return store;
17
+ }
18
+ this.store = store;
19
+ this.sourceGraph = this.getGraphNode(sourceGraph);
20
+ this.targetGraph = this.getGraphNode(targetGraph);
21
+ this.beforeInference();
14
22
  const lists = store.extractLists();
15
23
  // Todo: Add the inferred triples to a new subgraph.
16
- for (let q of store.match(null, null, null, s)) {
17
- this.inferClassAxioms(store, t, lists, q);
18
- this.inferPropertyAxioms(store, t, lists, q);
19
- this.inferNamedIndividualAxioms(store, t, lists, q);
24
+ for (let q of store.match(null, null, null, this.sourceGraph)) {
25
+ this.inferClassAxioms(lists, q);
26
+ this.inferPropertyAxioms(lists, q);
27
+ this.inferNamedIndividualAxioms(lists, q);
20
28
  }
29
+ this.afterInference();
21
30
  return store;
22
31
  }
23
32
  getGraphNode(graph) {
@@ -28,7 +37,9 @@ class RdfsReasoner {
28
37
  return graph;
29
38
  }
30
39
  }
31
- inferClassAxioms(store, graph, lists, quad) {
40
+ beforeInference() { }
41
+ afterInference() { }
42
+ inferClassAxioms(lists, quad) {
32
43
  let s = quad.subject;
33
44
  let p = quad.predicate;
34
45
  let o = quad.object.termType != "Literal" ? quad.object : undefined;
@@ -38,45 +49,45 @@ class RdfsReasoner {
38
49
  switch (p.id) {
39
50
  case ontologies_1.rdf.type.id: {
40
51
  if (o.equals(ontologies_1.owl.Class)) {
41
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
52
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
42
53
  }
43
54
  else if (!o.value.startsWith("http://www.w3.org")) {
44
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
55
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
45
56
  }
46
57
  break;
47
58
  }
48
59
  case ontologies_1.rdfs.subClassOf.id: {
49
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
60
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
50
61
  if (!o.value.startsWith("http://www.w3.org")) {
51
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
62
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
52
63
  }
53
64
  else if (o.equals(ontologies_1.rdfs.Resource)) {
54
- store.addQuad(ontologies_1.rdfs.Resource, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
65
+ this.store.addQuad(ontologies_1.rdfs.Resource, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
55
66
  }
56
67
  else if (o.equals(ontologies_1.rdfs.Class)) {
57
- store.addQuad(ontologies_1.rdfs.Class, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
58
- store.addQuad(ontologies_1.rdfs.Class, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Resource, graph);
68
+ this.store.addQuad(ontologies_1.rdfs.Class, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
69
+ this.store.addQuad(ontologies_1.rdfs.Class, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Resource, this.targetGraph);
59
70
  }
60
71
  else if (o.equals(ontologies_1.rdfs.Datatype)) {
61
- store.addQuad(ontologies_1.rdfs.Datatype, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
62
- store.addQuad(ontologies_1.rdfs.Datatype, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Class, graph);
72
+ this.store.addQuad(ontologies_1.rdfs.Datatype, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
73
+ this.store.addQuad(ontologies_1.rdfs.Datatype, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Class, this.targetGraph);
63
74
  }
64
75
  else if (o.equals(ontologies_1.owl.Class)) {
65
- store.addQuad(ontologies_1.owl.Class, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
66
- store.addQuad(ontologies_1.owl.Class, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Class, graph);
76
+ this.store.addQuad(ontologies_1.owl.Class, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
77
+ this.store.addQuad(ontologies_1.owl.Class, ontologies_1.rdfs.subClassOf, ontologies_1.rdfs.Class, this.targetGraph);
67
78
  }
68
79
  break;
69
80
  }
70
81
  case ontologies_1.rdfs.range.id:
71
82
  case ontologies_1.rdfs.domain.id: {
72
83
  if (!o.value.startsWith("http://www.w3.org")) {
73
- store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, graph);
84
+ this.store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class, this.targetGraph);
74
85
  }
75
86
  break;
76
87
  }
77
88
  }
78
89
  }
79
- inferPropertyAxioms(store, targetGraph, lists, quad) {
90
+ inferPropertyAxioms(lists, quad) {
80
91
  let s = quad.subject;
81
92
  let p = quad.predicate;
82
93
  let o = quad.object.termType != "Literal" ? quad.object : undefined;
@@ -86,12 +97,12 @@ class RdfsReasoner {
86
97
  switch (p.id) {
87
98
  case ontologies_1.rdfs.range.id:
88
99
  case ontologies_1.rdfs.domain.id: {
89
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
100
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, this.targetGraph);
90
101
  break;
91
102
  }
92
103
  }
93
104
  }
94
- inferNamedIndividualAxioms(store, targetGraph, lists, quad) {
105
+ inferNamedIndividualAxioms(lists, quad) {
95
106
  let s = quad.subject;
96
107
  let p = quad.predicate;
97
108
  let o = quad.object.termType != "Literal" ? quad.object : undefined;
@@ -101,13 +112,13 @@ class RdfsReasoner {
101
112
  }
102
113
  switch (p.id) {
103
114
  case ontologies_1.rdf.type.id: {
104
- for (let q of store.match(o, ontologies_1.rdf.type, ontologies_1.rdf.Property)) {
115
+ for (let q of this.store.match(o, ontologies_1.rdf.type, ontologies_1.rdf.Property)) {
105
116
  // Instances of rdf:Property are not individuals.
106
117
  continue;
107
118
  }
108
- for (let q of store.match(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class)) {
119
+ for (let q of this.store.match(o, ontologies_1.rdf.type, ontologies_1.rdfs.Class)) {
109
120
  // Instances of rdfs:Class that are not classes themselves are individuals.
110
- store.addQuad(s, ontologies_1.rdf.type, ontologies_1.owl.NamedIndividual, targetGraph);
121
+ this.store.addQuad(s, ontologies_1.rdf.type, ontologies_1.owl.NamedIndividual, this.targetGraph);
111
122
  break;
112
123
  }
113
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rdfs-reasoner.js","sourceRoot":"","sources":["../../../src/rdf/reasoners/rdfs-reasoner.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,iDAAkD;AAGlD;;GAEG;AACH,MAAa,YAAY;IACd,MAAM,CAAC,KAAe,EAAE,WAAmC,EAAE,WAAmC;QACnG,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAA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aACJ;SACJ;IACL,CAAC;CACJ;AA1ID,oCA0IC"}
@@ -2,6 +2,7 @@
2
2
  import * as n3 from "n3";
3
3
  import { ParseOptions } from "../store-factory";
4
4
  import EventEmitter from "events";
5
+ export declare function pathToFileURL(filePath: string): string;
5
6
  /**
6
7
  * Create an RDF store from a file.
7
8
  * @param path Path to a file containing RDF triples in Turtle or N3 format.
@@ -17,3 +18,4 @@ export declare function createFromFile(filePath: string, parseOptions?: ParseOpt
17
18
  * @returns A promise that resolves to an RDF store.
18
19
  */
19
20
  export declare function createFromStream(input: string | EventEmitter, graphUri: string, parseOptions?: ParseOptions): Promise<n3.Store>;
21
+ export declare function writeNTriples(store: n3.Store, graphUri: string): string;
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFromStream = exports.createFromFile = void 0;
3
+ exports.writeNTriples = exports.createFromStream = exports.createFromFile = exports.pathToFileURL = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fs = tslib_1.__importStar(require("fs"));
6
6
  const path = tslib_1.__importStar(require("path"));
7
7
  const url = tslib_1.__importStar(require("url"));
8
8
  const store_factory_1 = require("../store-factory");
9
+ function pathToFileURL(filePath) {
10
+ return url.pathToFileURL(path.resolve(filePath)).href;
11
+ }
12
+ exports.pathToFileURL = pathToFileURL;
9
13
  /**
10
14
  * Create an RDF store from a file.
11
15
  * @param path Path to a file containing RDF triples in Turtle or N3 format.
@@ -14,7 +18,7 @@ const store_factory_1 = require("../store-factory");
14
18
  */
15
19
  function createFromFile(filePath, parseOptions) {
16
20
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
- const graphUri = url.pathToFileURL(path.resolve(filePath)).href;
21
+ const graphUri = pathToFileURL(filePath);
18
22
  const stream = fs.createReadStream(filePath);
19
23
  return store_factory_1.StoreFactory.createFromStream(stream, graphUri, parseOptions);
20
24
  });
@@ -33,4 +37,12 @@ function createFromStream(input, graphUri, parseOptions) {
33
37
  });
34
38
  }
35
39
  exports.createFromStream = createFromStream;
40
+ function writeNTriples(store, graphUri) {
41
+ let graph = "";
42
+ for (let q of store.readQuads(null, null, null, graphUri)) {
43
+ graph += `<${q.subject.value}> <${q.predicate.value}> <${q.object.value}> .\n`;
44
+ }
45
+ return graph;
46
+ }
47
+ exports.writeNTriples = writeNTriples;
36
48
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/rdf/tests/helpers.ts"],"names":[],"mappings":";;;;AACA,+CAAyB;AACzB,mDAA6B;AAC7B,iDAA2B;AAC3B,oDAA6D;AAG7D;;;;;EAKE;AACF,SAAsB,cAAc,CAAC,QAAgB,EAAE,YAA2B;;QAC9E,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;QAChE,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAE7C,OAAO,4BAAY,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IACzE,CAAC;CAAA;AALD,wCAKC;AAED;;;;;;GAMG;AACH,SAAsB,gBAAgB,CAAC,KAA4B,EAAE,QAAgB,EAAE,YAA2B;;QAC9G,OAAO,4BAAY,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IACxE,CAAC;CAAA;AAFD,4CAEC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/rdf/tests/helpers.ts"],"names":[],"mappings":";;;;AACA,+CAAyB;AACzB,mDAA6B;AAC7B,iDAA2B;AAC3B,oDAA6D;AAG7D,SAAgB,aAAa,CAAC,QAAgB;IAC1C,OAAO,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D,CAAC;AAFD,sCAEC;AAED;;;;;EAKE;AACF,SAAsB,cAAc,CAAC,QAAgB,EAAE,YAA2B;;QAC9E,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAE7C,OAAO,4BAAY,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IACzE,CAAC;CAAA;AALD,wCAKC;AAED;;;;;;GAMG;AACH,SAAsB,gBAAgB,CAAC,KAA4B,EAAE,QAAgB,EAAE,YAA2B;;QAC9G,OAAO,4BAAY,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IACxE,CAAC;CAAA;AAFD,4CAEC;AAED,SAAgB,aAAa,CAAC,KAAe,EAAE,QAAgB;IAC3D,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,KAAI,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EACxD;QACI,KAAK,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;KAClF;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AATD,sCASC"}
@@ -0,0 +1,65 @@
1
+ import * as n3 from "n3";
2
+ export declare const FIBO_ORGANIZATION: {
3
+ /** role of a group or organization that has members that are people or other organizations */
4
+ MemberBearingOrganization: string;
5
+ /** situation, corresponding to an n-ary relation, in which some group or organization has at least one member (person or organization) for some period of time */
6
+ Membership: string;
7
+ /** collection of one or more people, or groups of people formed together into a community or other social, commercial or political structure to act, or that is designated to act, towards some purpose, such as to meet a need or pursue collective goals on a continuing basis */
8
+ Organization: string;
9
+ /** identification scheme dedicated to the unique identification of organizations */
10
+ OrganizationIdentificationScheme: string;
11
+ /** identifier assigned to an organization within an organization identification scheme, and unique within that scheme */
12
+ OrganizationIdentifier: string;
13
+ /** party (person or organization) that has a membership role with respect to some organization */
14
+ OrganizationMember: string;
15
+ /** designation by which some organization is known in some context */
16
+ OrganizationName: string;
17
+ /** identifier allocated to a particular organizational sub-unit */
18
+ OrganizationPartIdentifier: string;
19
+ /** any department, service, and other entity within a larger organization that only has full recognition within the context of that organization, but requires identification for some purpose */
20
+ OrganizationalSubUnit: string;
21
+ /** identifies the organization acting in the role of having members in an organizational membership situation */
22
+ hasMembership: string;
23
+ /** indicates the party that is the member in an organizational membership situation */
24
+ hasOrganizationMember: string;
25
+ /** relates an organization to a part of that organization */
26
+ hasSubUnit: string;
27
+ /** indicates the context of membership in which the party plays the role of having members */
28
+ isMembershipPartyIn: string;
29
+ /** indicates the context of membership in which some party is an organization member */
30
+ isOrganizationMember: string;
31
+ /** relates a part of an organization to the larger entity */
32
+ isSubUnitOf: string;
33
+ };
34
+ export declare const fibo_organization: {
35
+ /** role of a group or organization that has members that are people or other organizations */
36
+ MemberBearingOrganization: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/MemberBearingOrganization">;
37
+ /** situation, corresponding to an n-ary relation, in which some group or organization has at least one member (person or organization) for some period of time */
38
+ Membership: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Membership">;
39
+ /** collection of one or more people, or groups of people formed together into a community or other social, commercial or political structure to act, or that is designated to act, towards some purpose, such as to meet a need or pursue collective goals on a continuing basis */
40
+ Organization: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Organization">;
41
+ /** identification scheme dedicated to the unique identification of organizations */
42
+ OrganizationIdentificationScheme: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentificationScheme">;
43
+ /** identifier assigned to an organization within an organization identification scheme, and unique within that scheme */
44
+ OrganizationIdentifier: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentifier">;
45
+ /** party (person or organization) that has a membership role with respect to some organization */
46
+ OrganizationMember: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationMember">;
47
+ /** designation by which some organization is known in some context */
48
+ OrganizationName: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationName">;
49
+ /** identifier allocated to a particular organizational sub-unit */
50
+ OrganizationPartIdentifier: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationPartIdentifier">;
51
+ /** any department, service, and other entity within a larger organization that only has full recognition within the context of that organization, but requires identification for some purpose */
52
+ OrganizationalSubUnit: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationalSubUnit">;
53
+ /** identifies the organization acting in the role of having members in an organizational membership situation */
54
+ hasMembership: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasMembership">;
55
+ /** indicates the party that is the member in an organizational membership situation */
56
+ hasOrganizationMember: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasOrganizationMember">;
57
+ /** relates an organization to a part of that organization */
58
+ hasSubUnit: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasSubUnit">;
59
+ /** indicates the context of membership in which the party plays the role of having members */
60
+ isMembershipPartyIn: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isMembershipPartyIn">;
61
+ /** indicates the context of membership in which some party is an organization member */
62
+ isOrganizationMember: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isOrganizationMember">;
63
+ /** relates a part of an organization to the larger entity */
64
+ isSubUnitOf: n3.NamedNode<"https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isSubUnitOf">;
65
+ };
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fibo_organization = exports.FIBO_ORGANIZATION = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const n3 = tslib_1.__importStar(require("n3"));
6
+ exports.FIBO_ORGANIZATION = {
7
+ /** role of a group or organization that has members that are people or other organizations */
8
+ 'MemberBearingOrganization': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/MemberBearingOrganization',
9
+ /** situation, corresponding to an n-ary relation, in which some group or organization has at least one member (person or organization) for some period of time */
10
+ 'Membership': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Membership',
11
+ /** collection of one or more people, or groups of people formed together into a community or other social, commercial or political structure to act, or that is designated to act, towards some purpose, such as to meet a need or pursue collective goals on a continuing basis */
12
+ 'Organization': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Organization',
13
+ /** identification scheme dedicated to the unique identification of organizations */
14
+ 'OrganizationIdentificationScheme': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentificationScheme',
15
+ /** identifier assigned to an organization within an organization identification scheme, and unique within that scheme */
16
+ 'OrganizationIdentifier': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentifier',
17
+ /** party (person or organization) that has a membership role with respect to some organization */
18
+ 'OrganizationMember': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationMember',
19
+ /** designation by which some organization is known in some context */
20
+ 'OrganizationName': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationName',
21
+ /** identifier allocated to a particular organizational sub-unit */
22
+ 'OrganizationPartIdentifier': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationPartIdentifier',
23
+ /** any department, service, and other entity within a larger organization that only has full recognition within the context of that organization, but requires identification for some purpose */
24
+ 'OrganizationalSubUnit': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationalSubUnit',
25
+ /** identifies the organization acting in the role of having members in an organizational membership situation */
26
+ 'hasMembership': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasMembership',
27
+ /** indicates the party that is the member in an organizational membership situation */
28
+ 'hasOrganizationMember': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasOrganizationMember',
29
+ /** relates an organization to a part of that organization */
30
+ 'hasSubUnit': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasSubUnit',
31
+ /** indicates the context of membership in which the party plays the role of having members */
32
+ 'isMembershipPartyIn': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isMembershipPartyIn',
33
+ /** indicates the context of membership in which some party is an organization member */
34
+ 'isOrganizationMember': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isOrganizationMember',
35
+ /** relates a part of an organization to the larger entity */
36
+ 'isSubUnitOf': 'https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isSubUnitOf',
37
+ };
38
+ exports.fibo_organization = {
39
+ /** role of a group or organization that has members that are people or other organizations */
40
+ 'MemberBearingOrganization': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/MemberBearingOrganization'),
41
+ /** situation, corresponding to an n-ary relation, in which some group or organization has at least one member (person or organization) for some period of time */
42
+ 'Membership': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Membership'),
43
+ /** collection of one or more people, or groups of people formed together into a community or other social, commercial or political structure to act, or that is designated to act, towards some purpose, such as to meet a need or pursue collective goals on a continuing basis */
44
+ 'Organization': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/Organization'),
45
+ /** identification scheme dedicated to the unique identification of organizations */
46
+ 'OrganizationIdentificationScheme': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentificationScheme'),
47
+ /** identifier assigned to an organization within an organization identification scheme, and unique within that scheme */
48
+ 'OrganizationIdentifier': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationIdentifier'),
49
+ /** party (person or organization) that has a membership role with respect to some organization */
50
+ 'OrganizationMember': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationMember'),
51
+ /** designation by which some organization is known in some context */
52
+ 'OrganizationName': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationName'),
53
+ /** identifier allocated to a particular organizational sub-unit */
54
+ 'OrganizationPartIdentifier': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationPartIdentifier'),
55
+ /** any department, service, and other entity within a larger organization that only has full recognition within the context of that organization, but requires identification for some purpose */
56
+ 'OrganizationalSubUnit': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/OrganizationalSubUnit'),
57
+ /** identifies the organization acting in the role of having members in an organizational membership situation */
58
+ 'hasMembership': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasMembership'),
59
+ /** indicates the party that is the member in an organizational membership situation */
60
+ 'hasOrganizationMember': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasOrganizationMember'),
61
+ /** relates an organization to a part of that organization */
62
+ 'hasSubUnit': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/hasSubUnit'),
63
+ /** indicates the context of membership in which the party plays the role of having members */
64
+ 'isMembershipPartyIn': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isMembershipPartyIn'),
65
+ /** indicates the context of membership in which some party is an organization member */
66
+ 'isOrganizationMember': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isOrganizationMember'),
67
+ /** relates a part of an organization to the larger entity */
68
+ 'isSubUnitOf': new n3.NamedNode('https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/isSubUnitOf'),
69
+ };
70
+ //# sourceMappingURL=fibo-organization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fibo-organization.js","sourceRoot":"","sources":["../../../../src/rdf/tests/ontologies/fibo-organization.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AAEZ,QAAA,iBAAiB,GAAG;IAChC,8FAA8F;IAC9F,2BAA2B,EAAE,qGAAqG;IAClI,kKAAkK;IAClK,YAAY,EAAE,sFAAsF;IACpG,oRAAoR;IACpR,cAAc,EAAE,wFAAwF;IACxG,oFAAoF;IACpF,kCAAkC,EAAE,4GAA4G;IAChJ,yHAAyH;IACzH,wBAAwB,EAAE,kGAAkG;IAC5H,kGAAkG;IAClG,oBAAoB,EAAE,8FAA8F;IACpH,sEAAsE;IACtE,kBAAkB,EAAE,4FAA4F;IAChH,mEAAmE;IACnE,4BAA4B,EAAE,sGAAsG;IACpI,kMAAkM;IAClM,uBAAuB,EAAE,iGAAiG;IAC1H,iHAAiH;IACjH,eAAe,EAAE,yFAAyF;IAC1G,uFAAuF;IACvF,uBAAuB,EAAE,iGAAiG;IAC1H,6DAA6D;IAC7D,YAAY,EAAE,sFAAsF;IACpG,8FAA8F;IAC9F,qBAAqB,EAAE,+FAA+F;IACtH,wFAAwF;IACxF,sBAAsB,EAAE,gGAAgG;IACxH,6DAA6D;IAC7D,aAAa,EAAE,uFAAuF;CACtG,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAChC,8FAA8F;IAC9F,2BAA2B,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,qGAAqG,CAAC;IACpJ,kKAAkK;IAClK,YAAY,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,sFAAsF,CAAC;IACtH,oRAAoR;IACpR,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,wFAAwF,CAAC;IAC1H,oFAAoF;IACpF,kCAAkC,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,4GAA4G,CAAC;IAClK,yHAAyH;IACzH,wBAAwB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,kGAAkG,CAAC;IAC9I,kGAAkG;IAClG,oBAAoB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,8FAA8F,CAAC;IACtI,sEAAsE;IACtE,kBAAkB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,4FAA4F,CAAC;IAClI,mEAAmE;IACnE,4BAA4B,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,sGAAsG,CAAC;IACtJ,kMAAkM;IAClM,uBAAuB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,iGAAiG,CAAC;IAC5I,iHAAiH;IACjH,eAAe,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,yFAAyF,CAAC;IAC5H,uFAAuF;IACvF,uBAAuB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,iGAAiG,CAAC;IAC5I,6DAA6D;IAC7D,YAAY,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,sFAAsF,CAAC;IACtH,8FAA8F;IAC9F,qBAAqB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,+FAA+F,CAAC;IACxI,wFAAwF;IACxF,sBAAsB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,gGAAgG,CAAC;IAC1I,6DAA6D;IAC7D,aAAa,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,uFAAuF,CAAC;CACxH,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './fibo-agents';
2
+ export * from './fibo-organization';
2
3
  export * from './gist';
3
4
  export * from './owl';
4
5
  export * from './schema';
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./fibo-agents"), exports);
5
+ tslib_1.__exportStar(require("./fibo-organization"), exports);
5
6
  tslib_1.__exportStar(require("./gist"), exports);
6
7
  tslib_1.__exportStar(require("./owl"), exports);
7
8
  tslib_1.__exportStar(require("./schema"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rdf/tests/ontologies/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,iDAAuB;AACvB,gDAAsB;AACtB,mDAAyB;AACzB,mDAAyB;AACzB,mDAAyB;AACzB,iDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rdf/tests/ontologies/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,8DAAoC;AACpC,iDAAuB;AACvB,gDAAsB;AACtB,mDAAyB;AACzB,mDAAyB;AACzB,mDAAyB;AACzB,iDAAuB"}
@@ -0,0 +1,135 @@
1
+ import * as n3 from "n3";
2
+ export declare const SKOS: {
3
+ core: string;
4
+ /** A meaningful collection of concepts. */
5
+ Collection: string;
6
+ /** An idea or notion; a unit of thought. */
7
+ Concept: string;
8
+ /** A set of concepts, optionally including statements about semantic relationships between those concepts. */
9
+ ConceptScheme: string;
10
+ /** An ordered collection of concepts, where both the grouping and the ordering are meaningful. */
11
+ OrderedCollection: string;
12
+ /** An alternative lexical label for a resource. */
13
+ altLabel: string;
14
+ /** skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
15
+ broadMatch: string;
16
+ /** Relates a concept to a concept that is more general in meaning. */
17
+ broader: string;
18
+ /** skos:broaderTransitive is a transitive superproperty of skos:broader. */
19
+ broaderTransitive: string;
20
+ /** A note about a modification to a concept. */
21
+ changeNote: string;
22
+ /** skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. */
23
+ closeMatch: string;
24
+ /** A statement or formal explanation of the meaning of a concept. */
25
+ definition: string;
26
+ /** A note for an editor, translator or maintainer of the vocabulary. */
27
+ editorialNote: string;
28
+ /** skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. */
29
+ exactMatch: string;
30
+ /** An example of the use of a concept. */
31
+ example: string;
32
+ /** Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. */
33
+ hasTopConcept: string;
34
+ /** A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. */
35
+ hiddenLabel: string;
36
+ /** A note about the past state/use/meaning of a concept. */
37
+ historyNote: string;
38
+ /** Relates a resource (for example a concept) to a concept scheme in which it is included. */
39
+ inScheme: string;
40
+ /** Relates two concepts coming, by convention, from different schemes, and that have comparable meanings */
41
+ mappingRelation: string;
42
+ /** Relates a collection to one of its members. */
43
+ member: string;
44
+ /** Relates an ordered collection to the RDF list containing its members. */
45
+ memberList: string;
46
+ /** skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
47
+ narrowMatch: string;
48
+ /** Relates a concept to a concept that is more specific in meaning. */
49
+ narrower: string;
50
+ /** skos:narrowerTransitive is a transitive superproperty of skos:narrower. */
51
+ narrowerTransitive: string;
52
+ /** A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. */
53
+ notation: string;
54
+ /** A general note, for any purpose. */
55
+ note: string;
56
+ /** The preferred lexical label for a resource, in a given language. */
57
+ prefLabel: string;
58
+ /** Relates a concept to a concept with which there is an associative semantic relationship. */
59
+ related: string;
60
+ /** skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. */
61
+ relatedMatch: string;
62
+ /** A note that helps to clarify the meaning and/or the use of a concept. */
63
+ scopeNote: string;
64
+ /** Links a concept to a concept related by meaning. */
65
+ semanticRelation: string;
66
+ /** Relates a concept to the concept scheme that it is a top level concept of. */
67
+ topConceptOf: string;
68
+ };
69
+ export declare const skos: {
70
+ core: n3.NamedNode<"http://www.w3.org/2004/02/skos/core">;
71
+ /** A meaningful collection of concepts. */
72
+ Collection: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#Collection">;
73
+ /** An idea or notion; a unit of thought. */
74
+ Concept: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#Concept">;
75
+ /** A set of concepts, optionally including statements about semantic relationships between those concepts. */
76
+ ConceptScheme: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#ConceptScheme">;
77
+ /** An ordered collection of concepts, where both the grouping and the ordering are meaningful. */
78
+ OrderedCollection: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#OrderedCollection">;
79
+ /** An alternative lexical label for a resource. */
80
+ altLabel: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#altLabel">;
81
+ /** skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
82
+ broadMatch: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#broadMatch">;
83
+ /** Relates a concept to a concept that is more general in meaning. */
84
+ broader: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#broader">;
85
+ /** skos:broaderTransitive is a transitive superproperty of skos:broader. */
86
+ broaderTransitive: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#broaderTransitive">;
87
+ /** A note about a modification to a concept. */
88
+ changeNote: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#changeNote">;
89
+ /** skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. */
90
+ closeMatch: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#closeMatch">;
91
+ /** A statement or formal explanation of the meaning of a concept. */
92
+ definition: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#definition">;
93
+ /** A note for an editor, translator or maintainer of the vocabulary. */
94
+ editorialNote: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#editorialNote">;
95
+ /** skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. */
96
+ exactMatch: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#exactMatch">;
97
+ /** An example of the use of a concept. */
98
+ example: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#example">;
99
+ /** Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. */
100
+ hasTopConcept: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#hasTopConcept">;
101
+ /** A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. */
102
+ hiddenLabel: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#hiddenLabel">;
103
+ /** A note about the past state/use/meaning of a concept. */
104
+ historyNote: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#historyNote">;
105
+ /** Relates a resource (for example a concept) to a concept scheme in which it is included. */
106
+ inScheme: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#inScheme">;
107
+ /** Relates two concepts coming, by convention, from different schemes, and that have comparable meanings */
108
+ mappingRelation: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#mappingRelation">;
109
+ /** Relates a collection to one of its members. */
110
+ member: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#member">;
111
+ /** Relates an ordered collection to the RDF list containing its members. */
112
+ memberList: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#memberList">;
113
+ /** skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
114
+ narrowMatch: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#narrowMatch">;
115
+ /** Relates a concept to a concept that is more specific in meaning. */
116
+ narrower: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#narrower">;
117
+ /** skos:narrowerTransitive is a transitive superproperty of skos:narrower. */
118
+ narrowerTransitive: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#narrowerTransitive">;
119
+ /** A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. */
120
+ notation: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#notation">;
121
+ /** A general note, for any purpose. */
122
+ note: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#note">;
123
+ /** The preferred lexical label for a resource, in a given language. */
124
+ prefLabel: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#prefLabel">;
125
+ /** Relates a concept to a concept with which there is an associative semantic relationship. */
126
+ related: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#related">;
127
+ /** skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. */
128
+ relatedMatch: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#relatedMatch">;
129
+ /** A note that helps to clarify the meaning and/or the use of a concept. */
130
+ scopeNote: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#scopeNote">;
131
+ /** Links a concept to a concept related by meaning. */
132
+ semanticRelation: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#semanticRelation">;
133
+ /** Relates a concept to the concept scheme that it is a top level concept of. */
134
+ topConceptOf: n3.NamedNode<"http://www.w3.org/2004/02/skos/core#topConceptOf">;
135
+ };
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.skos = exports.SKOS = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const n3 = tslib_1.__importStar(require("n3"));
6
+ exports.SKOS = {
7
+ 'core': 'http://www.w3.org/2004/02/skos/core',
8
+ /** A meaningful collection of concepts. */
9
+ 'Collection': 'http://www.w3.org/2004/02/skos/core#Collection',
10
+ /** An idea or notion; a unit of thought. */
11
+ 'Concept': 'http://www.w3.org/2004/02/skos/core#Concept',
12
+ /** A set of concepts, optionally including statements about semantic relationships between those concepts. */
13
+ 'ConceptScheme': 'http://www.w3.org/2004/02/skos/core#ConceptScheme',
14
+ /** An ordered collection of concepts, where both the grouping and the ordering are meaningful. */
15
+ 'OrderedCollection': 'http://www.w3.org/2004/02/skos/core#OrderedCollection',
16
+ /** An alternative lexical label for a resource. */
17
+ 'altLabel': 'http://www.w3.org/2004/02/skos/core#altLabel',
18
+ /** skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
19
+ 'broadMatch': 'http://www.w3.org/2004/02/skos/core#broadMatch',
20
+ /** Relates a concept to a concept that is more general in meaning. */
21
+ 'broader': 'http://www.w3.org/2004/02/skos/core#broader',
22
+ /** skos:broaderTransitive is a transitive superproperty of skos:broader. */
23
+ 'broaderTransitive': 'http://www.w3.org/2004/02/skos/core#broaderTransitive',
24
+ /** A note about a modification to a concept. */
25
+ 'changeNote': 'http://www.w3.org/2004/02/skos/core#changeNote',
26
+ /** skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. */
27
+ 'closeMatch': 'http://www.w3.org/2004/02/skos/core#closeMatch',
28
+ /** A statement or formal explanation of the meaning of a concept. */
29
+ 'definition': 'http://www.w3.org/2004/02/skos/core#definition',
30
+ /** A note for an editor, translator or maintainer of the vocabulary. */
31
+ 'editorialNote': 'http://www.w3.org/2004/02/skos/core#editorialNote',
32
+ /** skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. */
33
+ 'exactMatch': 'http://www.w3.org/2004/02/skos/core#exactMatch',
34
+ /** An example of the use of a concept. */
35
+ 'example': 'http://www.w3.org/2004/02/skos/core#example',
36
+ /** Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. */
37
+ 'hasTopConcept': 'http://www.w3.org/2004/02/skos/core#hasTopConcept',
38
+ /** A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. */
39
+ 'hiddenLabel': 'http://www.w3.org/2004/02/skos/core#hiddenLabel',
40
+ /** A note about the past state/use/meaning of a concept. */
41
+ 'historyNote': 'http://www.w3.org/2004/02/skos/core#historyNote',
42
+ /** Relates a resource (for example a concept) to a concept scheme in which it is included. */
43
+ 'inScheme': 'http://www.w3.org/2004/02/skos/core#inScheme',
44
+ /** Relates two concepts coming, by convention, from different schemes, and that have comparable meanings */
45
+ 'mappingRelation': 'http://www.w3.org/2004/02/skos/core#mappingRelation',
46
+ /** Relates a collection to one of its members. */
47
+ 'member': 'http://www.w3.org/2004/02/skos/core#member',
48
+ /** Relates an ordered collection to the RDF list containing its members. */
49
+ 'memberList': 'http://www.w3.org/2004/02/skos/core#memberList',
50
+ /** skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
51
+ 'narrowMatch': 'http://www.w3.org/2004/02/skos/core#narrowMatch',
52
+ /** Relates a concept to a concept that is more specific in meaning. */
53
+ 'narrower': 'http://www.w3.org/2004/02/skos/core#narrower',
54
+ /** skos:narrowerTransitive is a transitive superproperty of skos:narrower. */
55
+ 'narrowerTransitive': 'http://www.w3.org/2004/02/skos/core#narrowerTransitive',
56
+ /** A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. */
57
+ 'notation': 'http://www.w3.org/2004/02/skos/core#notation',
58
+ /** A general note, for any purpose. */
59
+ 'note': 'http://www.w3.org/2004/02/skos/core#note',
60
+ /** The preferred lexical label for a resource, in a given language. */
61
+ 'prefLabel': 'http://www.w3.org/2004/02/skos/core#prefLabel',
62
+ /** Relates a concept to a concept with which there is an associative semantic relationship. */
63
+ 'related': 'http://www.w3.org/2004/02/skos/core#related',
64
+ /** skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. */
65
+ 'relatedMatch': 'http://www.w3.org/2004/02/skos/core#relatedMatch',
66
+ /** A note that helps to clarify the meaning and/or the use of a concept. */
67
+ 'scopeNote': 'http://www.w3.org/2004/02/skos/core#scopeNote',
68
+ /** Links a concept to a concept related by meaning. */
69
+ 'semanticRelation': 'http://www.w3.org/2004/02/skos/core#semanticRelation',
70
+ /** Relates a concept to the concept scheme that it is a top level concept of. */
71
+ 'topConceptOf': 'http://www.w3.org/2004/02/skos/core#topConceptOf',
72
+ };
73
+ exports.skos = {
74
+ 'core': new n3.NamedNode('http://www.w3.org/2004/02/skos/core'),
75
+ /** A meaningful collection of concepts. */
76
+ 'Collection': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#Collection'),
77
+ /** An idea or notion; a unit of thought. */
78
+ 'Concept': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#Concept'),
79
+ /** A set of concepts, optionally including statements about semantic relationships between those concepts. */
80
+ 'ConceptScheme': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#ConceptScheme'),
81
+ /** An ordered collection of concepts, where both the grouping and the ordering are meaningful. */
82
+ 'OrderedCollection': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#OrderedCollection'),
83
+ /** An alternative lexical label for a resource. */
84
+ 'altLabel': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#altLabel'),
85
+ /** skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
86
+ 'broadMatch': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#broadMatch'),
87
+ /** Relates a concept to a concept that is more general in meaning. */
88
+ 'broader': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#broader'),
89
+ /** skos:broaderTransitive is a transitive superproperty of skos:broader. */
90
+ 'broaderTransitive': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#broaderTransitive'),
91
+ /** A note about a modification to a concept. */
92
+ 'changeNote': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#changeNote'),
93
+ /** skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. */
94
+ 'closeMatch': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#closeMatch'),
95
+ /** A statement or formal explanation of the meaning of a concept. */
96
+ 'definition': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#definition'),
97
+ /** A note for an editor, translator or maintainer of the vocabulary. */
98
+ 'editorialNote': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#editorialNote'),
99
+ /** skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. */
100
+ 'exactMatch': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#exactMatch'),
101
+ /** An example of the use of a concept. */
102
+ 'example': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#example'),
103
+ /** Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. */
104
+ 'hasTopConcept': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#hasTopConcept'),
105
+ /** A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. */
106
+ 'hiddenLabel': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#hiddenLabel'),
107
+ /** A note about the past state/use/meaning of a concept. */
108
+ 'historyNote': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#historyNote'),
109
+ /** Relates a resource (for example a concept) to a concept scheme in which it is included. */
110
+ 'inScheme': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#inScheme'),
111
+ /** Relates two concepts coming, by convention, from different schemes, and that have comparable meanings */
112
+ 'mappingRelation': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#mappingRelation'),
113
+ /** Relates a collection to one of its members. */
114
+ 'member': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#member'),
115
+ /** Relates an ordered collection to the RDF list containing its members. */
116
+ 'memberList': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#memberList'),
117
+ /** skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. */
118
+ 'narrowMatch': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#narrowMatch'),
119
+ /** Relates a concept to a concept that is more specific in meaning. */
120
+ 'narrower': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#narrower'),
121
+ /** skos:narrowerTransitive is a transitive superproperty of skos:narrower. */
122
+ 'narrowerTransitive': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#narrowerTransitive'),
123
+ /** A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. */
124
+ 'notation': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#notation'),
125
+ /** A general note, for any purpose. */
126
+ 'note': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#note'),
127
+ /** The preferred lexical label for a resource, in a given language. */
128
+ 'prefLabel': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#prefLabel'),
129
+ /** Relates a concept to a concept with which there is an associative semantic relationship. */
130
+ 'related': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#related'),
131
+ /** skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. */
132
+ 'relatedMatch': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#relatedMatch'),
133
+ /** A note that helps to clarify the meaning and/or the use of a concept. */
134
+ 'scopeNote': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#scopeNote'),
135
+ /** Links a concept to a concept related by meaning. */
136
+ 'semanticRelation': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#semanticRelation'),
137
+ /** Relates a concept to the concept scheme that it is a top level concept of. */
138
+ 'topConceptOf': new n3.NamedNode('http://www.w3.org/2004/02/skos/core#topConceptOf'),
139
+ };
140
+ //# sourceMappingURL=skos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skos.js","sourceRoot":"","sources":["../../../../src/rdf/tests/ontologies/skos.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AAEZ,QAAA,IAAI,GAAG;IACnB,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I,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,kDAAkD,CAAC;IACpF,4EAA4E;IAC5E,WAAW,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,+CAA+C,CAAC;IAC9E,uDAAuD;IACvD,kBAAkB,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,sDAAsD,CAAC;IAC5F,iFAAiF;IACjF,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,kDAAkD,CAAC;CACpF,CAAA"}
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "ontology",
11
11
  "vocabulary"
12
12
  ],
13
- "version": "0.1.12",
13
+ "version": "0.1.13",
14
14
  "private": false,
15
15
  "author": {
16
16
  "name": "Sebastian Faubel"