compared with
Current by Vladimir Alexiev
on Feb 25, 2013 15:48.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (16)

View Page History
h2. Tags Ontology

We use the [Tags Ontology|http://www.holygoat.co.uk/projects/tags/] ([tags.n3|http://www.holygoat.co.uk/owl/redwood/0.1/tags/tags.n3]), which defines:
- class tags:Tag as a subclass of skos:Concept. (This is perfect: when a skos:Concept is applied as a tag, it becomes tags:Tag.)
- two inverse properties (tags:taggedWithTag and tags:isTagOf) to relate any resource to a tag

The Tags ontology is depicted here:
@prefix rs-tag: <http://www.researchspace.org/thesaurus/tag/> .

rs-tag:1234 a tags:Tag, skos:Concept; skos:inScheme rs-tag:; skos:prefLabel "Watercolor".
?obj tags:taggedWithTag rkd-artist:Rembrandt, rs-tag:1234.
rkd-artist:Rembrandt tags:isTagOf ?obj.
rs-tag:1234 tags:isTagOf ?obj.
{noformat}

Design notes:
- tags.n3 will be loaded on next repo reload
- we use tags:isTagOf instead of tags:taggedWithTag, though they are inferred from each other as inverses
- the type tags:Tag is used to generate the counter for the next tag (in the above case would be 1235)
-- it is inferred from any of tags:isTagOf, tags:taggedWithTag

h1. Tags Use Cases


- Saves tag to OWLIM: URI saveTag(String label, URI thesaurusURI, URI objURI);
if thesaurusURI is null then it saves by default rs-tag(class RSConstants.RST_TAG) specified above;
if objURI is null then it saves the tag only;
- Assign tag to an object: void addTagToObj(URI assignTagToObj(URI tagURI, URI objURI);
- Gets tags for an object: Tag[] getTags(URI uriObj, String sort, String filter, String filtVal);
- Gets tags for an object: Tag\[\] getTags(URI uriObj);
- Deletes any statements that has been created for the tag: void deleteTag(URI removeTag(URI tagUri);
- Delete only statements(IS_TAG_OF) that has been created for the tag and the object: void deleteTagFromObj(URI removeTagFromObj(URI tagUri, URI objUri);
- Autocomplete Search tags into existing thesauruses: public Tag\[\] searchThesaurusTags(String searchVal)

TODO Jana & Svetoslav
- when saving to the dedicated thesaurus, make URL from the name
eg prefLabel = "water color" \-> URL = rs-tags:water_color

h1. Tags autocomplete - updating Lucene index with new values (design)

- We need an autocomplete on isTag thesauri
- We don't update or delete tags, we only add new ones
- the dedicated rs-tags: thesaurus (where new tags are added) is not searchable.
Many other isTag thesauri are searchable (in fact isSearchable => isTag because all searchable thesauri are interesting for tagging)
- Need to see new entries almost immediately in GUI
- We can differentiate between the search and tags autocomplete calls But it's preferred that the same FTS index be used in both cases
- If possible, implement this with OWLIM 5.3's incremental FTS indexing