Skip to content

Commit

Permalink
SPARQL support!
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-zucker committed Mar 9, 2024
1 parent f01e617 commit cfd6be5
Show file tree
Hide file tree
Showing 8 changed files with 521 additions and 685 deletions.
4 changes: 4 additions & 0 deletions documentation/data/sparql.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT ?Feedname
WHERE {
?x rdfs:label ?Feedname; bookmark:hasTopic "Science News" .
}
17 changes: 16 additions & 1 deletion documentation/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,22 @@ <H3>Simple RDF queries</H3><template>
></sol-rdf>
</template>

<H3>SPARQL queries</H3><div>Coming soon! Can be used with either rdlib or communica as the query engine.</div>
<H3>SPARQL queries</H3><template>
<p>
A SPARQL component should use the `source` attribute to point to a document containing a SPARQL query; an `endpoint` attribute to point to the data the query will search and a template attribute to indicate method of display. The query can omit prefix statements for all common vocabularies (listed in [solid-namespace](https://github.com/solid/solid-namespace)), so if the query contains `:thing rdfs:label "foo"`, the necessary prefix statements will be prepended to the query.
</p>
<p>
By default, the rdflib query engine is used. However, if you add comunica with a script tag in your topmost HTML, the communica engine you specify will be used instead.
</p>
<p>
If you are using comunica and the endpoint is an actual SPARQL endpoint, the querying will be done server-side. If you are using rdflib or the endpoint is a plain RDF endpoint, the querying will be done client-side.
</p>
<sol-sparql
source="./data/sparql.rq"
endpoint="./data/sample-rdf.ttl"
template="table"
></sol-sparql>
</template>
<H3>Replaceable query parameters</H3><div>Coming soon!</div>


Expand Down
Loading

0 comments on commit cfd6be5

Please sign in to comment.