Tags

From HNS.dev

Jump to: navigation, search

A number of tables support tags. These objects can be supplied with tags by users, which are joined together to form a tag cloud. This tag cloud can subsequently be compared with the tag cloud of other objects.

Contents

[edit] Add tags

Tags can be added to objects with an insert- or update-query. The fieldname for this is tags and the individual tags are separated by blank spaces, like:

<update>
<document id="1">
<tags>education university -vwo</tags>
</document>
</update>

In this exmple the tags education and university are added to the document referred to. If this user has added the tag vwo before, it is removed. For this the dash is used (-).

[edit] Search Tags

Tags can be read with a selectquery. For example:

<query>
<select>tags</select>
<from>document</from>
<where>id = 1</where>
</query>

If tags where defined as before, this example gives the following output:

<?xml version="1.0" encoding="UTF-8"?>
<query hash="d2c112f08d51160801448fdbb80247c54f49c0e1">
<person id="1">
<tags>
<tag>
<name>education</name>
<weight>1.00</weight>
</tag>
<tag>
<name>university</name>
<weight>1.00</weight>
</tag>
</tags>
</person>
</query>

[edit] Matching Tags

It is possible to search for objects based on their tag cloud. These can be compared with the tag cloud of another object uing the match-function.

[edit] See also

contact us | terms and conditions Creative Commons License
© 2009 - Stichting Het Nieuwe Stemmen
THE DEVELOPMENT OF HNS.DEV WAS MADE POSSIBLE BY A CONTRIBUTION OF KNOWLEDGELAND THROUGH THE DIGITAL PIONEERS EPARTICIPATION ROUND REGULATION (WHICH WAS INITIATED BY THE MINISTRY OF THE INTERIOR AND KINGDOM RELATIONS). DIGITAL PIONIEERS GIVES FINANCIAL AND ORGANISATORIAL SUPPORT TO INNOVATIVE INTERNET INITIATIVES.