Redland is a set of mature RDF open source libraries written in C providing a foundation layer of technology for semantic web applications with language bindings to Perl, PHP, Python, Ruby and others.
Aiming for: lowest possible barrier to using RDF technology
gcc -Weverything.
g++ as a stricter C compilervalgrind(1), dmallocThe name: Redland is an area of Bristol, UK
(wikipedia)
Not Redlands, Los Angeles or Redland, Florida or ...
FOAF, RDQL and Turtle were created here.
5 RDF W3C Recommendation editors work(ed) here.
Jena Java Semantic Web toolkit was created here at HP Labs.
(Actually Jena was created the same month as Redland, June 2000).
... and I lived there, at the time working at the Institute for Learning and Research Technology, University of Bristol
|
Tim Berners-Lee 2005 |
#include <stdweb.h>
|
|
stdrdf |
|
stdxml |
|
stduri |
![]() |
|
|
librdf_foo* librdf_new_foo(void); void librdf_free_foo(librdf_foo* foo); int librdf_foo_set_thing(librdf_foo* foo, char *thing); char *librdf_foo_get_thing(librdf_foo* foo);
librdf_storage* a=librdf_new_storage("memory", ...);
librdf_storage* b=librdf_new_storage("uri", ...);
while loops in the code (except query engine)@array, Python generators, C# Iterator ...Expectation is to use libraries with one line of code
$ python Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. <<< import RDF <<<
Or none:
$ perl -MRDF::Redland '...'
You can always use the command line:
$ rdfproc Redland RDF processor utility 1.0.9 Copyright 2000-2008 David Beckett. Copyright 2000-2005 University of Bristol Try `rdfproc --help' for more information.
More of which shortly...
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?website
FROM <http://planetrdf.com/bloggers.rdf>
WHERE { ?person foaf:weblog ?website ;
foaf:name ?name .
?website a foaf:Document
}
http://.../qps? query-lang=http://www.w3.org/TR/rdf-sparql-query/ &graph-id=http://planetrdf.com/bloggers.rdf &query=PREFIX foaf: <http://xmlns.com/foaf/0.1/...
# online: count triples $ rapper -c http://librdf.org/redland.rdf # online: get triples from home page $ rapper -g -q -o turtle http://www.dajobe.org/ # online: What was it doing? $ rapper -g -q -c --trace http://www.dajobe.org/ # offline: parse the slides $ rapper -g -q -o turtle index.html # offline: what just happened? rapper -g -c --trace index.htmlor Triplr
# online: use planetrdf query $ roqet example.rqor run the query via the web (example.rq)
For anything else, I prefer patches in diff -urN form :)
Redland: http://librdf.org/
Slides (to appear at):
http://www.dajobe.org/talks/200905-redland/
Questions?
$ rapper -c http://librdf.org/redland.rdf rapper: Parsing URI http://librdf.org/redland.rdf with parser rdfxml rapper: Serializing with serializer ntriples rapper: Parsing returned 40 triples
$ rapper -g -q -o turtle http://www.dajobe.org/
results: home.ttl
$ rapper -g -q -c --trace http://www.dajobe.org/ rapper: Processing URI http://www.dajobe.org/ rapper: Processing URI http://www.dajobe.org/foaf.rdf rapper: Processing URI http://journal.dajobe.org/journal/comments.rdf rapper: Processing URI http://www.dajobe.org/xslt/grokXFN.xsl
$ rapper -g -c --trace index.html rapper: Parsing URI file:///Users/dajobe/websites/www.dajobe.org/talks/200905-redland/index.html with parser guess rapper: Serializing with serializer ntriples rapper: Processing URI file:///Users/dajobe/websites/www.dajobe.org/talks/200905-redland/slides.xslt rapper: Guessed parser name 'guess' rapper: Parsing returned 56 triples