RDF-Ext

RDF Interfaces Extension implementation in JavaScript

Michael Luggen & Thomas Bergwinkl

RDF-Ext

  • JavaScript library for working with RDF & Linked Data
  • runs on node.js and browser environments
  • based on RDF Interfaces
  • support for the most widely used RDF data formats

RDF Interfaces Spec

  • defines objects for nodes, triples and graphs
  • defines interfaces for parsers and serializers

RDF-Ext Spec

  • defines extended interfaces for asynchronous parsers and serializers
  • defines a store interface to handle named graphs

Overview

RDF-Ext Package - RDF Interfaces

RDF-Ext comes with the RDF Interfaces reference implementation

RDF-Ext Package - Parsers

RDF-Ext Package - Serializers

RDF-Ext Package - Stores

  • InMemory
  • Linked Data Platform / Web
  • SPARQL

How do you query data in JavaScript without concatenating strings to SPARQL queries?

Clownface graph traversing

  • Gremlin inspired
  • simple API for graph and store traversing
  • synchronous API for graphs
  • Promise API for stores on graph border crossing

Clownface example


var cf = rdf.cf.Store(store);

cf.node('http://localhost:8080/data/person/bernadette-rostenkowski', null, function (cf) {
  cf
    .out('http://schema.org/knows')
    .jump(function (cf) {
      return cf.map(function (node) {
        return node.out('http://schema.org/givenName') + ' ' + node.out('http://schema.org/familyName');
      });
    })
    .then(function (result) {
        alert(result.join(','));
    });
});
						

  • start in <bernadette-rostenkowski>
  • search for all objects with predicate <knows>
  • jump into the named graphs
  • build full name string

Other libraries

  • RDF Query Engine - SPARQL engine using a RDF-Ext store as source
  • RDF-JSONify - provides a document store like interface for graph data