Code Monkey home page Code Monkey logo

rdf-store-sparql's Introduction

rdf-ext

build status npm version

RDF-Ext is a JavaScript library that extends the RDF/JS specs to handle RDF data in a developer-friendly way.

Install

npm install --save rdf-ext

Usage

Just import the default export from the package:

import rdf from 'rdf-ext'

const term = rdf.namedNode('http://example.org/')

The exported object is an instance of @rdfjs/environment. The following factories are included in the environment:

Experimental features

The package contains experimental features which may break or be removed without being covered in the semantic versioning:

Documentation & examples

For more details, please check rdf-ext.org

rdf-store-sparql's People

Contributors

bergos avatar l00mi avatar nicola avatar retog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rdf-store-sparql's Issues

Exception after update

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

Get result from sparqlstore instead of promise then and catch as result

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.

Support for more RDF serialization format from server

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].

Handle blank nodes

Adding and remove blank nodes requires a clever algorithm to identify the unique triples.

Multi graph import doesn't always work

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.

rdf.waitFor Infinite loop

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.