Coder Social home page Coder Social logo

jassa's People

Contributors

aklakan avatar leipert avatar lukovnikov avatar patrickwestphal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jassa's Issues

Odd SPARQL query generated when using SparqlServiceHttp constructor with a graph

When creating a Jassa.sparql.SparqlServiceHttp like that

$scope.endpoint = new Jassa.sparql.SparqlServiceHttp('http://localhost/sparql', 'http://linkedgeodata.org')

and then call

$scope.endpoint.execSelect('SELECT ?t WHERE { [] a ?t }');

the query that is generated is:

http://localhost/sparql?default-graph-uri=h&default-graph-uri=t&default-graph-uri=t&default-graph-uri=p&default-graph-uri=:&default-graph-uri=/&default-graph-uri=/&default-graph-uri=l&default-graph-uri=i&default-graph-uri=n&default-graph-uri=k&default-graph-uri=e&default-graph-uri=d&default-graph-uri=g&default-graph-uri=e&default-graph-uri=o&default-graph-uri=d&default-graph-uri=a&default-graph-uri=t&default-graph-uri=a&default-graph-uri=.&default-graph-uri=o&default-graph-uri=r&default-graph-uri=g&query=SELECT ?t WHERE { [] a ?t }&

(I already URL decoded it for readability.) There are several default-graph-uri GET parameters, each holding one letter of the actual default graph 'http://linkedgeodata.org'

There are no means to update Sponate mapping

When having set a Sponate mapping, e.g. via

store.addMap({
    name: 'castles',
    template: [{
      id: '?s',
      name: '?l',
      depiction: '?d',
    }],
   from: '{ Select * { ?s a dbpedia-owl:Castle ; rdfs:label ?l ; foaf:depiction ?d ; dbpedia-owl:owner ?o . ?o rdfs:label ?on . Filter(langMatches(lang(?l), "en")) . Filter(langMatches(lang(?on), "en")) } Limit 10 }'
});

there is no way to update it. Calling the addMap method again will result in an error:

[ERROR] An attribute / store with name concept0 already exists

In some cases it would be very usefull to update or re-set a mapping for a given name, e.g. via delMap or by just calling addMap again.

Question: Can Jassa parse RDF/Turtle files?

Not sure if this is in scope for the project, but does Jassa support accessing RDF/Turtle documents on the Web, or does it require a SPARQL endpoint?

Aside: are questions like these best asked here or is there a mailing list?

Improvement: capitalize keywords

I personally prefer

SELECT DISTINCT * { ?distinctThing a :selectExample. FILTER NOT EXISTS (?distinctThing a :notThatGroup ) } LIMIT 100

over

select distinct * { ?distinctThing a :selectExample. filter not exists (?distinctThing a :notThatGroup ) } limit 100

as this makes the queries more readable.

[FEATURE-REQUEST] jassa.sparql.ElementFilterNotExists

It would be nice if you could set a FILTER NOT EXISTS (...) with the sparql module.

For example:

var s = rdf.NodeFactory.createVar("s");
var p = rdf.NodeFactory.createVar("p");
var o = rdf.NodeFactory.createVar("o");
filter = new sparql.ElementFilterNotExists(new rdf.Triple(s, p, o));
console.log(filter.toString()); // logs FILTER NOT EXISTS (?s ?p ?o)

[FEATURE-REQUEST] jassa.sparql.ElementBindAs

It would be nice to have this for arithmetics, for example:
For example:

var s = rdf.NodeFactory.createVar("s");
var p = rdf.NodeFactory.createVar("p");
filter = new sparql.ElementBindAs(s + "/ 1000",p);
console.log(filter.toString()); // logs BIND ((?s / 1000) AS ?p )

[FEATURE-REQUEST] Add languageFilter to criteria

store.addMap({
    name: 'castles',
    template: [{
        id: '?s',
        name: '?l'
    }],
    from: '?s a dbpedia-owl:Castle ; rdfs:label ?l ; '
});

var criteria = {name: {$regex: filterText, $lang: "en"}};

looks much better than

store.addMap({
    name: 'castles',
    template: [{
        id: '?s',
        name: '?l'
    }],
    from: '?s a dbpedia-owl:Castle ; rdfs:label ?l ; '
         + 'Filter(langMatches(lang(?l), "en"))'
});

var criteria = {name: {$regex: filterText}};

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.