Class TagManager

Description

The TagManager handles the creation and retreval of tags.

  • version: $Id: TagManager.class.php,v 1.5 2007/09/04 20:53:12 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College
  • since: 11/1/06

Located in /harmoni/core/Tagging/TagManager.class.php (line 41)

OsidManager
   |
   --TagManager
Method Summary
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
void deleteItems (mixed $items)
object IdIterator getAgentIds ()
array getConfigurationForSystem (string $system)
object getCurrentUserId ()
integer getDatabaseIndex ()
string getItemClassForSystem (string $system)
object OsidContext getOsidContext ()
object TagIterator getTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getTagsByAgent (object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getTagsForItemIds (mixed $ids, string $system, [string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getTagsForItems (mixed $items, [string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getTagsForItemsByAgent (mixed $items, object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getTagsForItemsNotByAgent (mixed $items, object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getUserTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
object TagIterator getUserTagsForItems (mixed $items, [string $sortBy = TAG_SORT_ALFA], integer $max)
Methods
assignConfiguration (line 453)

Assign the configuration of this OsidManager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void assignConfiguration (object Properties $configuration)
  • object Properties $configuration: (original type: java.util.Properties)

Redefinition of:
OsidManager::assignConfiguration()
Assign the configuration of this OsidManager.
assignOsidContext (line 598)

Assign the context of this OsidManager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: NULL_ARGUMENT
void assignOsidContext (mixed $context, object OsidContext $context )
  • object OsidContext $context

Redefinition of:
OsidManager::assignOsidContext()
Assign the context of this OsidManager.
deleteItems (line 378)

Delete the item and all tags for it. This should be done when deleting the thing the item represents

  • since: 11/2/06
  • access: public
void deleteItems (mixed $items)
  • mixed $items: This can be a single Item object, an TaggedItemIterator, or an array of Item objects.
getAgentIds (line 505)

Answer agentIds that have stored tags

  • since: 11/1/06
  • access: public
object IdIterator getAgentIds ()
getConfigurationForSystem (line 464)

Return configuration of this OsidManager.

  • access: public
array getConfigurationForSystem (string $system)
  • string $system
getCurrentUserId (line 535)

Answer the current user id

  • since: 11/6/06
  • access: public
object getCurrentUserId ()
getCurrentUserIdString (line 564)

Answer the current user id string value

  • since: 11/6/06
  • access: public
string getCurrentUserIdString ()
getDatabaseIndex (line 494)

Answer the database index

  • since: 11/6/06
  • access: public
integer getDatabaseIndex ()
getItemClassForSystem (line 477)

Return the destination Item class for a given system

  • since: 11/6/06
  • access: public
string getItemClassForSystem (string $system)
  • string $system
getOsidContext (line 583)

Return context of this OsidManager.

  • access: public
  • throws: object OsidException
object OsidContext getOsidContext ()

Redefinition of:
OsidManager::getOsidContext()
Return context of this OsidManager.
getTags (line 113)

Answer the tags created by any agent

  • since: 11/1/06
  • access: public
object TagIterator getTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getTagsByAgent (line 56)

Answer the tags created by a given agent

  • since: 11/1/06
  • access: public
object TagIterator getTagsByAgent (object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • object Id $agentId
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getTagsForItemIds (line 432)

Answer the tags for one or more item ids

  • since: 11/1/06
  • access: public
object TagIterator getTagsForItemIds (mixed $ids, string $system, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • mixed $ids: The ids of the item to return tags for. This can be a single Id object, an IdIterator, or an array of Id objects.
  • string $system: The name of the system that the items are accessed through.
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getTagsForItems (line 155)

Answer the tags for one or more items

  • since: 11/1/06
  • access: public
object TagIterator getTagsForItems (mixed $items, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • mixed $items: The items to return tags for. This can be a single Item object, an ItemIterator, or an array of Item objects.
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getTagsForItemsByAgent (line 228)

Answer the tags by the given agent for one or more items

  • since: 11/10/06
  • access: public
object TagIterator getTagsForItemsByAgent (mixed $items, object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • mixed $items: The items to return tags for. This can be a single Item object, an ItemIterator, or an array of Item objects.
  • object Id $agentId
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getTagsForItemsNotByAgent (line 313)

Answer the tags not created by the given agent for one or more items

  • since: 11/10/06
  • access: public
object TagIterator getTagsForItemsNotByAgent (mixed $items, object Id $agentId, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • mixed $items: The items to return tags for. This can be a single Item object, an ItemIterator, or an array of Item objects.
  • object Id $agentId
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getUserTags (line 98)

Answer the tags created by the current user

  • since: 11/1/06
  • access: public
object TagIterator getUserTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getUserTagsForItems (line 295)

Answer the tags created by the current user for one or more items

  • since: 11/1/06
  • access: public
object TagIterator getUserTagsForItems (mixed $items, [string $sortBy = TAG_SORT_ALFA], integer $max)
  • mixed $items: The items to return tags for. This can be a single Item object, an ItemIterator, or an array of Item objects.
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.

Inherited Methods

Inherited From OsidManager

OsidManager::assignConfiguration()
OsidManager::assignOsidContext()
OsidManager::getOsidContext()
OsidManager::osidVersion_2_0()

Documentation generated on Wed, 19 Sep 2007 10:27:13 -0400 by phpDocumentor 1.3.0RC3