@rdfx/resource 0.0.17 → 0.0.19
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/DatasetValues.js +3 -0
- package/dist/MistypedValueError.js +2 -0
- package/dist/Resource.js +3 -0
- package/dist/ResourceSet.js +2 -0
- package/dist/Value.js +4 -0
- package/dist/ValueError.js +2 -0
- package/dist/Values.js +5 -1
- package/dist/vocabularies.d.ts +27 -27
- package/package.json +4 -4
package/dist/DatasetValues.js
CHANGED
|
@@ -2,6 +2,9 @@ import TermSet from "@rdfjs/term-set";
|
|
|
2
2
|
import { Value } from "./Value.js";
|
|
3
3
|
import { Values } from "./Values.js";
|
|
4
4
|
export class DatasetValues extends Values {
|
|
5
|
+
dataFactory;
|
|
6
|
+
graph;
|
|
7
|
+
unique;
|
|
5
8
|
constructor({ dataFactory, focusResource, graph, propertyPath, unique, }) {
|
|
6
9
|
super({ focusResource, propertyPath });
|
|
7
10
|
this.dataFactory = dataFactory;
|
package/dist/Resource.js
CHANGED
|
@@ -11,6 +11,9 @@ import { rdf, rdfs } from "./vocabularies.js";
|
|
|
11
11
|
* A Resource abstraction over subjects or objects in an RDF/JS dataset.
|
|
12
12
|
*/
|
|
13
13
|
export class Resource {
|
|
14
|
+
dataFactory;
|
|
15
|
+
dataset;
|
|
16
|
+
identifier;
|
|
14
17
|
constructor({ dataFactory, dataset, identifier, }) {
|
|
15
18
|
this.dataFactory = dataFactory;
|
|
16
19
|
this.dataset = dataset;
|
package/dist/ResourceSet.js
CHANGED
|
@@ -5,6 +5,8 @@ import { rdf, rdfs } from "./vocabularies.js";
|
|
|
5
5
|
* A ResourceSet wraps an RDF/JS dataset with convenient resource factory methods.
|
|
6
6
|
*/
|
|
7
7
|
export class ResourceSet {
|
|
8
|
+
dataFactory;
|
|
9
|
+
dataset;
|
|
8
10
|
constructor({ dataFactory, dataset, }) {
|
|
9
11
|
this.dataFactory = dataFactory;
|
|
10
12
|
this.dataset = dataset;
|
package/dist/Value.js
CHANGED
|
@@ -6,6 +6,10 @@ import { MistypedTermValueError } from "./MistypedTermValueError.js";
|
|
|
6
6
|
import { Resource } from "./Resource.js";
|
|
7
7
|
import { Values } from "./Values.js";
|
|
8
8
|
export class Value {
|
|
9
|
+
dataFactory;
|
|
10
|
+
focusResource;
|
|
11
|
+
propertyPath;
|
|
12
|
+
term;
|
|
9
13
|
constructor({ dataFactory, focusResource, propertyPath, term, }) {
|
|
10
14
|
this.dataFactory = dataFactory;
|
|
11
15
|
this.focusResource = focusResource;
|
package/dist/ValueError.js
CHANGED
package/dist/Values.js
CHANGED
|
@@ -12,6 +12,8 @@ import { MissingValueError } from "./MissingValueError.js";
|
|
|
12
12
|
* The class doesn't try to implement the entire Array interface. Methods are added as needed by downstream code.
|
|
13
13
|
*/
|
|
14
14
|
export class Values {
|
|
15
|
+
focusResource;
|
|
16
|
+
propertyPath;
|
|
15
17
|
constructor({ focusResource, propertyPath, }) {
|
|
16
18
|
this.focusResource = focusResource;
|
|
17
19
|
this.propertyPath = propertyPath;
|
|
@@ -172,6 +174,7 @@ export class Values {
|
|
|
172
174
|
* Must be in the same file to avoid circular dependencies.
|
|
173
175
|
*/
|
|
174
176
|
class ArrayValues extends Values {
|
|
177
|
+
values;
|
|
175
178
|
constructor({ values, ...superParameters }) {
|
|
176
179
|
super(superParameters);
|
|
177
180
|
this.values = values;
|
|
@@ -206,9 +209,10 @@ class EmptyValues extends Values {
|
|
|
206
209
|
* Must be in the same file to avoid circular dependencies.
|
|
207
210
|
*/
|
|
208
211
|
class SingletonValues extends Values {
|
|
212
|
+
value;
|
|
213
|
+
length = 1;
|
|
209
214
|
constructor({ value, ...superParameters }) {
|
|
210
215
|
super(superParameters);
|
|
211
|
-
this.length = 1;
|
|
212
216
|
this.value = value;
|
|
213
217
|
}
|
|
214
218
|
*[Symbol.iterator]() {
|
package/dist/vocabularies.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
export declare namespace rdf {
|
|
2
|
-
const first: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#first">;
|
|
3
|
-
const nil: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil">;
|
|
4
|
-
const rest: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest">;
|
|
5
|
-
const type: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#type">;
|
|
2
|
+
const first: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#first">;
|
|
3
|
+
const nil: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil">;
|
|
4
|
+
const rest: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest">;
|
|
5
|
+
const type: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/1999/02/22-rdf-syntax-ns#type">;
|
|
6
6
|
}
|
|
7
7
|
export declare namespace rdfs {
|
|
8
|
-
const subClassOf: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2000/01/rdf-schema#subClassOf">;
|
|
8
|
+
const subClassOf: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2000/01/rdf-schema#subClassOf">;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace sh {
|
|
11
|
-
const alternativePath: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/ns/shacl#alternativePath">;
|
|
12
|
-
const inversePath: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/ns/shacl#inversePath">;
|
|
13
|
-
const oneOrMorePath: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/ns/shacl#oneOrMorePath">;
|
|
14
|
-
const zeroOrMorePath: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/ns/shacl#zeroOrMorePath">;
|
|
15
|
-
const zeroOrOnePath: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/ns/shacl#zeroOrOnePath">;
|
|
11
|
+
const alternativePath: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#alternativePath">;
|
|
12
|
+
const inversePath: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#inversePath">;
|
|
13
|
+
const oneOrMorePath: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#oneOrMorePath">;
|
|
14
|
+
const zeroOrMorePath: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#zeroOrMorePath">;
|
|
15
|
+
const zeroOrOnePath: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#zeroOrOnePath">;
|
|
16
16
|
}
|
|
17
17
|
export declare namespace xsd {
|
|
18
|
-
const boolean: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#boolean">;
|
|
19
|
-
const byte: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#byte">;
|
|
20
|
-
const date: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#date">;
|
|
21
|
-
const dateTime: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#dateTime">;
|
|
22
|
-
const dateTimeStamp: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#dateTimeStamp">;
|
|
23
|
-
const decimal: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#decimal">;
|
|
24
|
-
const double: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#double">;
|
|
25
|
-
const float: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#float">;
|
|
26
|
-
const int: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#int">;
|
|
27
|
-
const integer: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#integer">;
|
|
28
|
-
const long: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#long">;
|
|
29
|
-
const short: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#short">;
|
|
30
|
-
const string: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#string">;
|
|
31
|
-
const unsignedByte: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedByte">;
|
|
32
|
-
const unsignedInt: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedInt">;
|
|
33
|
-
const unsignedLong: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedLong">;
|
|
34
|
-
const unsignedShort: import("@rdfx/data-factory/dist/NamedNode").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedShort">;
|
|
18
|
+
const boolean: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#boolean">;
|
|
19
|
+
const byte: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#byte">;
|
|
20
|
+
const date: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#date">;
|
|
21
|
+
const dateTime: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#dateTime">;
|
|
22
|
+
const dateTimeStamp: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#dateTimeStamp">;
|
|
23
|
+
const decimal: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#decimal">;
|
|
24
|
+
const double: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#double">;
|
|
25
|
+
const float: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#float">;
|
|
26
|
+
const int: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#int">;
|
|
27
|
+
const integer: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#integer">;
|
|
28
|
+
const long: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#long">;
|
|
29
|
+
const short: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#short">;
|
|
30
|
+
const string: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#string">;
|
|
31
|
+
const unsignedByte: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedByte">;
|
|
32
|
+
const unsignedInt: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedInt">;
|
|
33
|
+
const unsignedLong: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedLong">;
|
|
34
|
+
const unsignedShort: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedShort">;
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=vocabularies.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@rdfx/literal": "0.0.
|
|
4
|
-
"@rdfx/string": "0.0.
|
|
3
|
+
"@rdfx/literal": "0.0.19",
|
|
4
|
+
"@rdfx/string": "0.0.19",
|
|
5
5
|
"@rdfjs/term-set": "~2.0.3",
|
|
6
6
|
"@rdfjs/types": "~2.0.1",
|
|
7
7
|
"@types/rdfjs__term-set": "~2.0.9",
|
|
8
8
|
"purify-ts": "~2.1.4"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@rdfx/data-factory": "0.0.
|
|
11
|
+
"@rdfx/data-factory": "0.0.19",
|
|
12
12
|
"@rdfjs/dataset": "~2.0.2",
|
|
13
13
|
"@tpluscode/rdf-ns-builders": "~4.3.0",
|
|
14
14
|
"@types/rdfjs__dataset": "~2.0.7",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
},
|
|
41
41
|
"type": "module",
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
|
-
"version": "0.0.
|
|
43
|
+
"version": "0.0.19"
|
|
44
44
|
}
|