string
| | SPARQL query endpoint URL |
26 | | updateUrl | string
| | SPARQL update endpoint URL |
27 | | storeUrl | string
| | SPARQL Graph Store URL |
28 | | user | string
| | user used for basic authentication |
29 | | password | string
| | password used for basic authentication |
30 | | headers | Headers
| | headers sent with every request |
31 | | factory | factory
| `@rdfjs/data-model` & `@rdfjs/dataset` | RDF/JS factory |
32 | | fetch | fetch
| `nodeify-fetch` | fetch implementation |
33 |
34 | At least one URL argument must be given.
35 | Besides that, all properties are optional, but omitting some of them will disable certain capabilities.
36 | Also, not all properties are supported by all implementations. Check their respective pages.
37 |
38 | A client object has all properties attached required to create a new instance.
39 | It is, therefore, possible to create a new client object of a different type based on an existing client object:
40 |
41 | ```javascript
42 | const simpleClient = new SimpleClient({ endpointUrl })
43 | const parsingClient = new ParsingClient(simpleClient)
44 | ```
45 |
46 | ### Examples
47 |
48 | The [API](api.md) section contains examples for all clients.
49 |
50 | ### Queries
51 |
52 | All methods for SPARQL Queries and Updates are attached to the instance property `query`.
53 | Their return types are implementation-specific.
54 | See the [API](api.md) section for more details on the individual methods.
55 |
56 | ### Graph Store
57 |
58 | All methods for SPARQL Graph Store are attached to the instance property `store`.
59 | See the [API](api.md) section for more details on the individual methods.
60 |
61 | ### Advanced Topics
62 |
63 | #### Headers
64 |
65 | HTTP requests to the SPARQL endpoint can have additional headers added to them.
66 | For example, to pass authorization information.
67 |
68 | One method for doing so is to set headers on the method call:
69 |
70 | ```javascript
71 | const client = new SparqlClient({ endpointUrl: 'https://query.wikidata.org/sparql' })
72 |
73 | client.query.select(query, {
74 | headers: {
75 | Authorization: 'Bearer token'
76 | }
77 | })
78 | ```
79 |
80 | It is also possible to set headers in the constructor of the client.
81 |
82 | The headers will be sent on all requests originating from the instance of the client:
83 |
84 | ```javascript
85 | const client = new SparqlClient({
86 | endpointUrl: 'https://query.wikidata.org/sparql',
87 | headers: {
88 | Authorization: 'Bearer token'
89 | }
90 | })
91 | ```
92 |
93 | #### Operation
94 |
95 | SPARQL queries and updates over the SPARQL Protocol can be done with different [operations](https://www.w3.org/TR/sparql11-protocol/#protocol).
96 | By default, all read queries use `get`, and updates use `postUrlencoded`.
97 | Very long queries may exceed the maximum request header length.
98 | For those cases, it's useful to switch to operations that use a `POST` request.
99 | This can be done by the optional `operation` argument.
100 |
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | * sparql-http-client
2 | * [About](/)
3 | * [API](api.md)
4 |
--------------------------------------------------------------------------------
/docs/api.md:
--------------------------------------------------------------------------------
1 | ## Classes
2 |
3 | SimpleClient
A client implementation based on ParsingQuery that parses SPARQL results into RDF/JS DatasetCore objects 6 | (CONSTRUCT/DESCRIBE) or an array of objects (SELECT). It does not provide a store interface.
7 |StreamQuery
A query implementation that wraps the results of the StreamQuery into RDF/JS DatasetCore objects 10 | (CONSTRUCT/DESCRIBE) or an array of objects (SELECT).
11 |A query implementation that prepares URLs and headers for SPARQL queries and returns the raw fetch response.
14 |A Transform stream that parses JSON SPARQL results and emits one object per row with the variable names as keys and 17 | RDF/JS terms as values.
18 |A client implementation based on RawQuery that prepares URLs and headers for SPARQL queries and returns the 21 | raw fetch response. It does not provide a store interface.
22 |SimpleClient
The default client implementation based on StreamQuery and StreamStore parses SPARQL results into 25 | Readable streams of RDF/JS Quad objects (CONSTRUCT/DESCRIBE) or Readable streams of objects (SELECT). Graph Store 26 | read and write operations are handled using Readable streams.
27 |RawQuery
A query implementation based on RawQuery that parses SPARQL results into Readable streams of RDF/JS Quad 30 | objects (CONSTRUCT/DESCRIBE) or Readable streams of objects (SELECT).
31 |A store implementation that parses and serializes SPARQL Graph Store responses and requests into/from Readable 34 | streams.
35 |SimpleClient
](#SimpleClient)
41 | A client implementation based on [ParsingQuery](#ParsingQuery) that parses SPARQL results into RDF/JS DatasetCore objects
42 | (CONSTRUCT/DESCRIBE) or an array of objects (SELECT). It does not provide a store interface.
43 |
44 | **Kind**: global class
45 | **Extends**: [SimpleClient
](#SimpleClient)
46 | **Properties**
47 |
48 | Name | Type | 52 |
---|---|
query | ParsingQuery |
57 |
SimpleClient
](#SimpleClient)
62 | * [new ParsingClient(options)](#new_ParsingClient_new)
63 | * [.get(query, options)](#SimpleClient+get) ⇒ Promise.<Response>
64 | * [.postDirect(query, options)](#SimpleClient+postDirect) ⇒ Promise.<Response>
65 | * [.postUrlencoded(query, options)](#SimpleClient+postUrlencoded) ⇒ Promise.<Response>
66 |
67 |
68 |
69 | ### new ParsingClient(options)
70 | Param | Type | Default | Description | 74 |
---|---|---|---|
options | Object | 79 | | |
[options.endpointUrl] | string | SPARQL query endpoint URL 81 | |
82 | |
[options.factory] | factory | RDF/JS factory 84 | |
85 | |
[options.fetch] | fetch | nodeify-fetch | fetch implementation 87 | |
88 |
[options.headers] | Headers | headers sent with every request 90 | |
91 | |
[options.password] | string | password used for basic authentication 93 | |
94 | |
[options.storeUrl] | string | SPARQL Graph Store URL 96 | |
97 | |
[options.updateUrl] | string | SPARQL update endpoint URL 99 | |
100 | |
[options.user] | string | user used for basic authentication 102 | |
103 |
Promise.<Response>
138 | Sends a GET request as defined in the
139 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-get).
140 |
141 | **Kind**: instance method of [ParsingClient
](#ParsingClient)
142 | **Overrides**: [get
](#SimpleClient+get)
143 | Param | Type | Default | Description | 147 |
---|---|---|---|
query | string | SPARQL query 152 | |
153 | |
options | Object | 155 | | |
[options.headers] | Headers | additional request headers 157 | |
158 | |
[options.update] | boolean | false | send the request to the updateUrl 160 | |
161 |
Promise.<Response>
167 | Sends a POST directly request as defined in the
168 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-direct).
169 |
170 | **Kind**: instance method of [ParsingClient
](#ParsingClient)
171 | **Overrides**: [postDirect
](#SimpleClient+postDirect)
172 | Param | Type | Default | Description | 176 |
---|---|---|---|
query | string | SPARQL query 181 | |
182 | |
options | Object | 184 | | |
[options.headers] | Headers | additional request headers 186 | |
187 | |
[options.update] | boolean | false | send the request to the updateUrl 189 | |
190 |
Promise.<Response>
196 | Sends a POST URL-encoded request as defined in the
197 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-urlencoded).
198 |
199 | **Kind**: instance method of [ParsingClient
](#ParsingClient)
200 | **Overrides**: [postUrlencoded
](#SimpleClient+postUrlencoded)
201 | Param | Type | Default | Description | 205 |
---|---|---|---|
query | string | SPARQL query 210 | |
211 | |
options | Object | 213 | | |
[options.headers] | Headers | additional request headers 215 | |
216 | |
[options.update] | boolean | false | send the request to the updateUrl 218 | |
219 |
StreamQuery
](#StreamQuery)
225 | A query implementation that wraps the results of the [StreamQuery](#StreamQuery) into RDF/JS DatasetCore objects
226 | (CONSTRUCT/DESCRIBE) or an array of objects (SELECT).
227 |
228 | **Kind**: global class
229 | **Extends**: [StreamQuery
](#StreamQuery)
230 |
231 | * [ParsingQuery](#ParsingQuery) ⇐ [StreamQuery
](#StreamQuery)
232 | * [.construct(query, options)](#ParsingQuery+construct) ⇒ Promise.<DatasetCore>
233 | * [.select(query, [options])](#ParsingQuery+select) ⇒ Promise.<Array.<Object.<string, Term>>>
234 | * [.ask(query, [options])](#StreamQuery+ask) ⇒ Promise.<boolean>
235 | * [.update(query, [options])](#StreamQuery+update) ⇒ Promise.<void>
236 |
237 |
238 |
239 | ### parsingQuery.construct(query, options) ⇒ Promise.<DatasetCore>
240 | Sends a request for a CONSTRUCT or DESCRIBE query
241 |
242 | **Kind**: instance method of [ParsingQuery
](#ParsingQuery)
243 | **Overrides**: [construct
](#StreamQuery+construct)
244 | Param | Type | Default | Description | 248 |
---|---|---|---|
query | string | CONSTRUCT or DESCRIBE query 253 | |
254 | |
options | Object | 256 | | |
[options.headers] | Headers | additional request headers 258 | |
259 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 261 | |
262 |
Promise.<Array.<Object.<string, Term>>>
268 | Sends a request for a SELECT query
269 |
270 | **Kind**: instance method of [ParsingQuery
](#ParsingQuery)
271 | **Overrides**: [select
](#StreamQuery+select)
272 | Param | Type | Default | Description | 276 |
---|---|---|---|
query | string | SELECT query 281 | |
282 | |
[options] | Object | 284 | | |
[options.headers] | Headers | additional request headers 286 | |
287 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 289 | |
290 |
Promise.<boolean>
296 | Sends a request for a ASK query
297 |
298 | **Kind**: instance method of [ParsingQuery
](#ParsingQuery)
299 | Param | Type | Default | Description | 303 |
---|---|---|---|
query | string | ASK query 308 | |
309 | |
[options] | Object | 311 | | |
[options.headers] | Headers | additional request headers 313 | |
314 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 316 | |
317 |
Promise.<void>
323 | Sends a request for an update query
324 |
325 | **Kind**: instance method of [ParsingQuery
](#ParsingQuery)
326 | Param | Type | Default | Description | 330 |
---|---|---|---|
query | string | update query 335 | |
336 | |
[options] | Object | 338 | | |
[options.headers] | Headers | additional request headers 340 | |
341 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'postUrlencoded' | SPARQL Protocol operation 343 | |
344 |
Promise.<Response>
357 | * [.construct(query, [options])](#RawQuery+construct) ⇒ Promise.<Response>
358 | * [.select(query, [options])](#RawQuery+select) ⇒ Promise.<Response>
359 | * [.update(query, [options])](#RawQuery+update) ⇒ Promise.<Response>
360 |
361 |
362 |
363 | ### new RawQuery(options)
364 | Param | Type | Description | 368 |
---|---|---|
options | Object | 373 | |
options.client | SimpleClient | client that provides the HTTP I/O 375 | |
376 |
Promise.<Response>
382 | Sends a request for a ASK query
383 |
384 | **Kind**: instance method of [RawQuery
](#RawQuery)
385 | Param | Type | Default | Description | 389 |
---|---|---|---|
query | string | ASK query 394 | |
395 | |
[options] | Object | 397 | | |
[options.headers] | Headers | additional request headers 399 | |
400 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 402 | |
403 |
Promise.<Response>
409 | Sends a request for a CONSTRUCT or DESCRIBE query
410 |
411 | **Kind**: instance method of [RawQuery
](#RawQuery)
412 | Param | Type | Default | Description | 416 |
---|---|---|---|
query | string | CONSTRUCT or DESCRIBE query 421 | |
422 | |
[options] | Object | 424 | | |
[options.headers] | Headers | additional request headers 426 | |
427 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 429 | |
430 |
Promise.<Response>
436 | Sends a request for a SELECT query
437 |
438 | **Kind**: instance method of [RawQuery
](#RawQuery)
439 | Param | Type | Default | Description | 443 |
---|---|---|---|
query | string | SELECT query 448 | |
449 | |
[options] | Object | 451 | | |
[options.headers] | Headers | additional request headers 453 | |
454 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 456 | |
457 |
Promise.<Response>
463 | Sends a request for an update query
464 |
465 | **Kind**: instance method of [RawQuery
](#RawQuery)
466 | Param | Type | Default | Description | 470 |
---|---|---|---|
query | string | update query 475 | |
476 | |
[options] | Object | 478 | | |
[options.headers] | Headers | additional request headers 480 | |
481 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'postUrlencoded' | SPARQL Protocol operation 483 | |
484 |
Param | Type | Description | 501 |
---|---|---|
options | Object | 506 | |
options.factory | DataFactory | RDF/JS DataFactory used to create the quads and terms 508 | |
509 |
Name | Type | 525 |
---|---|
query | RawQuery |
530 |
endpointUrl | string |
532 |
factory | RawQuery |
534 |
fetch | factory |
536 |
headers | Headers |
538 |
password | string |
540 |
storeUrl | string |
542 |
updateUrl | string |
544 |
user | string |
546 |
updateUrl | string |
548 |
Promise.<Response>
555 | * [.postDirect(query, options)](#SimpleClient+postDirect) ⇒ Promise.<Response>
556 | * [.postUrlencoded(query, options)](#SimpleClient+postUrlencoded) ⇒ Promise.<Response>
557 |
558 |
559 |
560 | ### new SimpleClient(options)
561 | Param | Type | Default | Description | 565 |
---|---|---|---|
options | Object | 570 | | |
[options.endpointUrl] | string | SPARQL query endpoint URL 572 | |
573 | |
[options.factory] | factory | RDF/JS factory 575 | |
576 | |
[options.fetch] | fetch | nodeify-fetch | fetch implementation 578 | |
579 |
[options.headers] | Headers | headers sent with every request 581 | |
582 | |
[options.password] | string | password used for basic authentication 584 | |
585 | |
[options.storeUrl] | string | SPARQL Graph Store URL 587 | |
588 | |
[options.updateUrl] | string | SPARQL update endpoint URL 590 | |
591 | |
[options.user] | string | user used for basic authentication 593 | |
594 | |
[options.Query] | Query | Constructor of a query implementation 596 | |
597 | |
[options.Store] | Store | Constructor of a store implementation 599 | |
600 |
Promise.<Response>
637 | Sends a GET request as defined in the
638 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-get).
639 |
640 | **Kind**: instance method of [SimpleClient
](#SimpleClient)
641 | Param | Type | Default | Description | 645 |
---|---|---|---|
query | string | SPARQL query 650 | |
651 | |
options | Object | 653 | | |
[options.headers] | Headers | additional request headers 655 | |
656 | |
[options.update] | boolean | false | send the request to the updateUrl 658 | |
659 |
Promise.<Response>
665 | Sends a POST directly request as defined in the
666 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-direct).
667 |
668 | **Kind**: instance method of [SimpleClient
](#SimpleClient)
669 | Param | Type | Default | Description | 673 |
---|---|---|---|
query | string | SPARQL query 678 | |
679 | |
options | Object | 681 | | |
[options.headers] | Headers | additional request headers 683 | |
684 | |
[options.update] | boolean | false | send the request to the updateUrl 686 | |
687 |
Promise.<Response>
693 | Sends a POST URL-encoded request as defined in the
694 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-urlencoded).
695 |
696 | **Kind**: instance method of [SimpleClient
](#SimpleClient)
697 | Param | Type | Default | Description | 701 |
---|---|---|---|
query | string | SPARQL query 706 | |
707 | |
options | Object | 709 | | |
[options.headers] | Headers | additional request headers 711 | |
712 | |
[options.update] | boolean | false | send the request to the updateUrl 714 | |
715 |
SimpleClient
](#SimpleClient)
721 | The default client implementation based on [StreamQuery](#StreamQuery) and [StreamStore](#StreamStore) parses SPARQL results into
722 | Readable streams of RDF/JS Quad objects (CONSTRUCT/DESCRIBE) or Readable streams of objects (SELECT). Graph Store
723 | read and write operations are handled using Readable streams.
724 |
725 | **Kind**: global class
726 | **Extends**: [SimpleClient
](#SimpleClient)
727 | **Properties**
728 |
729 | Name | Type | 733 |
---|---|
query | StreamQuery |
738 |
store | StreamStore |
740 |
SimpleClient
](#SimpleClient)
745 | * [new StreamClient(options)](#new_StreamClient_new)
746 | * [.get(query, options)](#SimpleClient+get) ⇒ Promise.<Response>
747 | * [.postDirect(query, options)](#SimpleClient+postDirect) ⇒ Promise.<Response>
748 | * [.postUrlencoded(query, options)](#SimpleClient+postUrlencoded) ⇒ Promise.<Response>
749 |
750 |
751 |
752 | ### new StreamClient(options)
753 | Param | Type | Default | Description | 757 |
---|---|---|---|
options | Object | 762 | | |
[options.endpointUrl] | string | SPARQL query endpoint URL 764 | |
765 | |
[options.factory] | factory | RDF/JS factory 767 | |
768 | |
[options.fetch] | fetch | nodeify-fetch | fetch implementation 770 | |
771 |
[options.headers] | Headers | headers sent with every request 773 | |
774 | |
[options.password] | string | password used for basic authentication 776 | |
777 | |
[options.storeUrl] | string | SPARQL Graph Store URL 779 | |
780 | |
[options.updateUrl] | string | SPARQL update endpoint URL 782 | |
783 | |
[options.user] | string | user used for basic authentication 785 | |
786 |
Promise.<Response>
843 | Sends a GET request as defined in the
844 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-get).
845 |
846 | **Kind**: instance method of [StreamClient
](#StreamClient)
847 | **Overrides**: [get
](#SimpleClient+get)
848 | Param | Type | Default | Description | 852 |
---|---|---|---|
query | string | SPARQL query 857 | |
858 | |
options | Object | 860 | | |
[options.headers] | Headers | additional request headers 862 | |
863 | |
[options.update] | boolean | false | send the request to the updateUrl 865 | |
866 |
Promise.<Response>
872 | Sends a POST directly request as defined in the
873 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-direct).
874 |
875 | **Kind**: instance method of [StreamClient
](#StreamClient)
876 | **Overrides**: [postDirect
](#SimpleClient+postDirect)
877 | Param | Type | Default | Description | 881 |
---|---|---|---|
query | string | SPARQL query 886 | |
887 | |
options | Object | 889 | | |
[options.headers] | Headers | additional request headers 891 | |
892 | |
[options.update] | boolean | false | send the request to the updateUrl 894 | |
895 |
Promise.<Response>
901 | Sends a POST URL-encoded request as defined in the
902 | [SPARQL Protocol specification](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-urlencoded).
903 |
904 | **Kind**: instance method of [StreamClient
](#StreamClient)
905 | **Overrides**: [postUrlencoded
](#SimpleClient+postUrlencoded)
906 | Param | Type | Default | Description | 910 |
---|---|---|---|
query | string | SPARQL query 915 | |
916 | |
options | Object | 918 | | |
[options.headers] | Headers | additional request headers 920 | |
921 | |
[options.update] | boolean | false | send the request to the updateUrl 923 | |
924 |
RawQuery
](#RawQuery)
930 | A query implementation based on [RawQuery](#RawQuery) that parses SPARQL results into Readable streams of RDF/JS Quad
931 | objects (CONSTRUCT/DESCRIBE) or Readable streams of objects (SELECT).
932 |
933 | **Kind**: global class
934 | **Extends**: [RawQuery
](#RawQuery)
935 |
936 | * [StreamQuery](#StreamQuery) ⇐ [RawQuery
](#RawQuery)
937 | * [.ask(query, [options])](#StreamQuery+ask) ⇒ Promise.<boolean>
938 | * [.construct(query, [options])](#StreamQuery+construct) ⇒ Readable
939 | * [.select(query, [options])](#StreamQuery+select) ⇒ Readable
940 | * [.update(query, [options])](#StreamQuery+update) ⇒ Promise.<void>
941 |
942 |
943 |
944 | ### streamQuery.ask(query, [options]) ⇒ Promise.<boolean>
945 | Sends a request for a ASK query
946 |
947 | **Kind**: instance method of [StreamQuery
](#StreamQuery)
948 | **Overrides**: [ask
](#RawQuery+ask)
949 | Param | Type | Default | Description | 953 |
---|---|---|---|
query | string | ASK query 958 | |
959 | |
[options] | Object | 961 | | |
[options.headers] | Headers | additional request headers 963 | |
964 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 966 | |
967 |
Readable
973 | Sends a request for a CONSTRUCT or DESCRIBE query
974 |
975 | **Kind**: instance method of [StreamQuery
](#StreamQuery)
976 | **Overrides**: [construct
](#RawQuery+construct)
977 | Param | Type | Default | Description | 981 |
---|---|---|---|
query | string | CONSTRUCT or DESCRIBE query 986 | |
987 | |
[options] | Object | 989 | | |
[options.headers] | Headers | additional request headers 991 | |
992 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 994 | |
995 |
Readable
1001 | Sends a request for a SELECT query
1002 |
1003 | **Kind**: instance method of [StreamQuery
](#StreamQuery)
1004 | **Overrides**: [select
](#RawQuery+select)
1005 | Param | Type | Default | Description | 1009 |
---|---|---|---|
query | string | SELECT query 1014 | |
1015 | |
[options] | Object | 1017 | | |
[options.headers] | Headers | additional request headers 1019 | |
1020 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'get' | SPARQL Protocol operation 1022 | |
1023 |
Promise.<void>
1029 | Sends a request for an update query
1030 |
1031 | **Kind**: instance method of [StreamQuery
](#StreamQuery)
1032 | **Overrides**: [update
](#RawQuery+update)
1033 | Param | Type | Default | Description | 1037 |
---|---|---|---|
query | string | update query 1042 | |
1043 | |
[options] | Object | 1045 | | |
[options.headers] | Headers | additional request headers 1047 | |
1048 | |
[options.operation] | 'get' | 'postUrlencoded' | 'postDirect' | 'postUrlencoded' | SPARQL Protocol operation 1050 | |
1051 |
Promise.<Readable>
1065 | * [.post(stream, [options])](#StreamStore+post) ⇒ Promise.<void>
1066 | * [.put(stream, [options])](#StreamStore+put) ⇒ Promise.<void>
1067 | * [.read([options])](#StreamStore+read) ⇒ Readable
1068 | * [.write([options], [graph], method, stream)](#StreamStore+write) ⇒ Promise.<void>
1069 |
1070 |
1071 |
1072 | ### new StreamStore(options)
1073 | Param | Type | Description | 1077 |
---|---|---|
options | Object | 1082 | |
options.client | SimpleClient | client that provides the HTTP I/O 1084 | |
1085 |
Promise.<Readable>
1091 | Sends a GET request to the Graph Store
1092 |
1093 | **Kind**: instance method of [StreamStore
](#StreamStore)
1094 | Param | Type | Description | 1098 |
---|---|---|
[graph] | NamedNode | source graph 1103 | |
1104 |
Promise.<void>
1110 | Sends a POST request to the Graph Store
1111 |
1112 | **Kind**: instance method of [StreamStore
](#StreamStore)
1113 | Param | Type | Description | 1117 |
---|---|---|
stream | Readable | triples/quads to write 1122 | |
1123 |
[options] | Object | 1125 | |
[options.graph] | Term | target graph 1127 | |
1128 |
Promise.<void>
1134 | Sends a PUT request to the Graph Store
1135 |
1136 | **Kind**: instance method of [StreamStore
](#StreamStore)
1137 | Param | Type | Description | 1141 |
---|---|---|
stream | Readable | triples/quads to write 1146 | |
1147 |
[options] | Object | 1149 | |
[options.graph] | Term | target graph 1151 | |
1152 |
Readable
1158 | Generic read request to the Graph Store
1159 |
1160 | **Kind**: instance method of [StreamStore
](#StreamStore)
1161 | Param | Type | Description | 1165 |
---|---|---|
[options] | Object | 1170 | |
[options.graph] | Term | source graph 1172 | |
1173 |
options.method | string | HTTP method 1175 | |
1176 |
Promise.<void>
1182 | Generic write request to the Graph Store
1183 |
1184 | **Kind**: instance method of [StreamStore
](#StreamStore)
1185 | Param | Type | Description | 1189 |
---|---|---|
[options] | Object | 1194 | |
[graph] | Term | target graph 1196 | |
1197 |
method | string | HTTP method 1199 | |
1200 |
stream | Readable | triples/quads to write 1202 | |
1203 |