@comunica/actor-rdf-update-hypermedia-put-ldp 1.22.2 → 2.0.1-alpha.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +2 -2
- package/README.md +8 -14
- package/components/ActorRdfUpdateHypermediaPutLdp.jsonld +184 -0
- package/components/QuadDestinationPutLdp.jsonld +83 -0
- package/components/components.jsonld +6 -3
- package/components/context.jsonld +77 -6
- package/lib/ActorRdfUpdateHypermediaPutLdp.d.ts +20 -12
- package/lib/QuadDestinationPutLdp.d.ts +5 -7
- package/lib/QuadDestinationPutLdp.js +3 -2
- package/lib/index.d.ts +2 -0
- package/{index.js → lib/index.js} +2 -2
- package/package.json +15 -42
- package/components/Actor/RdfUpdateHypermedia/PutLdp.jsonld +0 -56
- package/index.d.ts +0 -2
package/LICENSE.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright © 2017–
|
|
4
|
-
Ghent University – imec, Belgium
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -26,22 +26,16 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
26
26
|
{
|
|
27
27
|
"@context": [
|
|
28
28
|
...
|
|
29
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^
|
|
29
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^2.0.0/components/context.jsonld"
|
|
30
30
|
],
|
|
31
31
|
"actors": [
|
|
32
32
|
...
|
|
33
33
|
{
|
|
34
|
-
"@id": "
|
|
34
|
+
"@id": "urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",
|
|
35
35
|
"@type": "ActorRdfUpdateHypermediaPutLdp",
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
"caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerializeMediatypes": {
|
|
40
|
-
"@id": "config-sets:sparql-serializers.json#mediatorRdfSerializeMediatypes"
|
|
41
|
-
},
|
|
42
|
-
"caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerialize": {
|
|
43
|
-
"@id": "config-sets:sparql-serializers.json#mediatorRdfSerialize"
|
|
44
|
-
}
|
|
36
|
+
"mediatorHttp": { "@id": "urn:comunica:default:http/mediators#main" },
|
|
37
|
+
"mediatorRdfSerializeMediatypes": { "@id": "urn:comunica:default:query-result-serialize/mediators#mainMediatypes" },
|
|
38
|
+
"mediatorRdfSerialize": { "@id": "urn:comunica:default:query-result-serialize/mediators#main" }
|
|
45
39
|
}
|
|
46
40
|
]
|
|
47
41
|
}
|
|
@@ -49,6 +43,6 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
49
43
|
|
|
50
44
|
### Config Parameters
|
|
51
45
|
|
|
52
|
-
* `
|
|
53
|
-
* `
|
|
54
|
-
* `
|
|
46
|
+
* `mediatorHttp`: A mediator over the [HTTP bus](https://github.com/comunica/comunica/tree/master/packages/bus-http).
|
|
47
|
+
* `mediatorRdfSerializeMediatypes`: A mediator over the [RDF serialize bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-serialize) for obtaining all media types.
|
|
48
|
+
* `mediatorRdfSerialize`: A mediator over the [RDF serialize bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-serialize).
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^2.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^2.0.0/components/context.jsonld"
|
|
6
|
+
],
|
|
7
|
+
"@id": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorRdfUpdateHypermediaPutLdp",
|
|
13
|
+
"extends": [
|
|
14
|
+
"cbruh:components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia"
|
|
15
|
+
],
|
|
16
|
+
"comment": "A comunica Post LDP RDF Update Hypermedia Actor.",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorHttp",
|
|
20
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
21
|
+
"comment": "The HTTP mediator"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerializeMediatypes",
|
|
25
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
26
|
+
"comment": "The RDF Serialize mediator for collecting media types"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerialize",
|
|
30
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
31
|
+
"comment": "The RDF Serialize mediator for handling serialization"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_name",
|
|
35
|
+
"range": "xsd:string",
|
|
36
|
+
"default": {
|
|
37
|
+
"@id": "rdf:subject"
|
|
38
|
+
},
|
|
39
|
+
"comment": "The name for this actor."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_bus",
|
|
43
|
+
"range": {
|
|
44
|
+
"@type": "ParameterRangeGenericComponent",
|
|
45
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
46
|
+
"genericTypeInstances": [
|
|
47
|
+
{
|
|
48
|
+
"@type": "ParameterRangeGenericComponent",
|
|
49
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
50
|
+
"genericTypeInstances": [
|
|
51
|
+
{
|
|
52
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
53
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
57
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
67
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
71
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"default": {
|
|
80
|
+
"@id": "cbruh:components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus",
|
|
81
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
82
|
+
},
|
|
83
|
+
"comment": "The bus this actor subscribes to."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_beforeActors",
|
|
87
|
+
"range": {
|
|
88
|
+
"@type": "ParameterRangeUnion",
|
|
89
|
+
"parameterRangeElements": [
|
|
90
|
+
{
|
|
91
|
+
"@type": "ParameterRangeArray",
|
|
92
|
+
"parameterRangeValue": {
|
|
93
|
+
"@type": "ParameterRangeGenericComponent",
|
|
94
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
95
|
+
"genericTypeInstances": [
|
|
96
|
+
{
|
|
97
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
98
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
102
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
106
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"@type": "ParameterRangeUndefined"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"memberKeys": [
|
|
120
|
+
"mediatorHttp",
|
|
121
|
+
"mediatorRdfSerializeMediatypes",
|
|
122
|
+
"mediatorRdfSerialize",
|
|
123
|
+
"constructor",
|
|
124
|
+
"testMetadata",
|
|
125
|
+
"run"
|
|
126
|
+
],
|
|
127
|
+
"constructorArguments": [
|
|
128
|
+
{
|
|
129
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args__constructorArgument",
|
|
130
|
+
"fields": [
|
|
131
|
+
{
|
|
132
|
+
"keyRaw": "mediatorHttp",
|
|
133
|
+
"value": {
|
|
134
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorHttp"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"keyRaw": "mediatorRdfSerializeMediatypes",
|
|
139
|
+
"value": {
|
|
140
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerializeMediatypes"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"keyRaw": "mediatorRdfSerialize",
|
|
145
|
+
"value": {
|
|
146
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerialize"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"keyRaw": "name",
|
|
151
|
+
"value": {
|
|
152
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_name"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"keyRaw": "bus",
|
|
157
|
+
"value": {
|
|
158
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_bus"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"keyRaw": "beforeActors",
|
|
163
|
+
"value": {
|
|
164
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_beforeActors"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#IActorRdfUpdateHypermediaPostLdpArgs",
|
|
173
|
+
"@type": "AbstractClass",
|
|
174
|
+
"requireElement": "IActorRdfUpdateHypermediaPostLdpArgs",
|
|
175
|
+
"parameters": [],
|
|
176
|
+
"memberKeys": [
|
|
177
|
+
"mediatorHttp",
|
|
178
|
+
"mediatorRdfSerializeMediatypes",
|
|
179
|
+
"mediatorRdfSerialize"
|
|
180
|
+
],
|
|
181
|
+
"constructorArguments": []
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^2.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/types/^2.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
|
|
6
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^2.0.0/components/context.jsonld"
|
|
7
|
+
],
|
|
8
|
+
"@id": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
9
|
+
"components": [
|
|
10
|
+
{
|
|
11
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp",
|
|
12
|
+
"@type": "Class",
|
|
13
|
+
"requireElement": "QuadDestinationPutLdp",
|
|
14
|
+
"extends": [
|
|
15
|
+
"cbruq:components/IQuadDestination.jsonld#IQuadDestination"
|
|
16
|
+
],
|
|
17
|
+
"comment": "A quad destination that represents a resource that can be PUT.",
|
|
18
|
+
"parameters": [
|
|
19
|
+
{
|
|
20
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_url",
|
|
21
|
+
"range": "xsd:string"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediaTypes",
|
|
25
|
+
"range": {
|
|
26
|
+
"@type": "ParameterRangeArray",
|
|
27
|
+
"parameterRangeValue": "xsd:string"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_context",
|
|
32
|
+
"range": "ct:components/IActionContext.jsonld#IActionContext"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorHttp",
|
|
36
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerializeMediatypes",
|
|
40
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerialize",
|
|
44
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"memberKeys": [
|
|
48
|
+
"url",
|
|
49
|
+
"context",
|
|
50
|
+
"mediaTypes",
|
|
51
|
+
"mediatorHttp",
|
|
52
|
+
"mediatorRdfSerializeMediatypes",
|
|
53
|
+
"mediatorRdfSerialize",
|
|
54
|
+
"constructor",
|
|
55
|
+
"insert",
|
|
56
|
+
"delete",
|
|
57
|
+
"wrapRdfUpdateRequest",
|
|
58
|
+
"deleteGraphs",
|
|
59
|
+
"createGraphs"
|
|
60
|
+
],
|
|
61
|
+
"constructorArguments": [
|
|
62
|
+
{
|
|
63
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_url"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_context"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediaTypes"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorHttp"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerializeMediatypes"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerialize"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@context":
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
3
5
|
"@id": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
4
6
|
"@type": "Module",
|
|
5
7
|
"requireName": "@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
6
8
|
"import": [
|
|
7
|
-
"
|
|
9
|
+
"caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld",
|
|
10
|
+
"caruhpl:components/QuadDestinationPutLdp.jsonld"
|
|
8
11
|
]
|
|
9
|
-
}
|
|
12
|
+
}
|
|
@@ -1,12 +1,83 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caruhpl": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp/",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"caruhpl": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp/^2.0.0/",
|
|
7
|
+
"ActorRdfUpdateHypermediaPutLdp": {
|
|
8
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_mediatorHttp": {
|
|
12
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorHttp"
|
|
13
|
+
},
|
|
14
|
+
"args_mediatorRdfSerializeMediatypes": {
|
|
15
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerializeMediatypes"
|
|
16
|
+
},
|
|
17
|
+
"args_mediatorRdfSerialize": {
|
|
18
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerialize"
|
|
19
|
+
},
|
|
20
|
+
"args_name": {
|
|
21
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_name"
|
|
22
|
+
},
|
|
23
|
+
"args_bus": {
|
|
24
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_bus"
|
|
25
|
+
},
|
|
26
|
+
"args_beforeActors": {
|
|
27
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_beforeActors",
|
|
28
|
+
"@container": "@list"
|
|
29
|
+
},
|
|
30
|
+
"mediatorHttp": {
|
|
31
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorHttp"
|
|
32
|
+
},
|
|
33
|
+
"mediatorRdfSerializeMediatypes": {
|
|
34
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerializeMediatypes"
|
|
35
|
+
},
|
|
36
|
+
"mediatorRdfSerialize": {
|
|
37
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_mediatorRdfSerialize"
|
|
38
|
+
},
|
|
39
|
+
"name": {
|
|
40
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_name"
|
|
41
|
+
},
|
|
42
|
+
"bus": {
|
|
43
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_bus"
|
|
44
|
+
},
|
|
45
|
+
"beforeActors": {
|
|
46
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#ActorRdfUpdateHypermediaPutLdp_args_beforeActors",
|
|
47
|
+
"@container": "@list"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"IActorRdfUpdateHypermediaPostLdpArgs": {
|
|
52
|
+
"@id": "caruhpl:components/ActorRdfUpdateHypermediaPutLdp.jsonld#IActorRdfUpdateHypermediaPostLdpArgs",
|
|
53
|
+
"@prefix": true,
|
|
54
|
+
"@context": {}
|
|
55
|
+
},
|
|
56
|
+
"QuadDestinationPutLdp": {
|
|
57
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp",
|
|
58
|
+
"@prefix": true,
|
|
59
|
+
"@context": {
|
|
60
|
+
"url": {
|
|
61
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_url"
|
|
62
|
+
},
|
|
63
|
+
"mediaTypes": {
|
|
64
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediaTypes",
|
|
65
|
+
"@container": "@list"
|
|
66
|
+
},
|
|
67
|
+
"context": {
|
|
68
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_context"
|
|
69
|
+
},
|
|
70
|
+
"mediatorHttp": {
|
|
71
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorHttp"
|
|
72
|
+
},
|
|
73
|
+
"mediatorRdfSerializeMediatypes": {
|
|
74
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerializeMediatypes"
|
|
75
|
+
},
|
|
76
|
+
"mediatorRdfSerialize": {
|
|
77
|
+
"@id": "caruhpl:components/QuadDestinationPutLdp.jsonld#QuadDestinationPutLdp_mediatorRdfSerialize"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
10
81
|
}
|
|
11
82
|
]
|
|
12
|
-
}
|
|
83
|
+
}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { IActionRdfUpdateHypermedia, IActorRdfUpdateHypermediaOutput } from '@comunica/bus-rdf-update-hypermedia';
|
|
1
|
+
import type { MediatorHttp } from '@comunica/bus-http';
|
|
2
|
+
import type { MediatorRdfSerializeHandle, MediatorRdfSerializeMediaTypes } from '@comunica/bus-rdf-serialize';
|
|
3
|
+
import type { IActionRdfUpdateHypermedia, IActorRdfUpdateHypermediaOutput, IActorRdfUpdateHypermediaArgs } from '@comunica/bus-rdf-update-hypermedia';
|
|
5
4
|
import { ActorRdfUpdateHypermedia } from '@comunica/bus-rdf-update-hypermedia';
|
|
6
|
-
import type {
|
|
5
|
+
import type { IActorTest } from '@comunica/core';
|
|
7
6
|
/**
|
|
8
7
|
* A comunica Post LDP RDF Update Hypermedia Actor.
|
|
9
8
|
*/
|
|
10
9
|
export declare class ActorRdfUpdateHypermediaPutLdp extends ActorRdfUpdateHypermedia {
|
|
11
|
-
readonly mediatorHttp:
|
|
12
|
-
readonly mediatorRdfSerializeMediatypes:
|
|
13
|
-
readonly mediatorRdfSerialize:
|
|
10
|
+
readonly mediatorHttp: MediatorHttp;
|
|
11
|
+
readonly mediatorRdfSerializeMediatypes: MediatorRdfSerializeMediaTypes;
|
|
12
|
+
readonly mediatorRdfSerialize: MediatorRdfSerializeHandle;
|
|
14
13
|
constructor(args: IActorRdfUpdateHypermediaPostLdpArgs);
|
|
15
14
|
testMetadata(action: IActionRdfUpdateHypermedia): Promise<IActorTest>;
|
|
16
15
|
run(action: IActionRdfUpdateHypermedia): Promise<IActorRdfUpdateHypermediaOutput>;
|
|
17
16
|
}
|
|
18
|
-
export interface IActorRdfUpdateHypermediaPostLdpArgs extends
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
export interface IActorRdfUpdateHypermediaPostLdpArgs extends IActorRdfUpdateHypermediaArgs {
|
|
18
|
+
/**
|
|
19
|
+
* The HTTP mediator
|
|
20
|
+
*/
|
|
21
|
+
mediatorHttp: MediatorHttp;
|
|
22
|
+
/**
|
|
23
|
+
* The RDF Serialize mediator for collecting media types
|
|
24
|
+
*/
|
|
25
|
+
mediatorRdfSerializeMediatypes: MediatorRdfSerializeMediaTypes;
|
|
26
|
+
/**
|
|
27
|
+
* The RDF Serialize mediator for handling serialization
|
|
28
|
+
*/
|
|
29
|
+
mediatorRdfSerialize: MediatorRdfSerializeHandle;
|
|
22
30
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { IActionRootRdfSerialize, IActorTestRootRdfSerialize, IActorOutputRootRdfSerialize } from '@comunica/bus-rdf-serialize';
|
|
1
|
+
import type { MediatorHttp } from '@comunica/bus-http';
|
|
2
|
+
import type { MediatorRdfSerialize, MediatorRdfSerializeMediaTypes } from '@comunica/bus-rdf-serialize';
|
|
4
3
|
import type { IQuadDestination } from '@comunica/bus-rdf-update-quads';
|
|
5
|
-
import type {
|
|
6
|
-
import type { ActionContext } from '@comunica/types';
|
|
4
|
+
import type { IActionContext } from '@comunica/types';
|
|
7
5
|
import type * as RDF from '@rdfjs/types';
|
|
8
6
|
import type { AsyncIterator } from 'asynciterator';
|
|
9
7
|
/**
|
|
@@ -14,9 +12,9 @@ export declare class QuadDestinationPutLdp implements IQuadDestination {
|
|
|
14
12
|
private readonly context;
|
|
15
13
|
private readonly mediaTypes;
|
|
16
14
|
private readonly mediatorHttp;
|
|
17
|
-
readonly mediatorRdfSerializeMediatypes:
|
|
15
|
+
readonly mediatorRdfSerializeMediatypes: MediatorRdfSerializeMediaTypes;
|
|
18
16
|
private readonly mediatorRdfSerialize;
|
|
19
|
-
constructor(url: string, context:
|
|
17
|
+
constructor(url: string, context: IActionContext, mediaTypes: string[], mediatorHttp: MediatorHttp, mediatorRdfSerializeMediatypes: MediatorRdfSerializeMediaTypes, mediatorRdfSerialize: MediatorRdfSerialize);
|
|
20
18
|
insert(quads: AsyncIterator<RDF.Quad>): Promise<void>;
|
|
21
19
|
delete(quads: AsyncIterator<RDF.Quad>): Promise<void>;
|
|
22
20
|
wrapRdfUpdateRequest(type: 'INSERT' | 'DELETE', quads: AsyncIterator<RDF.Quad>): Promise<void>;
|
|
@@ -33,7 +33,8 @@ class QuadDestinationPutLdp {
|
|
|
33
33
|
Object.keys(mediaTypes).sort((typeA, typeB) => mediaTypes[typeB] - mediaTypes[typeA])[0];
|
|
34
34
|
// Serialize quads
|
|
35
35
|
const { handle: { data } } = await this.mediatorRdfSerialize.mediate({
|
|
36
|
-
|
|
36
|
+
context: this.context,
|
|
37
|
+
handle: { quadStream: quads, context: this.context },
|
|
37
38
|
handleMediaType: mediaType,
|
|
38
39
|
});
|
|
39
40
|
// Send data in (LDP) PUT request
|
|
@@ -47,7 +48,7 @@ class QuadDestinationPutLdp {
|
|
|
47
48
|
},
|
|
48
49
|
input: this.url,
|
|
49
50
|
});
|
|
50
|
-
await bus_rdf_update_quads_1.validateHttpResponse(this.url, httpResponse);
|
|
51
|
+
await (0, bus_rdf_update_quads_1.validateHttpResponse)(this.url, httpResponse);
|
|
51
52
|
}
|
|
52
53
|
async deleteGraphs(graphs, requireExistence, dropGraphs) {
|
|
53
54
|
throw new Error(`Put-based LDP destinations don't support named graphs`);
|
package/lib/index.d.ts
ADDED
|
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./ActorRdfUpdateHypermediaPutLdp"), exports);
|
|
14
|
+
__exportStar(require("./QuadDestinationPutLdp"), exports);
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.1-alpha.8.0",
|
|
4
4
|
"description": "A put-ldp rdf-update-hypermedia actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"typings": "index",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"typings": "lib/index",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/comunica/comunica.git",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"keywords": [
|
|
17
18
|
"comunica",
|
|
18
19
|
"actor",
|
|
@@ -27,49 +28,21 @@
|
|
|
27
28
|
"files": [
|
|
28
29
|
"components",
|
|
29
30
|
"lib/**/*.d.ts",
|
|
30
|
-
"lib/**/*.js"
|
|
31
|
-
"index.d.ts",
|
|
32
|
-
"index.js"
|
|
31
|
+
"lib/**/*.js"
|
|
33
32
|
],
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@comunica/bus-
|
|
34
|
+
"@comunica/bus-http": "2.0.1-alpha.8.0",
|
|
35
|
+
"@comunica/bus-rdf-serialize": "2.0.1-alpha.8.0",
|
|
36
|
+
"@comunica/bus-rdf-update-hypermedia": "2.0.1-alpha.8.0",
|
|
37
|
+
"@comunica/bus-rdf-update-quads": "2.0.1-alpha.8.0",
|
|
38
|
+
"@comunica/core": "2.0.1-alpha.8.0",
|
|
39
|
+
"@comunica/types": "2.0.1-alpha.8.0",
|
|
36
40
|
"cross-fetch": "^3.0.5"
|
|
37
41
|
},
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"@comunica/bus-http": "^1.0.0",
|
|
40
|
-
"@comunica/bus-rdf-serialize": "^1.0.0",
|
|
41
|
-
"@comunica/bus-rdf-update-hypermedia": "^1.0.0",
|
|
42
|
-
"@comunica/core": "^1.0.0",
|
|
43
|
-
"@comunica/types": "^1.0.0"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@comunica/bus-http": "^1.22.1",
|
|
47
|
-
"@comunica/bus-rdf-serialize": "^1.22.0",
|
|
48
|
-
"@comunica/bus-rdf-update-hypermedia": "^1.22.2",
|
|
49
|
-
"@comunica/core": "^1.22.0",
|
|
50
|
-
"@comunica/types": "^1.22.0"
|
|
51
|
-
},
|
|
52
|
-
"jest": {
|
|
53
|
-
"globals": {
|
|
54
|
-
"ts-jest": {
|
|
55
|
-
"tsConfig": "../../tsconfig.json"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"transform": {
|
|
59
|
-
"^.+\\.ts$": "ts-jest"
|
|
60
|
-
},
|
|
61
|
-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
|
|
62
|
-
"moduleFileExtensions": [
|
|
63
|
-
"ts",
|
|
64
|
-
"js"
|
|
65
|
-
],
|
|
66
|
-
"collectCoverage": true
|
|
67
|
-
},
|
|
68
42
|
"scripts": {
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"build": "
|
|
72
|
-
"validate": "npm ls"
|
|
43
|
+
"build": "npm run build:ts && npm run build:components",
|
|
44
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
45
|
+
"build:components": "componentsjs-generator"
|
|
73
46
|
},
|
|
74
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "aaf5b7bb8d67de3364618454ed2976fd08052b61"
|
|
75
48
|
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-hypermedia-put-ldp/^1.0.0/components/context.jsonld",
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^1.0.0/components/context.jsonld"
|
|
5
|
-
],
|
|
6
|
-
"@id": "npmd:@comunica/actor-rdf-update-hypermedia-put-ldp",
|
|
7
|
-
"components": [
|
|
8
|
-
{
|
|
9
|
-
"@id": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp",
|
|
10
|
-
"@type": "Class",
|
|
11
|
-
"extends": "cbruh:Actor/RdfUpdateHypermedia",
|
|
12
|
-
"requireElement": "ActorRdfUpdateHypermediaPutLdp",
|
|
13
|
-
"comment": "A comunica Put LDP RDF Update Hypermedia Actor.",
|
|
14
|
-
"parameters": [
|
|
15
|
-
{
|
|
16
|
-
"@id": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorHttp",
|
|
17
|
-
"comment": "The HTTP mediator",
|
|
18
|
-
"required": true,
|
|
19
|
-
"unique": true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"@id": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerializeMediatypes",
|
|
23
|
-
"comment": "The RDF Serialize mediator for collecting media types",
|
|
24
|
-
"required": true,
|
|
25
|
-
"unique": true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"@id": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerialize",
|
|
29
|
-
"comment": "The RDF Serialize mediator for handling serialization",
|
|
30
|
-
"required": true,
|
|
31
|
-
"unique": true
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"constructorArguments": [
|
|
35
|
-
{
|
|
36
|
-
"@id": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp/constructorArgumentsObject",
|
|
37
|
-
"extends": "cbruh:Actor/RdfUpdateHypermedia/constructorArgumentsObject",
|
|
38
|
-
"fields": [
|
|
39
|
-
{
|
|
40
|
-
"keyRaw": "mediatorHttp",
|
|
41
|
-
"value": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorHttp"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"keyRaw": "mediatorRdfSerializeMediatypes",
|
|
45
|
-
"value": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerializeMediatypes"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"keyRaw": "mediatorRdfSerialize",
|
|
49
|
-
"value": "caruhpl:Actor/RdfUpdateHypermedia/PutLdp#mediatorRdfSerialize"
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
package/index.d.ts
DELETED