RDF
Resource Description Framework (commonly abbreviated RDF) is emerging as the leading metadata description language, used in creating associations between different types of metadata. [1][2] RDF can be represented in any number of ways which can represent namespaces and triples, the most common being via a visual graph representation, XML and N3.
RDF is based on the following simple model for data association:
subject predicate object
Contents
Specifications
- Resource Description Framework (RDF) spec: http://www.w3.org/TR/rdf-mt/
- RDF/XML syntax: http://www.w3.org/TR/rdf-concepts/
- RDF-3T -- RDF in Machine Tags (within xHTML): http://weborganics.co.uk/RDF-3T/
Media Types
Format | EXAMPLE | ||
---|---|---|---|
RDF/XML | XML serialization of RDF | application/rdf+xml | <rdf:Description rdf:about="http://purl.org/commons/record/ncbi_gene/1812"> <rdfs:label>human DRD1</rdfs:label> </rdf:Description |
ntriples | simple serialization of RDF | text/plain | http://purl.org/commons/record/ncbi_gene/1812 http://www.w3.org/2000/01/rdf-schema#label "human DRD1" . |
turtle | textual serialization of RDF | application/x-turtle | ncbi_gene:1812 rdfs:label "human DRD1" . |
n3 | [extension] of turtle language expressing a superset of RDF | text/rdf+n3 (not registered) | hcls:kb foo:asserts { ncbi_gene:1812 rdfs:label "human DRD1" } . |
- W3C RDF Media Types Guide: http://www.w3.org/2008/01/rdf-media-types
- Turtle: http://www.w3.org/2008/01/rdf-media-types/2007/11/21-turtle
Vocabularies
RDF data/documents require a specific vocabulary to define their structure (much like XML documents require a DTD or Schema). A vocabulary is a definition of terms (or words) used within a particular domain of knowledge (in this case the domain described by the RDF document).
The W3C has created a set of guidelines and best practices for publishing RDF vocabularies, with the following being a depiction of the most basic method: File:W3C deref-ont-uri-min.png [3]
Subject
The specific resource being described.
For example:
* In the following basic cat example, the statement: "cats are felines" is a general ontological statement, while
"Schnookums isAnimal Cat" is a specific triple which could be represented in RDF. In this example, "Schookums" is
the Subject, "isAnimal" is the Predicate and "Cat" is the Object.
Predicate
The description itself.
A Predicate is the description of a specific "resource" which can be reasonably categorized as an object and which has a definable type that falls under a given domain.
For example, in the following sentence:
* Most people agree that cats are felines and popular science tells us that felines are mammals.
--> In both cases "are" is a predicate which indicates the state of being.
The following RDF could be created from (or "gleaned" about) the resources that are described in this sentence:
* statement1: Most people agree statement2
* statement2: cats are felines
AND
* statement3: popular science tells us statement4
* statement4 felines are mammals
Thus the new information we can discover through the use of RDF and combination of statements 1-4 is:
* Most people agree that cats are mammals.
Yes, all that to discover a seemingly trivial new piece of information, but this most basic example can easily be multiplied by the thousands of new facts that can be discovered through the relations of triples, that is, sets of RDF three-way relationships, and one can imagine a wealth of complex aggregates of individually trivial new information inferences.
Some additional facts might also be relevant to this "discussion" and can be related through the document's namespaces or included directly, such as:
- Most people:
people who agree > threshold threshold = 51%
people who agree:
Arnold Steeves is a person Cyril Sneer is a person Jack James is a person ...
- Popular Science:
scientist published in list of accredited journals
list of accredited journals:
Academia Journal of Science is a journal American Science Association is a journal Science Weekly is a journal ...
scientists:
Arnold Steeves is a scientist Cyril Sneer is a scientist Jack James is a scientist ...
scientist type of person
Object
The type of resource being described.
Essentially, thanks to its permissiveness, you can describe virtually any type of resource in RDF. The resource is typically personified and as such is best likened to and thought of as a noun in English, but it can in fact be any kind of non-describable resource in the universe.
For example, a resource could be almost any object:
* a Cat * a Feline * an Animal * a Person * Music album * Movie * TV show (programme) * An episode of a TV show * A timeslot within an episode of a TV show * Day * Time-of-Day * Time-frame * Event * Computer * Mobile Device * Blackhawk Hellicopter * Lazer-guided Missile technology * Lazer * Guide * Missile * Launcher * Space Shuttle * Mechanical part on a Space Shuttle * Constollation * Galaxy * Planet * Moon * Comet * Meteor * Asteroid (synonyms and relations between similar words can also be described within RDF) * Periodic Table Element * Bacterial Culture * Newly discovered (or previously discovered) Cell structure * Disease * Genome Structure * Brain structure * Synaptic Response * Internal Organ * Medical Record * Food * Allergy * Nutrient * Or any other "thing" living or non, that you can imagine
With RDF the benefit is that we can develop a clear definition and structure of resources. This structure and definition can define who owns which resource, whether anyone is even allowed to own that resource, what the resource costs to buy, to use, to borrow, what the penalties are for illegally stealing, damaging or destroying the resouce, etc...
EXAMPLES
Example 1: BCmoney
The following example shows the case for representing a multimedia viewing interaction where a particular Person (Bryan) watches a clip from a particular program (The Transformers).
<http://bcmoney.tv/bryan> <http://bcmoney.tv/ontology/consumer/person/> "Bryan Copeland" . <http://bcmoney.tv/ontology/consumer/person/#watches> <http://bcmoney.tv/ontology/transmission-method/vod/stream> "1a" . <http://bcmoney.tv/ontology/transmission-method/vod/stream#1a> <http://bcmoney.tv/ontology/transmission-method/tv/programme> "tt0086817" . <http://bcmoney.tv/ontology/transmission-method/tv/programme#tt0086817> <http://bcmoney.tv/ontology/transmission-method/tv/programme/title> "The Transformers" .
Example 2: Publisher
Likewise, since http://bcmoney.tv/bryan identifies a particular resource (regardless of whether that URI could be traversed as a hyperlink, or whether the resource is actually the BC$ of Bryan Copeland), to say that the title of this resource is "Bryan Copeland" and its publisher is "bcmoney" would be two assertions that could be expressed as valid RDF statements. In the N-Triples form of RDF, these statements might look like the following:
<http://bcmoney.org/Bryan_Copeland> <http://bcmoney.org/bc/money/1.0/> "Bryan Copeland" . <http://bcmoney.org/Bryan_Copeland> <http://bcmoney.org/bc/money/1.0/publisher> "BCmoney.tv" .
And these statements might be expressed in RDF/XML as:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bc="http://openrecommender.org/bc/recommender/1.0/"> <rdf:Description rdf:about="http://bcmoney.org/Bryan_Copeland"> <bc:Person>Bryan Copeland</bc:Person> <bc:publisher>BCmoney.tv</bc:publisher> </rdf:Description> </rdf:RDF>
To an English-speaking person, the same information could be represented simply as:
The title of this resource, which is published by Wikipedia, is 'Tony Benn'
However, RDF puts the information in a formal way that a machine can understand. The purpose of RDF is to provide an encoding and interpretation mechanism so that resources can be described in a way that particular software can understand it; in other words, so that software can access and use information that it otherwise couldn't use.
Example 3: Recommendations
Just as easily as specifying a (person) publisher, owner, or creator of a resource, a recommender can be acknowledged.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bc="http://openrecommender.org/bc/recommender/1.0/"> <rdf:Description rdf:about="http://openrecommender.org/59dscd"> <foaf:Person>Bryan Copeland</foaf:Person> <bc:recommends>Thundercats</bc:recommends> <bc:Recommendation>Thundercats</bc:Recommendation> <bc:recommendedTo>Jason Tse</bc:recommendedTo> </rdf:Description> </rdf:RDF>
Where "59dscd" corresponds to a TinyUrl ID that points to the episode (actual video) recommended. The resource prefix (whatever it may be) can then be applied, for example: [2]
Example 4: WordNet
- RDF/OWL Representation of WordNet: http://www.w3.org/TR/wordnet-rdf/
Example 5: MeetingAgenda
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:m="http://www.w3.org/2001/12/09mr#" xmlns:mr="http://www.w3.org/2000/11/mr76/minutes#"> <m:Teleconference> <mr:agenda> <Seq> <li><Description> <dc:title>first item</dc:title> <mr:from>Ralph</mr:from> </Description></li> <li><Description> <dc:title>second item</dc:title> </Description></li> <li><Description> <dc:title>third item</dc:title> <mr:from>Alice</mr:from> <mr:via>RalphS</mr:via> </Description></li> </Seq> </mr:agenda> </m:Teleconference> </RDF>
- RDF Agenda - Meeting Agenda format: https://www.w3.org/2004/02/agenda)
- RDF Agenda - parser/validator: http://whatfettle.com/2006/07/RDFAgenda/
- Whatfettle ⁓ RDF Agenda Scraper: http://blog.whatfettle.com/2006/07/04/rdf-agenda-scraper/ (parses into MeetingAgenda RDF from SMS text message & IM chat logs)
Tools
- Large-scale RDF Graph Visualization Tools: http://www.mkbergman.com/414/large-scale-rdf-graph-visualization-tools/
- EBI RDF Platform: http://www.ebi.ac.uk/rdf/#!
- moriarty - simple PHP library for accessing the Talis Linked Data in Education Platform: http://code.google.com/p/moriarty/
Validators
- W3C RDF Validator (with Graph & Triple data views): http://www.w3.org/RDF/Validator/
- RDF Validator and Converter: http://rdfabout.com/demo/validator/
Editors
- Is-a-Viz (WINDOWS): http://www.w3.org/2001/11/IsaViz/ (Java 1.5, so should work fairly well on Linux/Unix too)
- RDF Author (MAC): http://rdfweb.org/people/damian/RDFAuthor/
Viewers
- RDF Gravity (RDF Graph Visualization Tool): http://semweb.salzburgresearch.at/apps/rdf-gravity/user_doc.html
- NG4J - Named Graphs API for Jena: http://www4.wiwiss.fu-berlin.de/bizer/ng4j/
Converter
- RDF Converter: http://www.mindswap.org/2002/rdfconvert/ (paste your data as rdf/xml, rdf/n3, or rdf/ntriples then convert to another Semantic Web format)[4]
- ReDeFer: http://rhizomik.net/html/redefer/ (compendium of RDF-aware utilities organized in a set of packages) | XML2RDF
Publishing
- D2R Server: http://d2rq.org/d2r-server (tool for publishing Relational Databases on the Semantic Web)
- RDFizers: http://simile.mit.edu/wiki/RDFizers (converts from one binary file format into an equivalent RDF representation)
- CytoScape: http://cytoscape.org/ (open source bioinformatics software platform for visualizing molecular interaction networks, integrating these interactions with gene expression profiles & other state data)[5]
Data Stores
- 4store: http://4store.org/ (an efficient, scalable and stable RDF database)
- OpenRDF: http://www.openrdf.org/
- Neo4j: (while not being designed for RDF out-of-the-box, its graph database model lends itself well to RDF through extensions like Tikerpop[6] or Sail[7])
Data Sources
- RDFdata.org: http://www.rdfdata.org/ (list of publicly available collections of providers of RDF and/or Web Services that return RDF) | RDF Data dump | List (by category)
- Data.gov: http://data.gov (investigates government datasets using semantic web technologies) | WIKI
- GeoSpecies Knowledge Base: http://lod.geospecies.org/index.xhtml
- Unified Medical Language System® (UMLS®): http://www.nlm.nih.gov/research/umls/
- Freebase RDF Service: http://rdf.freebase.com/[8]
- O'Reilly Labs: http://radar.oreilly.com/2009/02/oreilly-labs-rdf-for-all-of-ou.html (RDF For All of Our Books, Plus Bookworm Ebook Reader)
- pushback: http://esw.w3.org/topic/PushBackDataToLegacySources (write Data back from RDF to Non-RDF sources)
Plugins
- Firefox-based TABULATOR Data Browser (by TBL's team at MIT-CSAIL): https://addons.mozilla.org/en-US/firefox/addon/5596
- Tabulator -- Developer notes (JS-based RDF parsers): http://dig.csail.mit.edu/2005/ajar/ajaw/Developer.html
- Semantic Radar - Displays a status bar icon to indicate presence of Semantic Web (RDF) data in the web page: https://addons.mozilla.org/en-US/firefox/addon/semantic-radar/
Parsers
PHP
- RAP v0.96 (RDF API for PHP): http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/ | PHOAF extension of RAP
- PHP RDF Parser: http://web.archive.org/web/20100728225115/http://www.jasonandann.com/php_rdf/
- EasyRDF: http://www.easyrdf.org/
- Graphite PHP Linked Data Library: http://graphite.ecs.soton.ac.uk
Java
- Java-based Semantic Web framework (JENA): http://jena.sourceforge.net/
- A lightweight java parser for RDF: http://plindenbaum.blogspot.com/2009/03/lightweight-java-parser-for-rdf.html
- RDF4J: http://rdf4j.org (formerly known as Sesame)
- JRDF - An RDF Library in Java: http://jrdf.sourceforge.net/
JavaScript
- rdfquery: http://code.google.com/p/rdfquery/ (RDF processing in your browser, using jQuery-like parser library)
- Simple javascript RDF Parser and query thingy: http://www.jibbering.com/rdf-parser/
- RDF Query in Javascript demo -- RDF Schema demo: http://www.w3.org/1999/11/11-WWWProposal/rdfs
- Javascript MinXML / RDF testbed: http://www.ilrt.bris.ac.uk/discovery/rdf-dev/rudolf/js-rdf/
- JSTLe: https://github.com/dnewcome/jstle
Python
- RDF lib: https://github.com/RDFLib/rdflib/
Perl
- Perl and RDF: http://www.perlrdf.org/
Ruby
- ActiveRDF: http://www.activerdf.org
C#
- .NET RDF: http://www.dotnetrdf.org/
C
- Raptor RDF Parser/Converter "librdf": http://librdf.org/
C++
- Soprano (Qt4): http://soprano.sourceforge.net/
Prolog
- SWI-Prolog RDF parser: http://www.swi-prolog.org/pldoc/package/rdf2pl.html
Resources
- RDF Primer (BOOK): http://www.w3.org/TR/rdf-primer/
- RDF Database Systems -- Triples Storage and SPARQL Query Processing (BOOK): https://www.sciencedirect.com/book/9780127999579/rdf-database-systems
- RDF Reference: http://www.w3schools.com/rdf/rdf_reference.asp
- W3C -- RDF Concepts - RDF graphs: https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph
- Fresnel - Display Vocabulary for RDF: http://www.w3.org/2005/04/fresnel-info/ (vocabulary to display components of an RDF Graph... name comes from the term "Fresnel Lense")[9]
- ARC - Simple Library to Process RDF in PHP: http://arc.semsol.org/
- PHP RDF Parser (by Jason and Ann): http://www.jasonandann.com/php_rdf/
- PHP-based RDF Parser Classes (as well as RSS, RDQL, XML, Xquery, etc): http://phpxmlclasses.sourceforge.net/rdf_parser.html
- Dave Beckett's Resource Description Framework (RDF) Resource Guide: http://planetrdf.com/guide/
- RDF123 Makes Generating Flexible RDF a Snap: http://www.mkbergman.com/?p=394
- Expressing Dublin Core metadata using the Resource Description Framework (RDF): http://dublincore.org/documents/2008/01/14/dc-rdf/
- The RDF Pipeline Framework - Automating Distributed, Dependency-Driven Data Pipelines: http://code.google.com/p/rdf-pipeline/ | WHITEPAPER
- Sail Implementation: https://github.com/tinkerpop/blueprints/wiki/Sail-Implementation (Sail is "like the JDBC of RDF")
Tutorials
- What is RDF and what is it good for?: http://rdfabout.com/intro/?
- W3C - RDF Tutorial: http://www.w3schools.com/rdf/
- An introduction to RDF: http://www.ibm.com/developerworks/library/w-rdf/
- RDF Query by example: http://ilrt.org/discovery/2002/04/query/
- "Getting Real" with RDF and SPARQL: http://www.devx.com/semantic/Article/39162?trk=DXRSS_LATEST#codeitemarea
- Storing RDF in a relational database: http://infolab.stanford.edu/~melnik/rdf/db.html
- Plugging RDF Content Into Your Web Site With PHP: http://www.devshed.com/c/a/PHP/Plugging-RDF-Content-Into-Your-Web-Site-With-PHP/
- Using RDF to access Relational Databases: http://www.w3.org/2003/01/21-RDF-RDB-access/
- RAP - RDF API for PHP - using the SPARQL Engine: http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/tutorial/usingtheSparqlEngine.htm
- How to use the Sesame Java API to power a Web or Client-Server Application: http://answers.oreilly.com/topic/447-how-to-use-the-sesame-java-api-to-power-a-web-or-client-server-application/
- How RDF Databases Differ from Other NoSQL Solutions: http://blog.datagraph.org/2010/04/rdf-nosql-diff
- RDF# - Extending RDF to Support Named Triples: https://blogs.oracle.com/oraclespatial/rdf-extending-rdf-to-support-named-triples
- QuickGraph#14 Using RDF* with Neo4j: https://jbarrasa.com/2021/01/19/quickgraph14-using-rdf-with-neo4j/ (quick way to setup an RDF endpoint)
External Links
- wikipedia: Resource Description Framework
- W3C - RDF Working Group: http://www.w3.org/RDF/
- 100 Most common RDF namespaces: http://ebiquity.umbc.edu/resource/html/id/196/Most-common-RDF-namespaces
- Resource Description Framework (RDF) Specifications: http://www.w3.org/RDF/
- Resource Description Framework (RDF) Model and Syntax Specification: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/
- Tim Berners Lee on Tabulator (his first attempt at a Semantic Web browser): http://dig.csail.mit.edu/2007/Talks/0108-tab-tbl/#(20)
- I got 99 data stores and integrating them ain't fun: http://www.zdnet.com/article/i-got-99-data-stores-and-integrating-them-aint-fun/
- The Pathetic Fallacy of RDF: http://eprints.ecs.soton.ac.uk/12911/1/the_pathetic_fallacy_of_rdf-33.html
- Understanding RDF: http://ilrt.org/discovery/2001/01/understanding-rdf/
- Advantages and Myths of RDF - A 10th Birthday Salute to RDF’s Role in Powering Data Interoperability: http://www.mkbergman.com/?p=483
- Javascript MinXML / RDF testbed: http://ilrt.org/discovery/rdf-dev/rudolf/js-rdf/#top
- More Linked Data and RDF: http://cloudofdata.com/2009/07/more-linked-data-and-rdf/
- Bio2RDF -- Semantic web atlas of postgenomic knowledge: http://bio2rdf.org/
- What is RDF and what is it good for?: http://www.rdfabout.com/intro/
- Universities in RDF: http://lin-clark.com/blog/universities-rdf
- Universities in RDF - process: http://lin-clark.com/universities-rdf-process
- "crystalizing" RDF (RDF/XML into n3 with GRDDL): http://blogs.sun.com/bblfish/entry/crystalizing_rdf
- The Future of RDF Standards: http://www.w3.org/2002/09/wbs/1/rdf-2010/results
- Comparing RDF to XML and RDBMS: http://www.rdfabout.com/comparisons.xpd
- What is your RDF browser’s Accept header?: http://richard.cyganiak.de/blog/2008/03/what-is-your-rdf-browsers-accept-header/
- (XUL-based) RDF parser - View Triple data from RDF/XML: http://anybody.cephb.fr/perso/lindenb/rdfjs/rdf.xul (DOWN)
- OpenLink Semantic Web RDF Browser: http://demo.openlinksw.com/rdfbrowser2/ (DOWN)
References
- ↑ wikipedia:Resource Description Framework
- ↑ W3C's RDF Specification: [1]
- ↑ W3C Guide to Publishing RDF Vocabularies: http://www.w3.org/TR/swbp-vocab-pub/
- ↑ D2R MAP - Database to RDF Mapping Language and Processor: http://wifo5-03.informatik.uni-mannheim.de/bizer/d2rmap/D2Rmap.htm
- ↑ Cytoscape: Hands-down Winner for Large-scale Graph Visualization -- Where Has the Biology Community Been Hiding this Gem?: http://www.mkbergman.com/415/cytoscape-hands-down-winner-for-large-scale-graph-visualization/
- ↑ RDF data in Neo4J - the Tinkerpop story: http:///datablend.be/?p=554
- ↑ Storing and querying RDF data in Neo4J through Sail: http://architects.dzone.com/news/storing-and-querying-rdf-data
- ↑ The Day after Freebase went RDF: http://blog.semantic-web.at/2008/10/30/the-day-after-freebase-went-rdf/
- ↑ wikipedia: Fresnel_lens
See Also
Linked Data | OWL | RDF Schema | XML | XML Schema | JSON | n3 | NoSQL