rdf-ext / rdf-store-sparql Goto Github PK
View Code? Open in Web Editor NEWSPARQL RDF Store that follows the RDF/JS Store interface specification
Home Page: http://npm.im/rdf-store-sparql
License: MIT License
SPARQL RDF Store that follows the RDF/JS Store interface specification
Home Page: http://npm.im/rdf-store-sparql
License: MIT License
When i use waitFor(stream)
with stream = store.remove(dataset.toStream())
, and dataset
being an empty dataset, it creates an infinite loop. The promise in waitFor never resolves
store
is rdf-store-sparql
Adding and remove blank nodes requires a clever algorithm to identify the unique triples.
rdf-store-sparql currently sends requests to the server with teh accept header set only to application/n-triples
even if parsers for other formats are available. Because of this rdf-store-sparql can no longer be used against Stardog which returns HTTP/1.1 406 Not a supported accept type(s): [application/n-triples]
.
I`m using RDF-EXT for a small application at the moment. Which is very hard since their is very limited documentation. So the code I have been writing is based on crawling through the RDF-EXT code.
I succeeded to get results from a SPARQL endpoint however, in the debugger I see that I get results from the SPARQL endpoint, but I am not able to retrieve the results and use them. My thoughts tell me I have to get results via the callback (which will give me a Graph) and should use this Graph object further in the application. But I cant figure out how.
This is the javascript:
var options = {endpointUrl: 'https://dydra.com/nicky508/firebrary_pictogrammen/sparql'}; var endpoint = new SparqlStore(options); console.log(endpoint.match(null, "http://purl.org/ontology/stories/describedBy", null, null ,null ,100));
This is the result of the log: Promise { then=then(), catch=catch()})
Certainly, because this is not the right. How should I do it right???
Thanks in advance.
I'm using rdf-store-sparql, which communicates with a remote Jena triple store
When adding new quads to a dataset from two different graph, only the graph of the very first quad is impacted by the import request.
let quads =[];
quads.push(rdf.quad(subject, predicate, object, graph1));
quads.push(rdf.quad(subject, predicate, object, graph2));
let dataset = rdf.dataset(quads);
//Or even dataset.addAll(quads)
let stream = store.import(dataset.toStream());
rdf.waitFor(stream).then(() => { //doing something })
This lines of codes only adds quads on the first graph and not on the second.
The number of quads doesn't matter, I could have one quad going on the first graph and 20 going on the second, it will only add one quad to the store.
Maybe it's not the update but the backend stopping to support CORS, still the exception message could be more helpful.
Uncaught (in promise) TypeError: Cannot read property 'then' of undefined(…)
SparqlStore.match @ index.js:125
SparqlStore.match @ index.js:119
SparqlStore.graph @ index.js:113
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.