ld4 l triannon
TRANSCRIPT
Use Case 1.2:
Tag Scholarly Information Resourcesto Support Reuse
L D 4 L W O R K S H O P
S TA N F O R D U N I V E R S I T Y
F E B R U A RY 2 3 , 2 0 1 5
Naomi Dushay / [email protected]
“… As a librarian, I would like to tag resources into curated
lists … so that I can feed these these lists into subject guides,
course reserves, or reference collections.
“I'd like these lists to be portable (into Drupal, LibGuides, etc.)
and durable.
“I'd like these lists/tags to selectively feed back into the
discovery environment without having to modify the catalog
records.”
(shortened …)
Requirements:
• Create and manage tags/annotations in any client or environment
• Retrieve tags/annotations to display in any client
• Chosen identifiers, not necessarily catalog ids
Need:
• A model for annotations
• A format to serialize them into
• A protocol to transfer the serializations between systems
• Storage for tags/annotations
• Restful searching for tags/annotations
• Implementations!
Triannon: Back End Annotation Store
Model: Open Annotation
http://www.openannotation.org/spec/core/
http://www.w3.org/TR/annotation-model/ (beta)
Serialization Format: JSON-LD (or turtle or …)
{
"@context": "http://www.w3.org/ns/oa-context-20130208.json",
"@id": "http://triannon.stanford.edu/annotations/123",
"@type": "oa:Annotation”,
"motivatedBy":"oa:commenting",
"hasBody": {
"@type": "cnt:ContentAsText",
"chars": ”Linked Data is the future",
"format": "text/plain"
},
"hasTarget": [
"http://searchworks.stanford.edu/view/10594400",
"http://worldcat.org/entity/work/id/872987681"
]
}
Transfer Protocol: Linked Data Platform
• Triples?
• Graph Object?
• Groups of Triples?
“Linked Data Platform (LDP) defines a set of rules for HTTP
operations on web resources, some based on RDF, to provide
an architecture for read-write Linked Data on the web.”
http://www.w3.org/TR/LDP/
https://flic.kr/p/5UNWTt
In Reality ...
• Multiple resources to manage, each requires a POST
• Binary or external resources with descriptions tricky
• Multiple JSON-LD contexts complex (IIIF, OA, ...)
Want:
• Ease of use/implementation for annotation client
• Ability to swap back-end to other LDP system
• Integration with Rails environment
• Search with Solr (easy) not SPARQL (less easy)
Triannon: Implementation Goals
• Rapid Development
• Modular
• Re-Usable
• Deployable
• Maintainable
Triannon: Rails Engine Gem
REST over
HTTP
Create POST jsonld, turtle, rdfxml
Read GET "
Update PUT/PATC
H
"
Delete DELETE (id)Model ActiveRecord ActiveModel LDP
View (for apps and developers) jsonld, turtle, rdfxml
Controller
http://github.com/sul-dlss/triannon
Triannon Client: Search and Display
Triannon (Solr)Client App
http://triannon/by_target?url=purl.stanford.edu\/bd136jk4522
http://triannon/by_tag?tag=food+sustainability
http://triannon/search?q=dragons
'response'=>{'numFound'=>3,'start'=>0,'maxScore'=>1.0,'docs'=>[
{
'id'=>'98206ec8-4def-44b8-b190-648d8224ce1c’,
'anno_jsonld'=>'{"@context":"http://www.w3.org/ns/oa.jsonld","@graph":[{"@id":"_:g700389243
72700","@type":["dctypes:Text","cnt:ContentAsText"], "format":"text/plain”, "chars":”Linked Data
is Awesome. Also Dragons”},{"@id":"https://triannon-
dev.stanford.edu/annotations/98206ec8-4def-44b8-b190-
648d8224ce1c","@type":"oa:Annotation","hasBody":"_:g70038924372700","hasTarget":"http://purl.stanford.
edu/bd136jk4522","motivatedBy":"oa:commenting"}]}',
...},
{
'id'=>'f691b921-6f54-415b-9dfb-0d017f0d8ada',
...
Triannon Client App
ActiveTriples
ld4l-open_annotation_rdf
triple store(in memory)
RDF
Triannon Client: Create, Update, Delete
Triannon
id
html
form
jsonld from
RDF::Graph
• User Authentication/Authorization
• Broader Types of Annotations
• Easy Way to Include Tagged Collections Elsewhere
(e.g. research guides in Drupal)
• Cross Institutional Data, Searching
• Search text of tags and comments with other
metadata in SearchWorks
• Ordered Lists
Remaining Work
• Chris Beer: Fedora 4, LDP for Fedora 4
• Naomi Dushay: Triannon, Solr, SearchWorks
• Christopher Jesudurai: SearchWorks UI
• Willy Mene: Triannon LDP
• Rob Sanderson: Architecture, Specs, Cat Herding
Contributors (Stanford)
UC1 Bibliographic & Curation Data: Ontologies Discussion
L D 4 L W O R K S H O P
S TA N F O R D U N I V E R S I T Y
F E B R U A RY 2 3
Rob Sanderson / [email protected] / @azaroth42
Requirements Refresher
• Annotations on digital content
• Annotations on abstract "Works"
• Ordered lists of "Works"
• ... created from Annotations
Open Annotation
http://www.openannotation.org/spec/core/
http://www.w3.org/TR/annotation-model/ (beta)
Open Annotation: MotivationsMotivation Description
oa:bookmarking Recording a resource or point of interest
oa:classifying Assigning a class to a resource
oa:commenting Providing a review or comment
oa:describing Describing the resource
oa:editing Requesting a change to the resource
oa:highlighting Region or span of interest to highlight
oa:identifying Assigning an identifier to a resource
oa:linking Linking another resource to the target
oa:moderating Assignment of value or quality
oa:questioning Asking a question about the resource
oa:replying Replying to previous statement or question
oa:tagging Tagging a resource
JSON-LD Annotation Format{
"@context": "http://www.w3.org/ns/oa-context-20130208.json",
"@id": "http://www.example.org/annotations/1",
"@type": "oa:Annotation”,
"motivatedBy":"oa:commenting",
"hasBody": {
"@type": "cnt:ContentAsText",
"chars": "I love this book!",
"format": "text/plain"
},
"hasTarget": "http://purl.stanford.edu/bd136jk4522"
}