While this is easy to query it is not very clean semantically speaking since you link tag objects and tagged resources via string literals. In Nepomuk we use tag objects and relate tagged resources to the URI of this object.
- Querying objects on their tags is also simple: just get all resources that are related to the tag via the tagging property. - Getting a list of all tags is as easy as before: list all resources of type xesam:Tag (or nao:Tag in Nepomuk) - Querying all files without a tag is also simple (in sparql we use a filter) - listing all files with their associated tag's names is also not a big deal (a sparql query can easily be extended or one fetches tags and their labels for each file separately) - renaming of tags is much simpler than your method: only change one! property: the tag's label (in your version all tagged files have to be updated. - deleting a tag is as simple as deleting the tag resource and all triples referencing it. - having tags without files is trivial: tag resources can live on their own anyway. Hope this helps a bit. Keep in mind that with tag resources we leave the world of two-dimensional metadata which can be handled by databases like lucene. Cheers, Sebastian On Tuesday 24 June 2008 00:32:09 Mikkel Kamstrup Erlandsen wrote: > Hi all, > > I am starting this thread because I believe we need clarification on > how tags are employed and handling in Xesam. > > Currently we have a field xesam:userKeywords on xesam:Source being a > list of strings. We also have a child of the content category > xesam:Annotation called xesam:Tag. The latter is to allow us handle > tags as first class objects. > > The question is: "What do I store in xesam:userKeyword? the tag name > or a uri to the Tag object?". Here's what I propose: > > * Store the tag names in userKeyword, each tag name must be unique > and in fact constitutes an identifier > > * The Tag objects keep this tag name in their xesam:id field > > Why this is good: > - We can easily query objects on their tags > - We can easily get a list of all tags (query all Tag content with id!="") > - It handles all use cases found in > http://lists.freedesktop.org/archives/xesam/2007-December/000002.html > > Cheers, > Mikkel > _______________________________________________ > Xesam mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/xesam _______________________________________________ Xesam mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xesam
