Glen Daniels wrote:
Hi Chathura!
Well Glen's suggestion was that this is not needed and that a resource
can be tagged multiple times with the same tag. The bug is really that
the registry throws an exception when this is attempted. Glen and
Jonathan might have more details on this.
A resource can be tagged with the same tag by multiple users. But
IMHO we shouldn't allow the *same user* to tag a resource multiple
times with the same tag. It breaks some concepts of taggings. We use
tag count (number of taggings done on a resource using a tag) as a
method to determine the relevance of a tag to a resource. We
highlight the tags in the tag cloud according to the tag count. If we
allow the above scenario, a user can tag his resource with the same
tag multiple times and artificially increase the tag count of that
resource. This could mislead other users about the relevance of that
tag on that resource.
Nope. :)
Tagging through the Java API or the Web protocol should be a
repeatable, idempotent operation. We should not be incrementing the
"tag count" when a user tags a resource that they've already tagged
with the same string - and the back-end should take care of this for
us transparently. Asking the client to do it is unnecessary and
error-prone (as we've seen from the Mashup team's issue).
pseudocode JDBCReg:tag(path, tag) {
if (exists(path, tag, currentUser)) return;
put new tagging(path, tag, currentUser) in db;
}
pseudocode RemoteReg:tag(path, tag) {
// Always just post, since you can only have one of this tag per user
POST(path + ";tags", "tag=" + tag);
}
Got it :) Will do it as above.
Chathura
Thanks,
--Glen
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev