Source for file TopicMapObject.interface.php

Documentation is available at TopicMapObject.interface.php

  1. <?PHP
  2. /**
  3. * @package org.phptmapi.core
  4. */
  5. /**
  6. * Interface TopicMapObjectInterface: The base class for all objects in the PHPTMAPI system which represent constructs in a topic map. Every topic map object may be created from any number of input sources (typically markup in some topic map interchange format), each of which may have a separate address. In addition, the PHPTMAPI TopicMapObjectInterface may "wrap" one or more objects in an underlying topic map processing system.
  7. *
  8. * @author Johannes Schmidt - t8d <kontakt@t8d.de>
  9. */
  10. interface TopicMapObjectInterface{
  11. /**
  12. * Returns a topic map-specific identifier for this object. The identifier returned must be guaranteed to be unique across all TopicMapObjectInterface instances from the same TopicMapInterface instance.
  13. * @access public
  14. * @return string
  15. */
  16. public function getObjectId();
  17. /**
  18. * getItemIdentifiers: Returns the array of item identifiers for this object. Item identifiers are identifiers for the object and can be freely assigned in order to be used to refer to the object. Note that on XTM import item identifiers MUST be assigned that refer to the XTM elements that gave rise to the object, providing the XTM element had an id attribute. The return value may be an empty array, but is never null.
  19. * @access public
  20. * @return array
  21. *
  22. */
  23. public function getItemIdentifiers();
  24. /**
  25. * getTopicMap: Returns the topic map to which this object belongs. If the object is an instance of the TopicMapInterface interface, then it should return itself.
  26. * @access public
  27. * @return object TopicMapInterface
  28. */
  29. public function getTopicMap();
  30. /**
  31. * getParent: Gets the parent object of a TopicMapObjectInterface. AssociationRole[child]->Association[parent], Occurrence[child]->Topic[parent], TopicName[child]->Topic[parent], Variant[child]->TopicName[parent], Topic[child]->TopicMap[parent], Association[child]->TopicMap[parent], TopicMap->null.
  32. * @access public
  33. * @return object TopicMapObjectInterface
  34. */
  35. public function getParent();
  36. /**
  37. * remove: Removes the object.
  38. * @access public
  39. * @return void
  40. * @throws TMAPIException if the object cannot be removed. Derived interfaces may define specific circumstances under which a subclass of TMAPIException must be raised - topic throws a TopicInUseException. Implementations MUST NOT use a TMAPIException to wrap a failure raised in the underlying engine - such errors must always be wrapped in a TMAPIRuntimeException.
  41. * <code>
  42. * public function remove(){
  43. * throw new TMAPIException('Exception in '.__method__);
  44. * }
  45. * </code>
  46. */
  47. function remove();
  48. /**
  49. * addItemIdentifier: Adds a locator to the item identifiers for this object. It is not allowed to have two TopicMapObjectInterfaces in the same topic map with the same item identifier. If the two objects are TopicInterface objects, then they must be merged. If at least one of the two objects is not a TopicInterface object, a DuplicateItemIdentifierException must be reported.
  50. * @param string $itemIdentifier The locator to be added.
  51. * @access public
  52. * @return void
  53. * @throws DuplicateItemIdentifierException if there is already a topic map object in the same topic map with this item identifier.
  54. * <code>
  55. * public function addItemIdentifier($itemIdentifier){
  56. * throw new DuplicateItemIdentifierException('Exception in '.__method__);
  57. * }
  58. * </code>
  59. */
  60. public function addItemIdentifier($itemIdentifier);
  61.  
  62. /**
  63. * removeItemIdentifiers: Removes a locator from the set of item identifiers for this object.
  64. * @param string $itemIdentifier
  65. * @access public
  66. * @return void
  67. */
  68. public function removeItemIdentifier($itemIdentifier);
  69. }
  70. ?>

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