PieceMeta / node-sparql-hollandaise

A JS client lib to communicate with a triple store database through SPARQL queries over HTTP.
MIT License
3 stars 3 forks source link

Built-in support for common namespaces #2

Closed martinleopold closed 8 years ago

martinleopold commented 8 years ago
.prefix('rdf')
->
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

most common namespaces according to the web: rdf, rdfs, owl, xsd, dc, foaf, geonames, geo, skos, ...

implementation-wise this would require parsing the string argument of the prefix function.

dasantonym commented 8 years ago

this is now added through https://github.com/PieceMeta/node-sparql-hollandaise/blob/master/src/sparql/prefix-index.js

you can now either use a full foo: <http://bar> string or just foo

this throws an error if the key is not found in the index