Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History


Linked Objects in Free Text

Various RS objects can be linked into free text (annotation text or forum post). The user can paste any Data Basket item using the editor toolbar, and we want to track all Item Types except:

  • Forum: forum post linking is handled by jForum
  • Image: We currently don't have a display of image alone
  • Text Snippet which: pasted itself, has no URI
  • Web Link: represented as a normal URL in the text, doesn't need to be tracked

Link Types

Links are represented in the text like this:

Link Class Item Type Sample URL Note
linkMO rso:FC70_Thing Museum Object
linkStatement rdf:Statement Annotation Point
linkDataAnnotation rso:DataAnnotation TODO  
linkImageAnnotation rso:ImageAnnotation]  
linkSearch rso:Search TODO  

Related Object to Annotation/Post

In the first tab of a Museum Object (Object Details), we want to show all related annotations and forum posts. Related annotations/posts for an object are the ones that mention it or its fields.

An annotation/post is related to an object ?obj iff: there is an ?uri in the free-text such that:

Link to Conditions Notes
object itself ?uri a rso:FC70_Thing. ?uri=?obj
annotation point ?uri a rdf:Statement; dcterms:isPartOf ?obj See Open Annotation Collaboration (OAC)#Annotation with OAC and Reification
data annotation {?uri a rso:DataAnnotation; oac:hasTarget ?obj} UNION {?uri a rso:DataAnnotation; oac:hasTarget ?st. ?st a rdf:Statement; dcterms:isPartOf ?obj} See same

Link Data Model

Since Links are pasted from the Data Basket, they are similar to the Bookmark Data Model

Property Notes
rdf:type rso:Link (new class)
oac:hasBody oac:Body (for annotations) or rso:Forum (for a post). See note below
oac:hasTarget ?uri pointing to one of the [#Link Item Types]
rso:root if ?uri matches one of the conditions above, the respective rso:FC70_Thing

Note about hasBody:

  • For annotation: points to the oac:Body of the annotation. The annotation text is stored in oac:hasBody/rso:P3_has_description.
  • For forum post: they are stored in jForum, not OWLIM. We generate URIs like (where 123 is the forum ID), and mark the URI with rso:Forum (new class)

Link Data Example

Here is a comprehensive example:

  1. Data annotation <object/123/annot/23> mentions <object/456>
  2. Forum post 321 mentions data annotation <object/456/annot/45> of <object/456>
  3. Image annotation <pic.tif/annot/67> mentions annotation point <st/56> of <object/456>
<link/1> a rso:Link;
  oac:hasBody <object/123/annot/23/body>;
  oac:hasTarget <object/456>;
  rso:root <object/456>.

<forum/123> a rso:Forum;
<link/2> a rso:Link;
  oac:hasBody <forum/123>;
  oac:hasTarget <object/456/annot/45/body>;
  rso:root <object/456>.

<link/3> a rso:Link;
  oac:hasBody <pic.tif/annot/67/body>;
  oac:hasTarget <st/56>;
  rso:root <object/456>;

All of these statements (incl "a rso:Forum") need to be created, except the last line.

Link Data Illustration

The figure above shows the same example, plus the extra statements that make the link to <object/456>.

Link API

Annotation's content is stored as text and we need to parse it and find out if any links to objects are present. We will do that when saving annotation/post.

If any linked objects are present in text, we need to refresh the list of related objects for the annotation/post in OWLIM. That is, each time annotation/post is edited we need to parse and recreate the list per annotation/post.

When an, we need to parse the text and extract linked objects. We search for links like:

Storing related objects

We collect the URIs of the MO/AP. If it is Annotation Point, then we load it and get URI if the object it belongs to. (See APLink class and APLink.annotationPoint.main)

After annotation is saved (so that we have the annotation's URI for new annotations), we recreate the list of related objects for this annotation. That is, we delete all related objects and create a new list that contains the latest ones.

Same goes for the forum posts.

Related objects are stored using a method in the DMS2RDF class.

Retrieving related objects

There will be 2 methods in DMS2RDF:

Unknown macro: {warn}

Jana, don't you also need to list the data annotations of the object even if they don't mention the object?

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.