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

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

Changes (9)

View Page History
h2. Tags Ontology

We use the [Tags Ontology|] ([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: <> .

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.

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

if objURI is null then it saves the tag only;
- Assign tag to an object: void assignTagToObj(URI tagURI, URI objURI);
- Gets tags for an object: Tag\[\] getTags(URI uriObj, String sort, String filter, String filtVal);
- Deletes any statements that has been created for the tag: void removeTag(URI tagUri);
- Delete only statements(IS_TAG_OF) that has been created for the tag and the object: void removeTagFromObj(URI tagUri, URI objUri);
- 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