Interface TopicMap

Description

Represents a topic map item.

Represents a topic map item. See http://www.isotopicmaps.org/sam/sam-model/#d0e657. Inherited method getParent() from Construct returns null.

Located in /core/TopicMap.interface.php (line 26)

Construct
   |
   --Reifiable
      |
      --TopicMap
Method Summary
void close ()
Association createAssociation (Topic $type, [ $scope = array()])
Topic createTopicByItemIdentifier (string $itemIdentifier)
Topic createTopicBySubjectIdentifier (string $subjectIdentifier)
Topic createTopicBySubjectLocator (string $subjectLocator)
array getAssociations ()
Construct|null getConstructById (string $id)
Construct|null getConstructByItemIdentifier (string $itemIdentifier)
Index getIndex (string $className)
string getLocator ()
Topic|null getTopicBySubjectIdentifier (string $subjectIdentifier)
Topic|null getTopicBySubjectLocator (string $subjectLocator)
array getTopics ()
void mergeIn (TopicMap $other)
Methods
close (line 215)

Closes use of this topic map instance.

Closes use of this topic map instance. This method should be invoked by the application once it has finished using this topic map instance. Implementations may release any resources required for the TopicMap instance or any of the Construct instances contained by this instance.

  • access: public
void close ()
createAssociation (line 108)

Creates an Association in this topic map with the specified type and scope.

Creates an Association in this topic map with the specified type and scope.

Association createAssociation (Topic $type, [ $scope = array()])
  • Topic $type: The association type.
  • array $scope: An array containing Topics - each representing a theme. If the array's length is 0 (default), the association will be in the unconstrained scope.
createTopic (line 175)

Returns a Topic instance with an automatically generated item identifier.

Returns a Topic instance with an automatically generated item identifier. This method returns never an existing Topic but creates a new one with an automatically generated item identifier. How that item identifier is generated depends on the implementation.

  • return: The newly created Topic instance with an automatically generated item identifier.
  • access: public
Topic createTopic ()
createTopicByItemIdentifier (line 130)

Returns a Topic instance with the specified item identifier.

Returns a Topic instance with the specified item identifier. This method returns either an existing Topic or creates a new Topic instance with the specified item identifier. If a topic with the specified item identifier exists in the topic map, that topic is returned. If a topic with a subject identifier equals to the specified item identifier exists, the specified item identifier is added to that topic and the topic is returned. If neither a topic with the specified item identifier nor with a subject identifier equals to the subject identifier exists, a topic with the item identifier is created.

Topic createTopicByItemIdentifier (string $itemIdentifier)
  • string $itemIdentifier: The item identifier the topic should contain; must not be null.
createTopicBySubjectIdentifier (line 150)

Returns a Topic instance with the specified subject identifier.

Returns a Topic instance with the specified subject identifier. This method returns either an existing Topic or creates a new Topic instance with the specified subject identifier. If a topic with the specified subject identifier exists in the topic map, that topic is returned. If a topic with an item identifier equals to the specified subject identifier exists, the specified subject identifier is added to that topic and the topic is returned. If neither a topic with the specified subject identifier nor with an item identifier equals to the subject identifier exists, a topic with the subject identifier is created.

  • return: A Topic instance with the specified subject identifier.
  • throws: ModelConstraintException If the subject identifier sid is null.
  • access: public
Topic createTopicBySubjectIdentifier (string $subjectIdentifier)
  • string $subjectIdentifier: The subject identifier the topic should contain; must not be null.
createTopicBySubjectLocator (line 162)

Returns a Topic instance with the specified subject locator.

Returns a Topic instance with the specified subject locator. This method returns either an existing Topic or creates a new Topic instance with the specified subject locator.

  • return: A Topic instance with the specified subject locator.
  • throws: ModelConstraintException If the subject locator slo is null.
  • access: public
Topic createTopicBySubjectLocator (string $subjectLocator)
  • string $subjectLocator: The subject locator the topic should contain; must not be null.
getAssociations (line 50)

Returns all Associations contained in this topic map.

Returns all Associations contained in this topic map. The return value may be an empty array but must never be null.

  • return: An array containing a set of Associations.
  • access: public
array getAssociations ()
getConstructById (line 94)

Returns a Construct by its (system specific) identifier.

Returns a Construct by its (system specific) identifier. If no construct with the specified identifier exists, this method returns null.

  • return: The construct with the specified id or null if such a construct is unknown.
  • access: public
Construct|null getConstructById (string $id)
  • string $id: The identifier of the construct to be returned.
getConstructByItemIdentifier (line 83)

Returns a Construct by its item identifier.

Returns a Construct by its item identifier. If no construct with the specified item identifier exists, this method returns null.

  • return: A construct with the specified item identifier or null if no such construct exists in the topic map.
  • access: public
Construct|null getConstructByItemIdentifier (string $itemIdentifier)
  • string $itemIdentifier: The item identifier of the construct to be returned.
getIndex (line 204)

Returns the specified index.

Returns the specified index.

  • return: An index.
  • throws: FeatureNotSupportedException If the implementation does not support indices, if the specified index is unsupported, or if the specified index does not exist.
  • access: public
Index getIndex (string $className)
  • string $className: The classname of the index.
getLocator (line 34)

Returns the storage address that is defined in TopicMapSystem::createTopicMap().

Returns the storage address that is defined in TopicMapSystem::createTopicMap().

  • return: A URI which is the storage address of the TopicMap.
  • access: public
string getLocator ()
getTopicBySubjectIdentifier (line 61)

Returns a topic by its subject identifier.

Returns a topic by its subject identifier. If no topic with the specified subject identifier exists, this method returns null.

  • return: A topic with the specified subject identifier or null if no such topic exists in the topic map.
  • access: public
Topic|null getTopicBySubjectIdentifier (string $subjectIdentifier)
  • string $subjectIdentifier: The subject identifier of the topic to be returned.
getTopicBySubjectLocator (line 72)

Returns a topic by its subject locator.

Returns a topic by its subject locator. If no topic with the specified subject locator exists, this method returns null.

  • return: A topic with the specified subject locator or null if no such topic exists in the topic map.
  • access: public
Topic|null getTopicBySubjectLocator (string $subjectLocator)
  • string $subjectLocator: The subject locator of the topic to be returned.
getTopics (line 42)

Returns all Topics contained in this topic map.

Returns all Topics contained in this topic map. The return value may be an empty array but must never be null.

  • return: An array containing a set of Topics.
  • access: public
array getTopics ()
mergeIn (line 194)

Merges the topic map other into this topic map.

Merges the topic map other into this topic map. All Topics and Associations and all of their contents in other will be added to this topic map. All information items in other will be merged into this topic map as defined by the Topic Maps - Data Model (TMDM) merging rules. See http://www.isotopicmaps.org/sam/sam-model/#sect-merging. The merge process will not modify other in any way. If $this->equals($other) no changes are made to the topic map.

  • access: public
void mergeIn (TopicMap $other)
  • TopicMap $other: The topic map to be merged with this topic map instance.

Inherited Methods

Inherited From Reifiable

Reifiable::getReifier()
Reifiable::setReifier()

Inherited From Construct

Construct::addItemIdentifier()
Construct::equals()
Construct::getId()
Construct::getItemIdentifiers()
Construct::getParent()
Construct::getTopicMap()
Construct::hashCode()
Construct::remove()
Construct::removeItemIdentifier()

Documentation generated on Sat, 15 Jan 2011 20:02:27 +0100 by phpDocumentor 1.4.1