Package Exports
- rdf-ext
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rdf-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
RDF Interfaces Extension
This module implements [RDF-Ext] (http://bergos.github.com/rdf-ext-spec/), parsers (JSON-LD, RDF-XML, Turtle), serializers (JSON-LD, N-Triples) and stores (in memory, LDP, SPARQL).
Usage
node.js
Import your favourite RDF Interfaces library:
var rdf = require('rdf-interfaces');
Mixin RDF Interfaces Extension to the RDF Environment:
require('rdf-ext')(rdf);
Browser
Import your favourite RDF Interfaces library:
<script src="/js/rdf.js"></script>
If you want to use the Turtle or JSON-LD parser:
<script src="/js/n3-browser.js"></script>
<script src="/js/jsonld.js"></script>
Because rdfstore-js comes with an outdated version of jsonld it must be deleted afterwards:
<script src="/js/rdfstore.js"></script>
<script>delete jsonld;</script>
Now you can import RDF-Ext:
<script src="/js/rdf-ext.js"></script>
Implementations
InMemoryStore
A simple in memory triple store implementation.
LdpStore
Store implementation to access graphs with RESTful interface.
RdfstoreStore
Store based on [rdfstore-js] (https://github.com/antoniogarrote/rdfstore-js).
SingleGraphStore
In memory triple store using a single graph for all named graphs. Sometimes usefull for testing.
SparqlStore
Store implementation to access graph with HTTP/SPARQL interface.
JsonLdParser
Parser for JSON-LD using the standard [JSON-LD library] (https://github.com/digitalbazaar/jsonld.js).
RdfXmlParser
Parser for RDF-XML data using a fork of the [rdflib.js] (https://github.com/linkeddata/rdflib.js) parser.
TurtleParser
Turtle parser using [N3.js] (https://github.com/RubenVerborgh/N3.js).
JsonLdSerializer
JSON-LD serializer exports expanded JSON-LD data.
NTriplesSerializer
N-Triples serializer using the RDF-Ext Graph.toString()
function.