Source for file Topic.interface.php

Documentation is available at Topic.interface.php

  1. <?php
  2. /**
  3. * @package org.phptmapi.core
  4. */
  5. require_once('TopicMapObject.interface.php');
  6. /**
  7. * @package org.tmapi.core
  8. */
  9. /**
  10. * Interface TopicInterface: Represents the topic map topic construct.
  11. *
  12. * @author Johannes Schmidt, Andreas Stephan - t8d <kontakt@t8d.de>
  13. */
  14. interface TopicInterface extends TopicMapObjectInterface{
  15. /**
  16. * addSubjectLocator: Adds the specified locator to the locators that reference the subject-constituting resources of this topic.
  17. * @param string $subjectLocator
  18. * @access public
  19. * @return void
  20. * @throws ModelConstraintException - if the XTM 1.0 processor model is enabled and this Topic already has one Locator in the subjectLocator set.
  21. * @throws MergeException - if the processor detects that a merge is required and either automerge is disabled or automerge is enabled but the merge cannot be completed for some other reason.
  22. * <code>
  23. * public function addSubjectLocator($subjectLocator){
  24. * throw new ModelConstraintException('Exception in '.__method__);
  25. * throw new MergeException('Exception in '.__method__);
  26. * }
  27. * </code>
  28. */
  29. public function addSubjectLocator($subjectLocator);
  30. /**
  31. * addType: Adds a type to this topic.
  32. * @access public
  33. * @param object TopicInterface $type The type-defining topic to be added.
  34. * @return void
  35. */
  36. public function addType(TopicInterface $type);
  37. /**
  38. * createOccurrence: Creates a new occurrence as a contained object in this topic.
  39. * @access public
  40. * @param string $value The occurrence data.
  41. * @param string $datatype An XML Schema Datatype.
  42. * @param object TopicInterface $type The occurrence type. If null, then the occurrence will be untyped.
  43. * @param array $scope An array of TopicInterface objects. If null, the occurrence will be in the unconstrained scope.
  44. * @return object OccurrenceInterface
  45. */
  46. public function createOccurrence($value, $datatype, $type, $scope);
  47.  
  48. /**
  49. * createUntypedTopicName: Creates a new untyped name for this topic.
  50. * @access public
  51. * @param string $value The string value of the topic name. Pass null to create a topic name with no name value.
  52. * @param array $scope An array of TopicInterface objects. If null, the topic name will be in the unconstrained scope.
  53. * @return object TopicNameInterface
  54. * @throws MergeException - if the processor detects that a merge is required and either automerge is disabled or automerge is enabled but the merge cannot be completed for some other reason. NOTE: This method will not raise this exception if the XTM 1.1 model is enabled, as untyped names do not cause merging under XTM 1.1.
  55. * <code>
  56. * public function createTopicName($value, $scope){
  57. * throw new MergeException('Exception in '.__method__);
  58. * }
  59. * </code>
  60. */
  61. public function createUntypedTopicName($value, $scope);
  62. /**
  63. * createTopicName: Creates a new typed topic name for this topic.
  64. * @access public
  65. * @param string $value The string value of the topic name. Pass null to create a topic name with no name value.
  66. * @param object TopicInterface $type A TopicInterface instance or null.
  67. * @param array $scope An array of TopicInterface objects. If null, the topic name will be in the unconstrained scope.
  68. * @return object TopicNameInterface
  69. * @throws MergeException - if the processor detects that a merge is required and either automerge is disabled or automerge is enabled but the merge cannot be completed for some other reason.
  70. * @throws UnsupportedOperationException - if the processor does not support the XTM 1.1 model.
  71. * <code>
  72. * public function createTopicName($value, $scope){
  73. * throw new MergeException('Exception in '.__method__);
  74. * }
  75. * public function createTopicName($value, $scope){
  76. * throw new UnsupportedOperationException('Exception in '.__method__);
  77. * }
  78. * </code>
  79. */
  80. public function createTopicName($value, $type, $scope);
  81.  
  82. /**
  83. * getOccurrences: Returns the occurrences defined for this topic. The return value may be an empty array, but is never null.
  84. * @access public
  85. * @return array An unmodifiable array of OccurrenceInterface objects.
  86. */
  87. public function getOccurrences();
  88.  
  89. /**
  90. * getReified: Returns an array of TopicMapObjectInterface instances that are subject of this topic. The return value may be an empty array, but is never null.
  91. * @access public
  92. * @return array
  93. */
  94. public function getReified();
  95.  
  96. /**
  97. * Returns the association roles in which this topic is a player. The return value may be an empty array, but is never null.
  98. * @access public
  99. * @return array An unmodifiable array of AssociationRoleInterface objects.
  100. */
  101. public function getRolesPlayed();
  102.  
  103. /**
  104. * getSubjectIdentifiers: Returns the locators which reference the subject-indicating resources of this topic. The return value may be an empty array, but is never null.
  105. * @access public
  106. * @return array An unmodifiable array of locators.
  107. */
  108. public function getSubjectIdentifiers();
  109.  
  110. /**
  111. * getSubjectLocators: Returns locators which reference the subject-constituting resources of this topic. The return value may be an empty array, but is never null.
  112. * @access public
  113. * @return array An unmodifiable array of locators.
  114. */
  115. public function getSubjectLocators();
  116.  
  117. /**
  118. * getTopicNames: Returns the topic names defined for this topic. The return value may be an empty array, but is never null.
  119. * @access public
  120. * @return array An unmodifiable array of TopicNameInterface objects.
  121. */
  122. public function getTopicNames();
  123.  
  124. /**
  125. * Returns the topics which define the types of this topic. The return value may be an empty array, but is never null.
  126. * @access public
  127. * @return array An unmodifiable array of TopicInterface objects.
  128. */
  129. public function getTypes();
  130. /**
  131. * mergeIn: Merges another topic into this topic. Merging a topic into this topic causes this topic to gain all of the characteristics of the other topic and to replace the other topic wherever it is used as a typing or scoping topic. After this method completes, other will have been removed from the topic map. NOTE: The other topic MUST belong to the same topic map instance as this topic!
  132. * @access public
  133. * @param object TopicInterface $other
  134. * @return void
  135. * @throws MergeException
  136. * @throws SubjectLocatorClashException if this topic and other have different, non-null values for the subject locator property and the XTM 1.0 processing model is enabled.
  137. * <code>
  138. * public function mergeIn(TopicInterface $other){
  139. * throw new MergeException('Exception in '.__method__);
  140. * throw new SubjectLocatorClashException('Exception in '.__method__);
  141. * }
  142. * </code>
  143. */
  144. public function mergeIn(TopicInterface $other);
  145. /**
  146. * addSubjectIdentifier: Adds the specified locator to the locators that reference the subject-indicating resources of this topic.
  147. * @access public
  148. * @param string $subjectIdentifier
  149. * @return void
  150. * @throws MergeException if the processor detects that a merge is required and either automerge is disabled or automerge is enabled but the merge cannot be completed for some other reason.
  151. * <code>
  152. * public function addSubjectIdentifier($subjectIdentifier){
  153. * throw new MergeException('Exception in '.__method__);
  154. * }
  155. * </code>
  156. */
  157. public function addSubjectIdentifier($subjectIdentifier);
  158.  
  159. /**
  160. * removeSubjectIdentifier: Removes the specified locator from the set of locators that reference the subject-indicating resources of this topic.
  161. * @access public
  162. * @param string $subjectIdentifier
  163. * @return void
  164. */
  165. public function removeSubjectIdentifier($subjectIdentifier);
  166.  
  167. /**
  168. * removeSubjectLocator: Removes the specified locator from the set of locators that reference the subject-constituting resources of this topic.
  169. * @access public
  170. * @param string $subjectLocator
  171. * @return void
  172. */
  173. public function removeSubjectLocator($subjectLocator);
  174.  
  175. /**
  176. * removeType: Removes a type from this topic.
  177. * @access public
  178. * @param object TopicInterface $type
  179. * @return void
  180. */
  181. public function removeType(TopicInterface $type);
  182. }
  183. ?>

Documentation generated on Fri, 30 Jun 2006 13:07:03 +0200 by phpDocumentor 1.3.0RC4