This node can be connected with Semantic Web endpoints to perform SELECT queries. Please note that based on the connected endpoint, same data and same queries may lead to different results. For instance, the following SELECT query
SELECT * WHERE {?s ?p ?o} |
To query specific graphs, e.g. graphs named a and b, the query with an In-Memory Endpoint is
SELECT * WHERE { { GRAPH <a> { ?s ?p ?o } } UNION { GRAPH <b> { ?s ?p ?o } } } |
SELECT * FROM NAMED <a> FROM NAMED <b> WHERE { GRAPH ?graph { ?s ?p ?o } } |
The N-Triples format for the query result is necessary to be kept if you want to insert the triples in an endstore. This is especially imporant for (typed) literals. If the N-Triples format is not preserved type information will get lost (a String representation of the literal is returned). For URIs the angled brackets are not preserved, which are necessary for insertion. Here is an example showing triples with and without format preservation:
Preserve | sub | pred | object |
Yes | <http://expl.org/expl> | <http://expl.org/integer> | 4 |
No | http://expl.org/expl | http://expl.org/integer | 4 |
Yes | <http://expl.org/expl> | <http://expl.org/string> | "4" |
No | http://expl.org/expl | http://expl.org/string | 4 |
Yes | <http://expl.org/expl> | <http://expl.org/string> | "sometstring"@en |
No | http://expl.org/expl | http://expl.org/string | sometstring |
Yes | <http://expl.org/expl> | <http://expl.org/own> | "123k"^^<http://expl.org/owntype> |
No | http://expl.org/expl | http://expl.org/own | 123k |
Functionality is provided using the Apache Jena Framework