Version 7 (modified by anonymous, 19 years ago) (diff) |
---|
Tagging API
fulfills use case: UseCaseTagging
implemented in gnowsis-server and the PIMO.
The code of the tagging-api is here: source:branches/gnowsis0.9/gnowsis-server/src/java/org/gnowsis/pimo/TaggingApi.java
Example to use the tagging API from inside gnowsis:
// tag the file c:/semanticweb/blub.pdf with the ontology instance Semantic+Web Gnowsis.getTaggingApi().addTagToResource("gnowsis://sauermann@serv-3100.dfki.uni-kl.de/resources/pimo/Semantic+Web", "file:/c:/semanticweb/blub.pdf");
Using Tagging API from other applications via HTTP
To use the TagingAPI from Mozilla Firefox and Thunderbird, tags are transmitted as comma separated list via httprequest.
Request from Mozilla Thunderbird:
- get me tags that contain this string X. Things have to have X in label, altLabel, wikiname or wikitext
- string x
- result:
- list of:tag-uri + tag + class of tag
- get me tags fitting to this email:
- message-id
- subject
- body
- result:
- list of:tag-uri + tag + class of tag
- get me the tags that are already associated to this email(s) (input either one e-mail or many) (has to be fast-as-hell). Used to augment the display of large lists of emails, for example the inbox.
- message-id
- result:
- list of:tag-uri + tag + class of tag
- tag this e-mail using that tag:
- message-id
- tag-uri
- operation: add tag/remove tag
- result:
- ok/error
- tag this e-mail using that tag-name:
- message-id
- tag-name (the label)
- operation: add tag/remove tag
- result:
- has to create a NEW TAG if tag-name does not exists, creates a URI for the tag.
- return new tag-uri + ok/error
To identificate an email, we should use the Message-ID and not the mail-uri, because if an email is moved to another folder we will loss the relation of the tags to this mail.