-
Notifications
You must be signed in to change notification settings - Fork 1
TUI syntax
We are sticking to a form of RDF which means every #tui message MUST have a
<subject> <predicate> <object>To start with we will only be working on the 'Liking' of an annotation. This is the simplest form of the #tui syntax. We will aim to 'like' this annotation here: http://www.arabidopsis.org/servlets/TairObject?type=gene&name=AT1G01040.1
It will be assumed that the following lines will need to be included in the #tui messages (for starters)
@prefix : <http://purl.org/tui/> //BASE PREFIX
@prefix dc: <http://purl.org/dc/elements/1.1/>
@prefix tui: <http://purl.org/tui/>
@prefix twitter: <http://twitter.com/>
@prefix statusnet: <http://status.net/>
@prefix tairg: <http://www.arabidopsis.org/servlets/TairObject?type=gene&name=> If the message does not have a prefix then the default one would be tui:
Note: As of 2012-01-10 Mark has suggested we drop the colon in front of the :I :Like.
#tui I like tairg:AT1G01040.1
//would mean:
#tui tui:I tui:like tairg:AT1G01040.1//example one
#tui tui:I tui:like tairg:AT1G01040.1
//example two
#tui tui:I tui:dislike tairg:AT1G01040.1Note that tui:I states that the owner/user of this tweet/message is who likes the object.
We also allow tui: to be removed from the message.
//example three
#tui I like tairg:AT1G01040.1
//example four
#tui I dislike tairg:AT1G01040.1#tui tairg:AT1G01040.1 dc:title "new title"#tui tairg:AT1G01040.1 tui:comment "comment"Because we allow strings to be posted in #tui messages we have defined the format in which we define a string in a #tui message. The first two tokens (separated by whitespace) are ALWAYS URI's. The last token can be either a URI or a string. Because it could be either, the value hello:world could be a string but the parser would identify it as a URI.
String Rules
- Characters that are surrounded in quote marks (" data ") will ALWAYS be interpreted as a string.
- Characters for the last token (the object) are treated as a URI only if it contains no whitespace and no surrounding quotations.
- If you need to have a colon in a string it is wise to place it inside quote marks.
- If the last token does contain whitespace - it is considered a string.
- It does not need to be surrounded by quotations
- If it is NOT surrounded by quotations then the string is terminated by the end of the tweet/message.
"this is a string"
this is a string
"this:string"
"data"tui:like
nota:string
http://purl.org/tui/
http://www.facebook.com/RDF statements generally describe URI's. The definition states that the <subject> and the <predicate> MUST be URI's.
So if we take the liking example we previously mentioned - it actually resolves to this:
#tui I like tairg:AT1G01040.1
//would mean:
#tui tui:I tui:like tairg:AT1G01040.1
//would ACTUALLY mean
http://purl.org/tui/I http://purl.org/tui/like http://www.arabidopsis.org/servlets/TairObject?type=gene&name=AT1G01040.1- http://groups.csail.mit.edu/haystack/blog/2008/11/06/a-quick-tutorial-on-the-tutrle-rdf-serialization/ - Quick tutorial on RDF Turtle
- http://www.w3.org/TeamSubmission/turtle/ - Official Turtle Definition