Warning:
This wiki has been archived and is now read-only.

Bookmarking and Tagging a Webpage

From Open Annotation Community Group
Jump to: navigation, search

Bookmarking and Tagging a Webpage

In the context of the World Wide Web, a bookmark is a locally stored Uniform Resource Identifier (URI). All modern web browsers include bookmark features (source: Wikipedia). Typically the URI is associated with a textual descriptions (or name or label) for improving human readability. A Tag is a label attached to someone or something for identification or other information. Typically tags are created attaching a free text label to a resource. With the emergence of the Linked Open Data method, semantic tagging or tagging through URIs is gaining popularity.

<< Back to the Cookbook

Example of Bookmarking and Tagging a Webpage

We here represent the bookmarking and the semantic tagging of a Wikipedia page of the APP (Amyloid Precursor Protein) Protein with two entries - identified by URIs - from two different databases/ontologies.

Error creating thumbnail: Unable to save thumbnail to destination


Open Annotation Representation

The Target of the annotation is a Wikipedia page. The annotation displays several Bodies. One body is a textual label. The other two are oa:SemanticTag. The URIs used as Semantic Tags are linked to the resource through foaf:page.

The Annotation instance exhibits an oa:annotatedBy - the agent responsible for entering the information that is used to generate the Annotation - and a oa:serializedBy - the agent, likely software, generating the serialization of the Annotation's graph. Annotation and generation dates are also associated.

Error creating thumbnail: Unable to save thumbnail to destination

In RDF format:

ex:anno a oa:Annotation ;
   oa:motivatedBy oa:bookmarking ;
   oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> ;
   oa:hasBody ex:uuid ;
   oa:hasBody ex:semtag1 ;
   oa:hasBody ex:semtag2 ;
   oa:annotatedBy ex:person1 ;
   oa:annotatedAt "2012-02-12T15:02:14Z" ;
   oa:serializedBy ex:software1 ;
   oa:serializedAt "2012-02-12T15:02:14Z" .
 
<http://en.wikipedia.org/wiki/Amyloid_precursor_protein> a dctypes:Text ;
   dc:format "text/html" .
 
ex:uuid a cnt:ContentAsText ;
   cnt:chars "Amyloid precursor protein (APP) on Wikipedia" ;
   cnt:characterEncoding "utf-8" .
 
ex:semtag1 a oa:SemanticTag ;
   foaf:page MGI:88059 .
 
MGI:88059 rdfs:label "amyloid beta (A4) precursor protein" .
 
ex:semtag2 a oa:SemanticTag ;
   foaf:page OMIM:104760 .
 
OMIM:104760 rdfs:label "AMYLOID BETA A4 PRECURSOR PROTEIN; APP" .
 
ex:person1 a foaf:Person ;
   foaf:mbox <mailto:john.doe@example.org> ;
   foaf:name "John Doe" .
 
ex:software1 a foaf:Agent, prov:SoftwareAgent ;
   foaf:name "ExAnnotator" .

Some SPARQL queries

Select all the annotations for the target http://en.wikipedia.org/wiki/Amyloid_precursor_protein

SELECT ?anno WHERE { 
   ?anno oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> . 
}
=> ex:anno

or

SELECT ?anno WHERE { 
   ?anno rdf:type oa:Annotation .
   ?anno oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> . 
}
=> ex:anno

Select all the annotations by ex:person1 for the target http://en.wikipedia.org/wiki/Amyloid_precursor_protein

SELECT ?anno WHERE { 
   ?anno oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> . 
   ?anno oa:annotator ex:person1 . 
}
=> ex:anno

Select all the annotations by ex:person1 that include semantic tags

SELECT ?anno WHERE { 
   ?anno oa:annotator ex:Person1 . 
   ?anno oa:hasBody ?tag .
   ?tag rdf:type oa:SemanticTag . 
}
=> ex:anno

Select all the semantic tags for the target http://en.wikipedia.org/wiki/Amyloid_precursor_protein

SELECT ?tag WHERE { 
   ?anno a oa:Annotation .
   ?anno oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> . 
   ?anno oa:hasBody ?tag . 
   ?tag rdf:type oa:SemanticTag .
}
=> semTag1, semTag2

Select all the pages for semantic tags on the target http://en.wikipedia.org/wiki/Amyloid_precursor_protein

SELECT ?page WHERE { 
   ?anno a oa:Annotation .
   ?anno oa:hasTarget <http://en.wikipedia.org/wiki/Amyloid_precursor_protein> . 
   ?anno oa:hasBody ?tag . 
   ?tag rdf:type oa:SemanticTag .
   ?tag foaf:page ?page .
}
=> MGI: 88059, OMIM:104760

Select all the annotation targets tagged with a semantic tag associated to a page OMIM:104760

SELECT ?target WHERE {  
   ?anno oa:hasTarget ?target .
   ?anno oa:hasBody ?tag .
   ?tag foaf:page OMIM:104760 .
   ?tag rdf:type oa:SemanticTag.
}
=> <http://alturl.com/wxidq>

Select semantic tags used together with a page OMIM:104760

SELECT ?tag WHERE {  
   ?anno oa:hasBody ?tag .
   ?tag foaf:page ?page
   ?tag foaf:page OMIM:104760 .
   ?tag rdf:type oa:SemanticTag . 
}
=> semTag1, semTag2


CREATOR: Paolo Ciccarese
LAST UPDATED: Feb 6, 2012

<< Back to the Cookbook