Skip to content

TwitLogic Linked Data

joshsh edited this page Sep 13, 2010 · 7 revisions

In order to serve semantic annotations about a resource, by many different users, against the same dereferenceable URI, TwitLogic takes the unusual approach of embedding explicit Named Graphs in its Linked Data, providing TriG and TriX serializations of the data for clients which ask for it. In so doing, it follows a few basic ground rules:

  1. Publish provenance-aware Linked Data in a quads format (TriX, TriG, or N-Quads)
  2. Coin Named Graph URIs for provenance/sources
  3. Make these URIs dereferenceable, as well, and associate authoritative Named Graph metadata with them
  4. Use vocabulary which is appropriate for the data source (e.g. sioc:embedsKnowledge for data from blog posts)
  5. Otherwise, follow current Linked Data best practices

Here are some examples.

ground-level Linked Data

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
{
	<http://twitlogic.fortytwo.net/hashtag/sdow2009.trig> 
		a foaf:Document ;
		rdfs:label "RDF description of sdow2009" ;
		dc:date "2010-02-03"^^xsd:date ;
		dc:publisher <http://twitlogic.fortytwo.net/dataset/twitlogic-full> .
}
<http://twitlogic.fortytwo.net/graph/1610488112> {
	<http://twitlogic.fortytwo.net/hashtag/sdow2009> foaf:depiction <http://bit.ly/4BAJBN> .
}
<http://twitlogic.fortytwo.net/graph/46805487> {
	<http://twitlogic.fortytwo.net/hashtag/sdow2009> rdfs:seeAlso <http://sdow.semanticweb.org/2009/> .
}
<http://twitlogic.fortytwo.net/graph/261985909> {
	<http://twitlogic.fortytwo.net/hashtag/sdow2009> owl:sameAs <http://data.semanticweb.org/workshop/sdow/2009> .
}

linked metadata

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdfg: <http://www.w3.org/2004/03/trix/rdfg-1/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
{
	<http://twitlogic.fortytwo.net/graph/261985909.trig> 
		a foaf:Document ;
		rdfs:label "RDF description of Named Graph 261985909" ;
		dc:date "2010-02-03"^^xsd:date ;
		dc:publisher <http://twitlogic.fortytwo.net/dataset/twitlogic-full> .
	<http://twitlogic.fortytwo.net/graph/261985909> a rdfg:Graph ;
		rdfs:label “nanotation Named Graph 261985909” ;
		rdfs:seeAlso <http://twitlogic.fortytwo.net/hashtag/sdow2009.trig> .
	<http://twitlogic.fortytwo.net/post/twitter/5189571318>
		sioc:embedsKnowledge <http://twitlogic.fortytwo.net/graph/261985909> .
}

Since current Linked Data clients are not equipped to make sense of embedded Named Graphs in Linked Data, this practice requires some justification. TwitLogic uses it because it provides a very straightforward serialization of the quads data TwitLogic produces internally (and also makes available as an RDF stream). For the sake of generic tools which can’t use the Named Graph data, TwitLogic also provides RDF/XML serializations of all of its data apart from the user-provided annotations themselves.