Shared publicly  - 
 
How To Describe Stuff You Like via a Turtle Document

When Linked Data was initially introduced, the early adopter community (us included) made a serious mistake while constructing "howto oriented" guides and narratives. Collectively, we concluded (quite incorrectly) that nobody would want to craft a Linked Data document by hand.  Of course, some of that had to do with RDF/XML being the default standard from the W3C, at the time, but things have changed profoundly since. 

Here is a simple Turtle document that demonstrates how to create your own social media gold-dust. Yes! The vital resource that social networking services and apps obtain (milk) from you -- surreptitiously -- as part your reality of being their actual product.

### Turtle Document Template Start ###
##
## Purpose: construction of digital sentences using a notation closely aligned to natural language sentence structure
## Remember: a natural language sentence is comprised of the following parts: Subject, Predicate, and Object (SPO) or Subject, Verb, Object (SVO). Illustrated in directed-graph form as:
## Subject-->Predicate-->Object 
## You can watch the video about sentence structure before proceeding. Just go to: http://youtu.be/sW_Mn0zeK6U 
##  
## Notation Rules:
##
## The occurence of a"#" symbol at the start of any line implies the line is a comment i.e., it won't be processed by a Turtle processor (software that undertands ## this notation)
## 
## Understanding Structure of a Hyperlink ##
##
## Sample Hyperlink: http://dbpedia.org/resource/Linked_Data
## Structure Breakdown:
## {http:} -- data protocol scheme
## {dbpedia.org} -- hostname
## {resource} -- path
## {Linked_Data} -- query
## {#} -- optional hyperlink terminator or fragment identifier which concludes the part of a hyperlink used by browsers. Thus, anything after the fragement identifier is for local application use.
## 
## Alternative view of URI structure breakdown ##
## {data-access-protocol-scheme}://{network-machine-name}/{resource-folder-or-directory}/{local-resource-name-lookup-or-query-pattern}#{local-identifier}
##
## Turtle Processor Directive Section ##
## These are Turtle processor directives for prefixes that serve as shorthand for Hyperlink based qualifiers (namespaces)
##@prefix directives are used -- by a Linked Data browser that understands Turtle -- to produce hyperlinks from this content when published to the Web
## Don't touch the section that follows unless you are adding a new directive.

@prefix yago: <http://dbpedia.org/class/yago/> .
@prefix dbpedia:     <http://dbpedia.org/resource/> . 
@prefix xsd:         <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:        <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:         <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:         <http://www.w3.org/2002/07/owl#> .
@prefix dcterms:     <http://purl.org/dc/terms/> .
@prefix wdrs:        <http://www.w3.org/2007/05/powder-s#> .
@prefix foaf:        <http://xmlns.com/foaf/0.1/> .
@prefix siocs:       <http://rdfs.org/sioc/services#> .
@prefix gr:          <http://purl.org/goodrelations/v1#> .
@prefix l:           <http://ontologi.es/like#> .
@prefix d:           <Definitions.ttl#> . 
@prefix:           <#> .

# Denotation Symbols Map resulting from the directives above:
# <> denotes the name of this Turtle document.
# <#> denotes the name of this file with plus a "#"  
# <xyz#> denotes a file named "xyz#" in the current directory
#
# Prefix Directives
#
#  @prefix d: is an alias directive, very similar to the effect of Unix bash shell command: alias d='ls Definitions.ttl#'
#
# Using this Template
#
# In this Turtle document template {} represents a placeholder i.e., when entering a value you have to overwrite the {}
# You only need to provide values where you see {} en route to making a document bearing Turtle content that describes 
# stuff you like

## Stuff I Like, Officially ##

<> a foaf:Document .
<> foaf:maker :this .
<> dcterms:created "{Date-In-Year-Month-Day-Format}"^^xsd:date .
<> dcterms:hasFormat "text/turtle" .


# Fruits You Like
# Examples: 
# Assuming yago:Apple107739125, denotes (names) an apple from the Yago dataset which is prefixed as yago: as per directives section at the top. Which expands to the # hyperlink based name: <http://dbpedia.org/class/yago/Apple107739125> .
# Thus, you can assert the # fact that you like Apples via the statement short form statement:
# :this l:likes yago:Apple107739125 .
# OR
# long form statement:
# :this l:likes <http://dbpedia.org/class/yago/Apple107739125> .

:this l:likes yago:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-Fruits-You-Like} .

# Food You Like
# Examples from DBpedia
# Thus, you can assert the # fact that you like Apples via the statement short form statement:
# :this l:likes dbpedia:Suya .
# OR
# long form statement:
# :this l:likes <http://dbpedia.org/resource/Suya> . 

:this l:likes dbpedia:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-Food-You-Like} .

# Cars You Like
# Examples from DBpedia
# :this l:likes dbpedia:Lexus .
# :this l:likes dbpedia:Lexus_RX .

:this l:likes dbpedia:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-a-Car-You-Like} .

# People You Like 
# Examples from DBpedia 
# :this l:likes dbpedia:Barack_Obama .
# :this l:likes dbpedia:Muhammad_Ali .
# :this l:likes dbpedia:Nelson_Mandela .

:this l:likes dbpedia:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-a-Someone-You-Like} .

# Sports Teams You Like 
# Examples from DBpedia
# :this l:likes dbpedia:Bendel_Insurance_F.C. .
# :this l:likes dbpedia:Birmingham_City_F.C. .

:this l:likes dbpedia:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-Sports-You-Like} .

# TV Programmes You Like 
# Examples from DBpedia
# :this l:likes dbpedia:EastEnders .
# :this l:likes dbpedia:Star_Trek:_Enterprise .

:this l:likes dbpedia:{last-part-of-HyperLink-based-Denotation-or-Name-following-last-slash-of-a-Programme-You-Like} .

### Turtle Document End ###

Conclusion

LInked Data deployment via Turtle document boils down to the following steps:

1. Create document
2. Add content in Turtle notation
3. Use relative URIs to denote (name) subjects, predicates, and objects (entity, attribute, values) in your digital 3-part sentences
4. Save document to a network location
5. Done.

The real magic kicks in when you come to realize that you can use WebID to enabled fine-grained access controls [1] over who has access to this gold-dust!

Links

1. http://bit.ly/NmGbMZ -- Using WebID ACLs to drive Social Relationship based resource access controls
2. http://bit.ly/QlQJLP -- Live Example via basic Linked Data page
3. http://bit.ly/S7P3cf -- Live Example via Faceted Browsing oriented page
3. http://bit.ly/Rx7RO5 -- Raw Turtle Data (think of this as Source Code for a Web of Linked Data machine) 

Related

1. http://bit.ly/RJzd9S -- Why Turtle Matters
2. http://www.w3.org/TeamSubmission/turtle/ -- Turtle Syntax Spec (original submission)
3. http://www.w3.org/TR/turtle/ -- W3C Recommendation .

#LinkedData #SemanticWeb #SocialWeb #Web30   #WebID   #DBpedia   #PDS  
6
1
Add a comment...