Source for file Dictionary.php

Documentation is available at Dictionary.php

  1. <?php
  2. /**
  3. * Dictionary provides support for adding, removing, and getting entries by
  4. * Dictionary name and domain and then by tag. A tag is a String that is used
  5. * to identify an entry. This could be welcome_message, xyzDialog, etc. The
  6. * entry is a serializable object stored and retrieved with the Dictionary,
  7. * for example the text of the welcome_message or the dialog resource for
  8. * xyzDialog. The domain identifies the context for the Dictionary. This
  9. * could be java.util.Locale that is a designation that varies by country,
  10. * language, or other context.
  11. *
  12. * <p>
  13. * OSID Version: 2.0
  14. * </p>
  15. *
  16. * <p>
  17. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  18. * O.K.I&#46; OSID Definition License}.
  19. * </p>
  20. *
  21. * @package org.osid.dictionary
  22. */
  23. class Dictionary
  24. {
  25. /**
  26. * Update the display name for this Dictionary.
  27. *
  28. * @param string $displayName
  29. *
  30. * @throws object DictionaryException An exception with one of
  31. * the following messages defined in
  32. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  33. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  34. * OPERATION_FAILED}, {@link }
  35. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  36. * CONFIGURATION_ERROR}, {@link }
  37. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  38. * PERMISSION_DENIED}, {@link }
  39. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  40. * UNIMPLEMENTED}, {@link }
  41. * org.osid.dictionary.DictionaryException#NULL_ARGUMENT
  42. * NULL_ARGUMENT}
  43. *
  44. * @access public
  45. */
  46. function updateDisplayName ( $displayName ) {
  47. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  48. }
  49.  
  50. /**
  51. * Update the description for this Dictionary.
  52. *
  53. * @param string $description
  54. *
  55. * @throws object DictionaryException An exception with one of
  56. * the following messages defined in
  57. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  58. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  59. * OPERATION_FAILED}, {@link }
  60. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  61. * CONFIGURATION_ERROR}, {@link }
  62. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  63. * PERMISSION_DENIED}, {@link }
  64. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  65. * UNIMPLEMENTED}, {@link }
  66. * org.osid.dictionary.DictionaryException#NULL_ARGUMENT
  67. * NULL_ARGUMENT}
  68. *
  69. * @access public
  70. */
  71. function updateDescription ( $description ) {
  72. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  73. }
  74.  
  75. /**
  76. * Get the display name for this Dictionary.
  77. *
  78. * @return string
  79. *
  80. * @throws object DictionaryException An exception with one of
  81. * the following messages defined in
  82. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  83. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  84. * OPERATION_FAILED}, {@link }
  85. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  86. * CONFIGURATION_ERROR}, {@link }
  87. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  88. * PERMISSION_DENIED}, {@link }
  89. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  90. * UNIMPLEMENTED}
  91. *
  92. * @access public
  93. */
  94. function getDisplayName () {
  95. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  96. }
  97.  
  98. /**
  99. * Get the description for this Dictionary.
  100. *
  101. * @return string
  102. *
  103. * @throws object DictionaryException An exception with one of
  104. * the following messages defined in
  105. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  106. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  107. * OPERATION_FAILED}, {@link }
  108. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  109. * CONFIGURATION_ERROR}, {@link }
  110. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  111. * PERMISSION_DENIED}, {@link }
  112. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  113. * UNIMPLEMENTED}
  114. *
  115. * @access public
  116. */
  117. function getDescription () {
  118. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  119. }
  120.  
  121. /**
  122. * Get the unique Id for this Dictionary.
  123. *
  124. * @return object Id
  125. *
  126. * @throws object DictionaryException An exception with one of
  127. * the following messages defined in
  128. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  129. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  130. * OPERATION_FAILED}, {@link }
  131. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  132. * CONFIGURATION_ERROR}, {@link }
  133. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  134. * PERMISSION_DENIED}, {@link }
  135. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  136. * UNIMPLEMENTED}
  137. *
  138. * @access public
  139. */
  140. function getId () {
  141. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  142. }
  143.  
  144. /**
  145. * Get the domain of this Dictionary. The domain identifies the context
  146. * for the Dictionary. This could be java.util.Locale that is a
  147. * designation that varies by country, language, or other context.
  148. *
  149. * @return object mixed (original type: java.io.Serializable)
  150. *
  151. * @throws object DictionaryException An exception with one of
  152. * the following messages defined in
  153. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  154. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  155. * OPERATION_FAILED}, {@link }
  156. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  157. * CONFIGURATION_ERROR}, {@link }
  158. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  159. * PERMISSION_DENIED}, {@link }
  160. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  161. * UNIMPLEMENTED}
  162. *
  163. * @access public
  164. */
  165. function getDomain () {
  166. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  167. }
  168.  
  169. /**
  170. * Add an entry, a string-tag / serializable-value pair, to this
  171. * Dictionary. If the tag is already used, the new value overwrites the
  172. * old or this can be an error.
  173. *
  174. * @param string $tag
  175. * @param object mixed $value (original type: java.io.Serializable)
  176. *
  177. * @throws object DictionaryException An exception with one of
  178. * the following messages defined in
  179. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  180. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  181. * OPERATION_FAILED}, {@link }
  182. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  183. * CONFIGURATION_ERROR}, {@link }
  184. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  185. * PERMISSION_DENIED}, {@link }
  186. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  187. * UNIMPLEMENTED}, {@link }
  188. * org.osid.dictionary.DictionaryException#NULL_ARGUMENT
  189. * NULL_ARGUMENT}, {@link }
  190. * org.osid.dictionary.DictionaryException#ALREADY_ADDED
  191. * ALREADY_ADDED}
  192. *
  193. * @access public
  194. */
  195. function addEntry ( $tag, $value ) {
  196. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  197. }
  198.  
  199. /**
  200. * Remove the specified entry, a string-tag / serializable-value pair, from
  201. * this Dictionary.
  202. *
  203. * @param string $tag
  204. *
  205. * @throws object DictionaryException An exception with one of
  206. * the following messages defined in
  207. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  208. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  209. * OPERATION_FAILED}, {@link }
  210. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  211. * CONFIGURATION_ERROR}, {@link }
  212. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  213. * PERMISSION_DENIED}, {@link }
  214. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  215. * UNIMPLEMENTED}, {@link }
  216. * org.osid.dictionary.DictionaryException#NULL_ARGUMENT
  217. * NULL_ARGUMENT}, {@link }
  218. * org.osid.dictionary.DictionaryException#UNKNOWN_TAG
  219. * UNKNOWN_TAG}
  220. *
  221. * @access public
  222. */
  223. function removeEntry ( $tag ) {
  224. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  225. }
  226.  
  227. /**
  228. * Get the entry in this Dictionary that corresponds to the specified tag.
  229. *
  230. * @param string $tag
  231. *
  232. * @return object mixed (original type: java.io.Serializable)
  233. *
  234. * @throws object DictionaryException An exception with one of
  235. * the following messages defined in
  236. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  237. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  238. * OPERATION_FAILED}, {@link }
  239. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  240. * CONFIGURATION_ERROR}, {@link }
  241. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  242. * PERMISSION_DENIED}, {@link }
  243. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  244. * UNIMPLEMENTED}, {@link }
  245. * org.osid.dictionary.DictionaryException#NULL_ARGUMENT
  246. * NULL_ARGUMENT}, {@link }
  247. * org.osid.dictionary.DictionaryException#UNKNOWN_TAG
  248. * UNKNOWN_TAG}
  249. *
  250. * @access public
  251. */
  252. function getEntry ( $tag ) {
  253. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  254. }
  255.  
  256. /**
  257. * Get all the tags in this Dictionary. Iterators return a set, one at a
  258. * time.
  259. *
  260. * @return object StringIterator
  261. *
  262. * @throws object DictionaryException An exception with one of
  263. * the following messages defined in
  264. * org.osid.dictionary.DiictionaryException may be thrown: {@link }
  265. * org.osid.dictionary.DictionaryException#OPERATION_FAILED
  266. * OPERATION_FAILED}, {@link }
  267. * org.osid.dictionary.DictionaryException#CONFIGURATION_ERROR
  268. * CONFIGURATION_ERROR}, {@link }
  269. * org.osid.dictionary.DictionaryException#PERMISSION_DENIED
  270. * PERMISSION_DENIED}, {@link }
  271. * org.osid.dictionary.DictionaryException#UNIMPLEMENTED
  272. * UNIMPLEMENTED}
  273. *
  274. * @access public
  275. */
  276. function getTags () {
  277. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  278. }
  279. }
  280.  
  281. ?>

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