@ldo/rdf-utils 1.0.0-alpha.3 → 1.0.0-alpha.34
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/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/datasetChanges.cjs +25 -0
- package/dist/datasetChanges.d.cts +22 -0
- package/dist/datasetChanges.d.cts.map +1 -0
- package/dist/datasetChanges.d.ts +21 -5
- package/dist/datasetChanges.d.ts.map +1 -0
- package/dist/datasetChanges.js +23 -23
- package/dist/datasetChanges.js.map +1 -1
- package/dist/datasetConverters.cjs +17 -0
- package/dist/datasetConverters.d.cts +13 -0
- package/dist/datasetConverters.d.cts.map +1 -0
- package/dist/datasetConverters.d.ts +13 -6
- package/dist/datasetConverters.d.ts.map +1 -0
- package/dist/datasetConverters.js +11 -13
- package/dist/datasetConverters.js.map +1 -1
- package/dist/index.cjs +34 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +7 -21
- package/dist/nodeSerialization.cjs +186 -0
- package/dist/nodeSerialization.d.cts +145 -0
- package/dist/nodeSerialization.d.cts.map +1 -0
- package/dist/nodeSerialization.d.ts +144 -37
- package/dist/nodeSerialization.d.ts.map +1 -0
- package/dist/nodeSerialization.js +136 -83
- package/dist/nodeSerialization.js.map +1 -1
- package/dist/rdfjsDataModel.cjs +19 -0
- package/dist/rdfjsDataModel.d.cts +13 -0
- package/dist/rdfjsDataModel.d.cts.map +1 -0
- package/dist/rdfjsDataModel.d.ts +13 -0
- package/dist/rdfjsDataModel.d.ts.map +1 -0
- package/dist/rdfjsDataModel.js +15 -0
- package/dist/rdfjsDataModel.js.map +1 -0
- package/dist/serializedToQuads.cjs +12 -0
- package/dist/serializedToQuads.d.cts +11 -0
- package/dist/serializedToQuads.d.cts.map +1 -0
- package/dist/serializedToQuads.d.ts +11 -4
- package/dist/serializedToQuads.d.ts.map +1 -0
- package/dist/serializedToQuads.js +9 -10
- package/dist/serializedToQuads.js.map +1 -1
- package/package.json +29 -12
- package/src/datasetChanges.ts +1 -1
- package/src/index.ts +1 -0
- package/src/rdfjsDataModel.ts +27 -0
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as rdf_js0 from "rdf-js";
|
|
2
|
+
import { BlankNode, DefaultGraph, Literal, NamedNode, Quad, Term } from "@rdfjs/types";
|
|
3
|
+
|
|
4
|
+
//#region src/nodeSerialization.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* =============================================================================
|
|
8
|
+
* Types
|
|
9
|
+
* =============================================================================
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Generic type to extract a set of termsTypes for a Term
|
|
13
|
+
*/
|
|
14
|
+
type NodeTermTypes<Node extends Term> = Set<Node["termType"]>;
|
|
15
|
+
type SubjectNode = NamedNode | BlankNode;
|
|
16
|
+
declare const SubjectTermTypes: NodeTermTypes<SubjectNode>;
|
|
17
|
+
type PredicateNode = NamedNode;
|
|
18
|
+
declare const PredicateTermTypes: NodeTermTypes<PredicateNode>;
|
|
19
|
+
type ObjectNode = NamedNode | BlankNode | Literal;
|
|
20
|
+
declare const ObjectTermTypes: NodeTermTypes<ObjectNode>;
|
|
21
|
+
type GraphNode = NamedNode | BlankNode | DefaultGraph;
|
|
22
|
+
declare const GraphTermTypes: NodeTermTypes<GraphNode>;
|
|
23
|
+
type AnyNode = SubjectNode | PredicateNode | ObjectNode | GraphNode;
|
|
24
|
+
declare const AnyTermTypes: NodeTermTypes<AnyNode>;
|
|
25
|
+
interface SimpleQuad extends Quad {
|
|
26
|
+
/**
|
|
27
|
+
* The subject.
|
|
28
|
+
* @see GraphNode
|
|
29
|
+
*/
|
|
30
|
+
subject: SubjectNode;
|
|
31
|
+
/**
|
|
32
|
+
* The predicate.
|
|
33
|
+
* @see GraphNode
|
|
34
|
+
*/
|
|
35
|
+
predicate: PredicateNode;
|
|
36
|
+
/**
|
|
37
|
+
* The object.
|
|
38
|
+
* @see GraphNode
|
|
39
|
+
*/
|
|
40
|
+
object: ObjectNode;
|
|
41
|
+
/**
|
|
42
|
+
* The named graph.
|
|
43
|
+
* @see GraphNode
|
|
44
|
+
*/
|
|
45
|
+
graph: GraphNode;
|
|
46
|
+
}
|
|
47
|
+
type QuadMatch = [SubjectNode | undefined | null, PredicateNode | undefined | null, ObjectNode | undefined | null, GraphNode | undefined | null];
|
|
48
|
+
/**
|
|
49
|
+
* =============================================================================
|
|
50
|
+
* To String
|
|
51
|
+
* =============================================================================
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Converts a Subject Node to a String
|
|
55
|
+
* @param node Input Node
|
|
56
|
+
* @returns String Representation
|
|
57
|
+
*/
|
|
58
|
+
declare function subjectNodeToString(node: SubjectNode): string;
|
|
59
|
+
/**
|
|
60
|
+
* Converts a Predicate Node to a String
|
|
61
|
+
* @param node Input Node
|
|
62
|
+
* @returns String Representation
|
|
63
|
+
*/
|
|
64
|
+
declare function predicateNodeToString(node: PredicateNode): string;
|
|
65
|
+
/**
|
|
66
|
+
* Converts a Object Node to a String
|
|
67
|
+
* @param node Input Node
|
|
68
|
+
* @returns String Representation
|
|
69
|
+
*/
|
|
70
|
+
declare function objectNodeToString(node: ObjectNode): string;
|
|
71
|
+
/**
|
|
72
|
+
* Converts a Graph Node to a String
|
|
73
|
+
* @param node Input Node
|
|
74
|
+
* @returns String Representation
|
|
75
|
+
*/
|
|
76
|
+
declare function grpahNodeToString(node: GraphNode): string;
|
|
77
|
+
/**
|
|
78
|
+
* Converts a Any Node to a String
|
|
79
|
+
* @param node Input Node
|
|
80
|
+
* @returns String Representation
|
|
81
|
+
*/
|
|
82
|
+
declare function nodeToString(node: AnyNode): string;
|
|
83
|
+
/**
|
|
84
|
+
* Converts a Quad to a String
|
|
85
|
+
* @param node Input Quad
|
|
86
|
+
* @returns String Representation
|
|
87
|
+
*/
|
|
88
|
+
declare function quadToString(quad: Quad): string;
|
|
89
|
+
/**
|
|
90
|
+
* Converts a Quad Match to a String
|
|
91
|
+
* @param node Input Quad
|
|
92
|
+
* @returns String Representation
|
|
93
|
+
*/
|
|
94
|
+
declare function quadMatchToString(quadMatch: QuadMatch): string;
|
|
95
|
+
/**
|
|
96
|
+
* =============================================================================
|
|
97
|
+
* From String
|
|
98
|
+
* =============================================================================
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* Converts a String to a Subject Node
|
|
102
|
+
* @param input String Inupt
|
|
103
|
+
* @returns Node
|
|
104
|
+
*/
|
|
105
|
+
declare function stringToSubjectNode(input: string): SubjectNode;
|
|
106
|
+
/**
|
|
107
|
+
* Converts a String to a Predicate Node
|
|
108
|
+
* @param input String Inupt
|
|
109
|
+
* @returns Node
|
|
110
|
+
*/
|
|
111
|
+
declare function stringToPredicateNode(input: string): PredicateNode;
|
|
112
|
+
/**
|
|
113
|
+
* Converts a String to an Object Node
|
|
114
|
+
* @param input String Inupt
|
|
115
|
+
* @returns Node
|
|
116
|
+
*/
|
|
117
|
+
declare function stringToObjectNode(input: string): ObjectNode;
|
|
118
|
+
/**
|
|
119
|
+
* Converts a String to a Graph Node
|
|
120
|
+
* @param input String Inupt
|
|
121
|
+
* @returns Node
|
|
122
|
+
*/
|
|
123
|
+
declare function stringToGraphNode(input: string): GraphNode;
|
|
124
|
+
/**
|
|
125
|
+
* Converts a String to a Node
|
|
126
|
+
* @param input String Inupt
|
|
127
|
+
* @returns Node
|
|
128
|
+
*/
|
|
129
|
+
declare function stringToNode(input: string, expectTermType?: NodeTermTypes<Term>): AnyNode;
|
|
130
|
+
/**
|
|
131
|
+
* Converts a String to a Quad
|
|
132
|
+
* @param input String Inupt
|
|
133
|
+
* @returns Quad
|
|
134
|
+
*/
|
|
135
|
+
declare function stringToQuad(input: string): rdf_js0.Quad;
|
|
136
|
+
/**
|
|
137
|
+
* Converts a String to a Quad Match
|
|
138
|
+
* @param input String Inupt
|
|
139
|
+
* @returns QuadMatch
|
|
140
|
+
*/
|
|
141
|
+
declare function stringToQuadMatch(input: string): QuadMatch;
|
|
142
|
+
//# sourceMappingURL=nodeSerialization.d.ts.map
|
|
143
|
+
//#endregion
|
|
144
|
+
export { AnyNode, AnyTermTypes, GraphNode, GraphTermTypes, NodeTermTypes, ObjectNode, ObjectTermTypes, PredicateNode, PredicateTermTypes, QuadMatch, SimpleQuad, SubjectNode, SubjectTermTypes, grpahNodeToString, nodeToString, objectNodeToString, predicateNodeToString, quadMatchToString, quadToString, stringToGraphNode, stringToNode, stringToObjectNode, stringToPredicateNode, stringToQuad, stringToQuadMatch, stringToSubjectNode, subjectNodeToString };
|
|
145
|
+
//# sourceMappingURL=nodeSerialization.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeSerialization.d.cts","names":[],"sources":["../../src/nodeSerialization.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAwBA;;;;;AAAkD,KAAtC,aAAsC,CAAA,aAAX,IAAW,CAAA,GAAH,GAAG,CAAC,IAAD,CAAA,UAAA,CAAA,CAAA;AAEtC,KAAA,WAAA,GAAc,SAAH,GAAe,SAAf;AAAA,cACV,gBADU,EACQ,aADR,CACsB,WADtB,CAAA;AAAG,KAKd,aAAA,GAAgB,SALF;AAAY,cAMzB,kBANyB,EAML,aANK,CAMS,aANT,CAAA;AAAS,KASnC,UAAA,GAAa,SATsB,GASV,SATU,GASE,OATF;AAClC,cASA,eANX,EAM4B,aAN5B,CAM0C,UAN1C,CAAA;AAAA,KAWU,SAAA,GAAY,SAXtB,GAWkC,SAXlC,GAW8C,YAX9C;AAH2C,cAehC,cAfgC,EAehB,aAfgB,CAeF,SAfE,CAAA;AAAd,KAoBnB,OAAA,GAAU,WApBS,GAoBK,aApBL,GAoBqB,UApBrB,GAoBkC,SApBlC;AAAa,cAqB/B,YArB+B,EAqBjB,aArBiB,CAqBH,OArBG,CAAA;AAIhC,UAwBK,UAAA,SAAmB,IAxBC,CAAA;EACxB;;;;EAAiC,OAAA,EA4Bn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
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as rdf_js0 from "rdf-js";
|
|
2
|
+
import { BlankNode, DefaultGraph, Literal, NamedNode, Quad, Term } from "@rdfjs/types";
|
|
3
|
+
|
|
4
|
+
//#region src/nodeSerialization.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* =============================================================================
|
|
8
|
+
* Types
|
|
9
|
+
* =============================================================================
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Generic type to extract a set of termsTypes for a Term
|
|
13
|
+
*/
|
|
14
|
+
type NodeTermTypes<Node extends Term> = Set<Node["termType"]>;
|
|
15
|
+
type SubjectNode = NamedNode | BlankNode;
|
|
16
|
+
declare const SubjectTermTypes: NodeTermTypes<SubjectNode>;
|
|
17
|
+
type PredicateNode = NamedNode;
|
|
18
|
+
declare const PredicateTermTypes: NodeTermTypes<PredicateNode>;
|
|
19
|
+
type ObjectNode = NamedNode | BlankNode | Literal;
|
|
20
|
+
declare const ObjectTermTypes: NodeTermTypes<ObjectNode>;
|
|
21
|
+
type GraphNode = NamedNode | BlankNode | DefaultGraph;
|
|
22
|
+
declare const GraphTermTypes: NodeTermTypes<GraphNode>;
|
|
23
|
+
type AnyNode = SubjectNode | PredicateNode | ObjectNode | GraphNode;
|
|
24
|
+
declare const AnyTermTypes: NodeTermTypes<AnyNode>;
|
|
25
|
+
interface SimpleQuad extends Quad {
|
|
26
|
+
/**
|
|
27
|
+
* The subject.
|
|
28
|
+
* @see GraphNode
|
|
29
|
+
*/
|
|
30
|
+
subject: SubjectNode;
|
|
31
|
+
/**
|
|
32
|
+
* The predicate.
|
|
33
|
+
* @see GraphNode
|
|
34
|
+
*/
|
|
35
|
+
predicate: PredicateNode;
|
|
36
|
+
/**
|
|
37
|
+
* The object.
|
|
38
|
+
* @see GraphNode
|
|
39
|
+
*/
|
|
40
|
+
object: ObjectNode;
|
|
41
|
+
/**
|
|
42
|
+
* The named graph.
|
|
43
|
+
* @see GraphNode
|
|
44
|
+
*/
|
|
45
|
+
graph: GraphNode;
|
|
18
46
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
type QuadMatch = [SubjectNode | undefined | null, PredicateNode | undefined | null, ObjectNode | undefined | null, GraphNode | undefined | null];
|
|
48
|
+
/**
|
|
49
|
+
* =============================================================================
|
|
50
|
+
* To String
|
|
51
|
+
* =============================================================================
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Converts a Subject Node to a String
|
|
55
|
+
* @param node Input Node
|
|
56
|
+
* @returns String Representation
|
|
57
|
+
*/
|
|
58
|
+
declare function subjectNodeToString(node: SubjectNode): string;
|
|
59
|
+
/**
|
|
60
|
+
* Converts a Predicate Node to a String
|
|
61
|
+
* @param node Input Node
|
|
62
|
+
* @returns String Representation
|
|
63
|
+
*/
|
|
64
|
+
declare function predicateNodeToString(node: PredicateNode): string;
|
|
65
|
+
/**
|
|
66
|
+
* Converts a Object Node to a String
|
|
67
|
+
* @param node Input Node
|
|
68
|
+
* @returns String Representation
|
|
69
|
+
*/
|
|
70
|
+
declare function objectNodeToString(node: ObjectNode): string;
|
|
71
|
+
/**
|
|
72
|
+
* Converts a Graph Node to a String
|
|
73
|
+
* @param node Input Node
|
|
74
|
+
* @returns String Representation
|
|
75
|
+
*/
|
|
76
|
+
declare function grpahNodeToString(node: GraphNode): string;
|
|
77
|
+
/**
|
|
78
|
+
* Converts a Any Node to a String
|
|
79
|
+
* @param node Input Node
|
|
80
|
+
* @returns String Representation
|
|
81
|
+
*/
|
|
82
|
+
declare function nodeToString(node: AnyNode): string;
|
|
83
|
+
/**
|
|
84
|
+
* Converts a Quad to a String
|
|
85
|
+
* @param node Input Quad
|
|
86
|
+
* @returns String Representation
|
|
87
|
+
*/
|
|
88
|
+
declare function quadToString(quad: Quad): string;
|
|
89
|
+
/**
|
|
90
|
+
* Converts a Quad Match to a String
|
|
91
|
+
* @param node Input Quad
|
|
92
|
+
* @returns String Representation
|
|
93
|
+
*/
|
|
94
|
+
declare function quadMatchToString(quadMatch: QuadMatch): string;
|
|
95
|
+
/**
|
|
96
|
+
* =============================================================================
|
|
97
|
+
* From String
|
|
98
|
+
* =============================================================================
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* Converts a String to a Subject Node
|
|
102
|
+
* @param input String Inupt
|
|
103
|
+
* @returns Node
|
|
104
|
+
*/
|
|
105
|
+
declare function stringToSubjectNode(input: string): SubjectNode;
|
|
106
|
+
/**
|
|
107
|
+
* Converts a String to a Predicate Node
|
|
108
|
+
* @param input String Inupt
|
|
109
|
+
* @returns Node
|
|
110
|
+
*/
|
|
111
|
+
declare function stringToPredicateNode(input: string): PredicateNode;
|
|
112
|
+
/**
|
|
113
|
+
* Converts a String to an Object Node
|
|
114
|
+
* @param input String Inupt
|
|
115
|
+
* @returns Node
|
|
116
|
+
*/
|
|
117
|
+
declare function stringToObjectNode(input: string): ObjectNode;
|
|
118
|
+
/**
|
|
119
|
+
* Converts a String to a Graph Node
|
|
120
|
+
* @param input String Inupt
|
|
121
|
+
* @returns Node
|
|
122
|
+
*/
|
|
123
|
+
declare function stringToGraphNode(input: string): GraphNode;
|
|
124
|
+
/**
|
|
125
|
+
* Converts a String to a Node
|
|
126
|
+
* @param input String Inupt
|
|
127
|
+
* @returns Node
|
|
128
|
+
*/
|
|
129
|
+
declare function stringToNode(input: string, expectTermType?: NodeTermTypes<Term>): AnyNode;
|
|
130
|
+
/**
|
|
131
|
+
* Converts a String to a Quad
|
|
132
|
+
* @param input String Inupt
|
|
133
|
+
* @returns Quad
|
|
134
|
+
*/
|
|
135
|
+
declare function stringToQuad(input: string): rdf_js0.Quad;
|
|
136
|
+
/**
|
|
137
|
+
* Converts a String to a Quad Match
|
|
138
|
+
* @param input String Inupt
|
|
139
|
+
* @returns QuadMatch
|
|
140
|
+
*/
|
|
141
|
+
declare function stringToQuadMatch(input: string): QuadMatch;
|
|
142
|
+
//# sourceMappingURL=nodeSerialization.d.ts.map
|
|
143
|
+
//#endregion
|
|
144
|
+
export { AnyNode, AnyTermTypes as AnyTermTypes$1, GraphNode, GraphTermTypes as GraphTermTypes$1, NodeTermTypes, ObjectNode, ObjectTermTypes as ObjectTermTypes$1, PredicateNode, PredicateTermTypes as PredicateTermTypes$1, QuadMatch, SimpleQuad, SubjectNode, SubjectTermTypes as SubjectTermTypes$1, grpahNodeToString as grpahNodeToString$1, nodeToString as nodeToString$1, objectNodeToString as objectNodeToString$1, predicateNodeToString as predicateNodeToString$1, quadMatchToString as quadMatchToString$1, quadToString as quadToString$1, stringToGraphNode as stringToGraphNode$1, stringToNode as stringToNode$1, stringToObjectNode as stringToObjectNode$1, stringToPredicateNode as stringToPredicateNode$1, stringToQuad as stringToQuad$1, stringToQuadMatch as stringToQuadMatch$1, stringToSubjectNode as stringToSubjectNode$1, subjectNodeToString as subjectNodeToString$1 };
|
|
145
|
+
//# sourceMappingURL=nodeSerialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeSerialization.d.ts","names":[],"sources":["../../src/nodeSerialization.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAwBA;;;;;AAAkD,KAAtC,aAAsC,CAAA,aAAX,IAAW,CAAA,GAAH,GAAG,CAAC,IAAD,CAAA,UAAA,CAAA,CAAA;AAEtC,KAAA,WAAA,GAAc,SAAH,GAAe,SAAf;AAAA,cACV,gBADU,EACQ,aADR,CACsB,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iBAtCA,YAAA,CAsCoC,IAAA,EAtCjB,OAsC4B,CAAA,EAAA,MAAA;AAS/D;AASA;AASA;AASA;;AAEiC,iBAnEjB,YAAA,CAmEiB,IAAA,EAnEE,IAmEF,CAAA,EAAA,MAAA;;;AACvB;AAmBV;AAaA;iBA3FgB,iBAAA,YAA6B;;;;;;;;;;;iBAoB7B,mBAAA,iBAAoC;;;;;;iBASpC,qBAAA,iBAAsC;;;;;;iBAStC,kBAAA,iBAAmC;;;;;;iBASnC,iBAAA,iBAAkC;;;;;;iBASlC,YAAA,iCAEG,cAAc,QAC9B;;;;;;iBAmBa,YAAA,iBAAY,OAAA,CAAc;;;;;;iBAa1B,iBAAA,iBAAkC"}
|
|
@@ -1,115 +1,168 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { quadToStringQuad, stringQuadToQuad, stringToTerm, termToString } from "rdf-string";
|
|
2
|
+
|
|
3
|
+
//#region src/nodeSerialization.ts
|
|
4
|
+
const SubjectTermTypes = new Set(["NamedNode", "BlankNode"]);
|
|
5
|
+
const PredicateTermTypes = new Set(["NamedNode"]);
|
|
6
|
+
const ObjectTermTypes = new Set([
|
|
7
|
+
"NamedNode",
|
|
8
|
+
"BlankNode",
|
|
9
|
+
"Literal"
|
|
8
10
|
]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
const GraphTermTypes = new Set([
|
|
12
|
+
"NamedNode",
|
|
13
|
+
"BlankNode",
|
|
14
|
+
"DefaultGraph"
|
|
11
15
|
]);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.GraphTermTypes = new Set([
|
|
18
|
-
"NamedNode",
|
|
19
|
-
"BlankNode",
|
|
20
|
-
"DefaultGraph",
|
|
21
|
-
]);
|
|
22
|
-
exports.AnyTermTypes = new Set([
|
|
23
|
-
"NamedNode",
|
|
24
|
-
"BlankNode",
|
|
25
|
-
"DefaultGraph",
|
|
26
|
-
"Literal",
|
|
16
|
+
const AnyTermTypes = new Set([
|
|
17
|
+
"NamedNode",
|
|
18
|
+
"BlankNode",
|
|
19
|
+
"DefaultGraph",
|
|
20
|
+
"Literal"
|
|
27
21
|
]);
|
|
22
|
+
/**
|
|
23
|
+
* =============================================================================
|
|
24
|
+
* To String
|
|
25
|
+
* =============================================================================
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Converts a Subject Node to a String
|
|
29
|
+
* @param node Input Node
|
|
30
|
+
* @returns String Representation
|
|
31
|
+
*/
|
|
28
32
|
function subjectNodeToString(node) {
|
|
29
|
-
|
|
33
|
+
return nodeToString(node);
|
|
30
34
|
}
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Converts a Predicate Node to a String
|
|
37
|
+
* @param node Input Node
|
|
38
|
+
* @returns String Representation
|
|
39
|
+
*/
|
|
32
40
|
function predicateNodeToString(node) {
|
|
33
|
-
|
|
41
|
+
return nodeToString(node);
|
|
34
42
|
}
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Converts a Object Node to a String
|
|
45
|
+
* @param node Input Node
|
|
46
|
+
* @returns String Representation
|
|
47
|
+
*/
|
|
36
48
|
function objectNodeToString(node) {
|
|
37
|
-
|
|
49
|
+
return nodeToString(node);
|
|
38
50
|
}
|
|
39
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Converts a Graph Node to a String
|
|
53
|
+
* @param node Input Node
|
|
54
|
+
* @returns String Representation
|
|
55
|
+
*/
|
|
40
56
|
function grpahNodeToString(node) {
|
|
41
|
-
|
|
57
|
+
return nodeToString(node);
|
|
42
58
|
}
|
|
43
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Converts a Any Node to a String
|
|
61
|
+
* @param node Input Node
|
|
62
|
+
* @returns String Representation
|
|
63
|
+
*/
|
|
44
64
|
function nodeToString(node) {
|
|
45
|
-
|
|
65
|
+
return termToString(node);
|
|
46
66
|
}
|
|
47
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Converts a Quad to a String
|
|
69
|
+
* @param node Input Quad
|
|
70
|
+
* @returns String Representation
|
|
71
|
+
*/
|
|
48
72
|
function quadToString(quad) {
|
|
49
|
-
|
|
73
|
+
return JSON.stringify(quadToStringQuad(quad));
|
|
50
74
|
}
|
|
51
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Converts a Quad Match to a String
|
|
77
|
+
* @param node Input Quad
|
|
78
|
+
* @returns String Representation
|
|
79
|
+
*/
|
|
52
80
|
function quadMatchToString(quadMatch) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
81
|
+
return JSON.stringify({
|
|
82
|
+
subject: quadMatch[0] ? subjectNodeToString(quadMatch[0]) : void 0,
|
|
83
|
+
predicate: quadMatch[1] ? predicateNodeToString(quadMatch[1]) : void 0,
|
|
84
|
+
object: quadMatch[2] ? objectNodeToString(quadMatch[2]) : void 0,
|
|
85
|
+
graph: quadMatch[3] ? grpahNodeToString(quadMatch[3]) : void 0
|
|
86
|
+
});
|
|
59
87
|
}
|
|
60
|
-
|
|
88
|
+
/**
|
|
89
|
+
* =============================================================================
|
|
90
|
+
* From String
|
|
91
|
+
* =============================================================================
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* Converts a String to a Subject Node
|
|
95
|
+
* @param input String Inupt
|
|
96
|
+
* @returns Node
|
|
97
|
+
*/
|
|
61
98
|
function stringToSubjectNode(input) {
|
|
62
|
-
|
|
99
|
+
return stringToNode(input, SubjectTermTypes);
|
|
63
100
|
}
|
|
64
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Converts a String to a Predicate Node
|
|
103
|
+
* @param input String Inupt
|
|
104
|
+
* @returns Node
|
|
105
|
+
*/
|
|
65
106
|
function stringToPredicateNode(input) {
|
|
66
|
-
|
|
107
|
+
return stringToNode(input, PredicateTermTypes);
|
|
67
108
|
}
|
|
68
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Converts a String to an Object Node
|
|
111
|
+
* @param input String Inupt
|
|
112
|
+
* @returns Node
|
|
113
|
+
*/
|
|
69
114
|
function stringToObjectNode(input) {
|
|
70
|
-
|
|
115
|
+
return stringToNode(input, ObjectTermTypes);
|
|
71
116
|
}
|
|
72
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Converts a String to a Graph Node
|
|
119
|
+
* @param input String Inupt
|
|
120
|
+
* @returns Node
|
|
121
|
+
*/
|
|
73
122
|
function stringToGraphNode(input) {
|
|
74
|
-
|
|
123
|
+
return stringToNode(input, GraphTermTypes);
|
|
75
124
|
}
|
|
76
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Converts a String to a Node
|
|
127
|
+
* @param input String Inupt
|
|
128
|
+
* @returns Node
|
|
129
|
+
*/
|
|
77
130
|
function stringToNode(input, expectTermType) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
return node;
|
|
131
|
+
const node = stringToTerm(input);
|
|
132
|
+
if (expectTermType && !expectTermType.has(node.termType)) throw new Error(`Expected term to be one of term type: [${Array.from(expectTermType).reduce((agg, termType) => `${agg}${termType}, `, "")}], but got ${node.termType}.`);
|
|
133
|
+
return node;
|
|
83
134
|
}
|
|
84
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Converts a String to a Quad
|
|
137
|
+
* @param input String Inupt
|
|
138
|
+
* @returns Quad
|
|
139
|
+
*/
|
|
85
140
|
function stringToQuad(input) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
141
|
+
try {
|
|
142
|
+
return stringQuadToQuad(JSON.parse(input));
|
|
143
|
+
} catch (err) {
|
|
144
|
+
throw new Error("Invalid Quad String");
|
|
145
|
+
}
|
|
92
146
|
}
|
|
93
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Converts a String to a Quad Match
|
|
149
|
+
* @param input String Inupt
|
|
150
|
+
* @returns QuadMatch
|
|
151
|
+
*/
|
|
94
152
|
function stringToQuadMatch(input) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
: undefined,
|
|
107
|
-
jsonRep.graph != undefined ? stringToGraphNode(jsonRep.graph) : undefined,
|
|
108
|
-
];
|
|
109
|
-
}
|
|
110
|
-
catch (err) {
|
|
111
|
-
throw new Error("Invalid Quad Match String");
|
|
112
|
-
}
|
|
153
|
+
try {
|
|
154
|
+
const jsonRep = JSON.parse(input);
|
|
155
|
+
return [
|
|
156
|
+
jsonRep.subject != void 0 ? stringToSubjectNode(jsonRep.subject) : void 0,
|
|
157
|
+
jsonRep.predicate != void 0 ? stringToPredicateNode(jsonRep.predicate) : void 0,
|
|
158
|
+
jsonRep.object != void 0 ? stringToObjectNode(jsonRep.object) : void 0,
|
|
159
|
+
jsonRep.graph != void 0 ? stringToGraphNode(jsonRep.graph) : void 0
|
|
160
|
+
];
|
|
161
|
+
} catch (err) {
|
|
162
|
+
throw new Error("Invalid Quad Match String");
|
|
163
|
+
}
|
|
113
164
|
}
|
|
114
|
-
|
|
165
|
+
|
|
166
|
+
//#endregion
|
|
167
|
+
export { AnyTermTypes, GraphTermTypes, ObjectTermTypes, PredicateTermTypes, SubjectTermTypes, grpahNodeToString, nodeToString, objectNodeToString, predicateNodeToString, quadMatchToString, quadToString, stringToGraphNode, stringToNode, stringToObjectNode, stringToPredicateNode, stringToQuad, stringToQuadMatch, stringToSubjectNode, subjectNodeToString };
|
|
115
168
|
//# sourceMappingURL=nodeSerialization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeSerialization.js","
|
|
1
|
+
{"version":3,"file":"nodeSerialization.js","names":["SubjectTermTypes: NodeTermTypes<SubjectNode>","PredicateTermTypes: NodeTermTypes<PredicateNode>","ObjectTermTypes: NodeTermTypes<ObjectNode>","GraphTermTypes: NodeTermTypes<GraphNode>","AnyTermTypes: NodeTermTypes<AnyNode>","node: SubjectNode","node: PredicateNode","node: ObjectNode","node: GraphNode","node: AnyNode","quad: Quad","quadMatch: QuadMatch","input: string","expectTermType?: NodeTermTypes<Term>"],"sources":["../src/nodeSerialization.ts"],"sourcesContent":["import type {\n Quad,\n Term,\n BlankNode,\n DefaultGraph,\n Literal,\n NamedNode,\n} from \"@rdfjs/types\";\nimport {\n termToString,\n quadToStringQuad,\n stringToTerm,\n stringQuadToQuad,\n} from \"rdf-string\";\n\n/**\n * =============================================================================\n * Types\n * =============================================================================\n */\n\n/**\n * Generic type to extract a set of termsTypes for a Term\n */\nexport type NodeTermTypes<Node extends Term> = Set<Node[\"termType\"]>;\n\nexport type SubjectNode = NamedNode | BlankNode;\nexport const SubjectTermTypes: NodeTermTypes<SubjectNode> = new Set([\n \"NamedNode\",\n \"BlankNode\",\n]);\nexport type PredicateNode = NamedNode;\nexport const PredicateTermTypes: NodeTermTypes<PredicateNode> = new Set([\n \"NamedNode\",\n]);\nexport type ObjectNode = NamedNode | BlankNode | Literal;\nexport const ObjectTermTypes: NodeTermTypes<ObjectNode> = new Set([\n \"NamedNode\",\n \"BlankNode\",\n \"Literal\",\n]);\nexport type GraphNode = NamedNode | BlankNode | DefaultGraph;\nexport const GraphTermTypes: NodeTermTypes<GraphNode> = new Set([\n \"NamedNode\",\n \"BlankNode\",\n \"DefaultGraph\",\n]);\nexport type AnyNode = SubjectNode | PredicateNode | ObjectNode | GraphNode;\nexport const AnyTermTypes: NodeTermTypes<AnyNode> = new Set([\n \"NamedNode\",\n \"BlankNode\",\n \"DefaultGraph\",\n \"Literal\",\n]);\n\nexport interface SimpleQuad extends Quad {\n /**\n * The subject.\n * @see GraphNode\n */\n subject: SubjectNode;\n /**\n * The predicate.\n * @see GraphNode\n */\n predicate: PredicateNode;\n /**\n * The object.\n * @see GraphNode\n */\n object: ObjectNode;\n /**\n * The named graph.\n * @see GraphNode\n */\n graph: GraphNode;\n}\n\nexport type QuadMatch = [\n SubjectNode | undefined | null,\n PredicateNode | undefined | null,\n ObjectNode | undefined | null,\n GraphNode | undefined | null,\n];\n\n/**\n * =============================================================================\n * To String\n * =============================================================================\n */\n\n/**\n * Converts a Subject Node to a String\n * @param node Input Node\n * @returns String Representation\n */\nexport function subjectNodeToString(node: SubjectNode) {\n return nodeToString(node);\n}\n\n/**\n * Converts a Predicate Node to a String\n * @param node Input Node\n * @returns String Representation\n */\nexport function predicateNodeToString(node: PredicateNode) {\n return nodeToString(node);\n}\n\n/**\n * Converts a Object Node to a String\n * @param node Input Node\n * @returns String Representation\n */\nexport function objectNodeToString(node: ObjectNode) {\n return nodeToString(node);\n}\n\n/**\n * Converts a Graph Node to a String\n * @param node Input Node\n * @returns String Representation\n */\nexport function grpahNodeToString(node: GraphNode) {\n return nodeToString(node);\n}\n\n/**\n * Converts a Any Node to a String\n * @param node Input Node\n * @returns String Representation\n */\nexport function nodeToString(node: AnyNode): string {\n return termToString(node);\n}\n\n/**\n * Converts a Quad to a String\n * @param node Input Quad\n * @returns String Representation\n */\nexport function quadToString(quad: Quad): string {\n return JSON.stringify(quadToStringQuad(quad));\n}\n\n/**\n * Converts a Quad Match to a String\n * @param node Input Quad\n * @returns String Representation\n */\nexport function quadMatchToString(quadMatch: QuadMatch): string {\n return JSON.stringify({\n subject: quadMatch[0] ? subjectNodeToString(quadMatch[0]) : undefined,\n predicate: quadMatch[1] ? predicateNodeToString(quadMatch[1]) : undefined,\n object: quadMatch[2] ? objectNodeToString(quadMatch[2]) : undefined,\n graph: quadMatch[3] ? grpahNodeToString(quadMatch[3]) : undefined,\n });\n}\n\n/**\n * =============================================================================\n * From String\n * =============================================================================\n */\n\n/**\n * Converts a String to a Subject Node\n * @param input String Inupt\n * @returns Node\n */\nexport function stringToSubjectNode(input: string): SubjectNode {\n return stringToNode(input, SubjectTermTypes) as SubjectNode;\n}\n\n/**\n * Converts a String to a Predicate Node\n * @param input String Inupt\n * @returns Node\n */\nexport function stringToPredicateNode(input: string): PredicateNode {\n return stringToNode(input, PredicateTermTypes) as PredicateNode;\n}\n\n/**\n * Converts a String to an Object Node\n * @param input String Inupt\n * @returns Node\n */\nexport function stringToObjectNode(input: string): ObjectNode {\n return stringToNode(input, ObjectTermTypes) as ObjectNode;\n}\n\n/**\n * Converts a String to a Graph Node\n * @param input String Inupt\n * @returns Node\n */\nexport function stringToGraphNode(input: string): GraphNode {\n return stringToNode(input, GraphTermTypes) as GraphNode;\n}\n\n/**\n * Converts a String to a Node\n * @param input String Inupt\n * @returns Node\n */\nexport function stringToNode(\n input: string,\n expectTermType?: NodeTermTypes<Term>,\n): AnyNode {\n const node = stringToTerm(input);\n if (expectTermType && !expectTermType.has(node.termType)) {\n throw new Error(\n `Expected term to be one of term type: [${Array.from(\n expectTermType,\n ).reduce((agg, termType) => `${agg}${termType}, `, \"\")}], but got ${\n node.termType\n }.`,\n );\n }\n return node as AnyNode;\n}\n\n/**\n * Converts a String to a Quad\n * @param input String Inupt\n * @returns Quad\n */\nexport function stringToQuad(input: string) {\n try {\n return stringQuadToQuad(JSON.parse(input));\n } catch (err) {\n throw new Error(\"Invalid Quad String\");\n }\n}\n\n/**\n * Converts a String to a Quad Match\n * @param input String Inupt\n * @returns QuadMatch\n */\nexport function stringToQuadMatch(input: string): QuadMatch {\n try {\n const jsonRep = JSON.parse(input);\n return [\n jsonRep.subject != undefined\n ? stringToSubjectNode(jsonRep.subject)\n : undefined,\n jsonRep.predicate != undefined\n ? stringToPredicateNode(jsonRep.predicate)\n : undefined,\n jsonRep.object != undefined\n ? stringToObjectNode(jsonRep.object)\n : undefined,\n jsonRep.graph != undefined ? stringToGraphNode(jsonRep.graph) : undefined,\n ];\n } catch (err) {\n throw new Error(\"Invalid Quad Match String\");\n }\n}\n"],"mappings":";;;AA2BA,MAAaA,mBAA+C,IAAI,IAAI,CAClE,aACA,WACD;AAED,MAAaC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CACT,MAAM,OAAO,aAAa,MAAM;AAChC,KAAI,mBAAmB,eAAe,IAAI,KAAK,SAAS,CACtD,OAAM,IAAI,OACP,yCAAyC,MAAM,KAC9C,eACD,CAAC,OAAO,CAAC,KAAK,cAAc,EAAE,IAAI,EAAE,SAAS,KAAK,GAAG,CAAC,aACrD,KAAK,SACN;AAGL,QAAO;AACR;;;;;;AAOD,SAAgB,aAAaD,OAAe;AAC1C,KAAI;AACF,SAAO,iBAAiB,KAAK,MAAM,MAAM,CAAC;CAC3C,SAAQ,KAAK;AACZ,QAAM,IAAI,MAAM;CACjB;AACF;;;;;;AAOD,SAAgB,kBAAkBA,OAA0B;AAC1D,KAAI;EACF,MAAM,UAAU,KAAK,MAAM,MAAM;AACjC,SAAO;GACL,QAAQ,oBACJ,oBAAoB,QAAQ,QAAQ;GAExC,QAAQ,sBACJ,sBAAsB,QAAQ,UAAU;GAE5C,QAAQ,mBACJ,mBAAmB,QAAQ,OAAO;GAEtC,QAAQ,kBAAqB,kBAAkB,QAAQ,MAAM;EAC9D;CACF,SAAQ,KAAK;AACZ,QAAM,IAAI,MAAM;CACjB;AACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const __rdfjs_data_model = require_rolldown_runtime.__toESM(require("@rdfjs/data-model"));
|
|
3
|
+
|
|
4
|
+
//#region src/rdfjsDataModel.ts
|
|
5
|
+
let RdfDataModelResolved;
|
|
6
|
+
if (__rdfjs_data_model.default && typeof __rdfjs_data_model.default.namedNode === "function") RdfDataModelResolved = __rdfjs_data_model.default;
|
|
7
|
+
else RdfDataModelResolved = __rdfjs_data_model;
|
|
8
|
+
const quad = RdfDataModelResolved.quad;
|
|
9
|
+
const namedNode = RdfDataModelResolved.namedNode;
|
|
10
|
+
const blankNode = RdfDataModelResolved.blankNode;
|
|
11
|
+
const literal = RdfDataModelResolved.literal;
|
|
12
|
+
const defaultGraph = RdfDataModelResolved.defaultGraph;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.blankNode = blankNode;
|
|
16
|
+
exports.defaultGraph = defaultGraph;
|
|
17
|
+
exports.literal = literal;
|
|
18
|
+
exports.namedNode = namedNode;
|
|
19
|
+
exports.quad = quad;
|