Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoQtiItem\model\qti\metadata; |
| 23 | |
| 24 | /** |
| 25 | * This interface has to be implemented by any software component which wants to represent |
| 26 | * metadata values e.g. Metadata found in an IMS Manifest File, an Ontology, ... |
| 27 | * |
| 28 | * @author Jérôme Bogaerts <jerome@taotesting.com> |
| 29 | */ |
| 30 | interface MetadataValue |
| 31 | { |
| 32 | /** |
| 33 | * Returns a descriptive path aiming at representing the hierarchy of concepts to be traversed |
| 34 | * to identify the metadata value. |
| 35 | * |
| 36 | * For instance, you would like to represent a metadata value about the name of a pet. Its path |
| 37 | * could be the following: |
| 38 | * |
| 39 | * <code> |
| 40 | * array('species', 'dogs', 'pet', 'name'); |
| 41 | * </code> |
| 42 | * |
| 43 | * Any metadata value using these paths can be identified has names belonging to pets, which are |
| 44 | * animals among the various species in the world. |
| 45 | * |
| 46 | * @return array An array of strings representing the descriptive path to the metadata attribute. |
| 47 | */ |
| 48 | public function getPath(); |
| 49 | |
| 50 | /** |
| 51 | * Get the language of the intrinsic metadata value. If no particular language is specified, |
| 52 | * this method returns an empty string. |
| 53 | * |
| 54 | * @return string |
| 55 | */ |
| 56 | public function getLanguage(); |
| 57 | |
| 58 | /** |
| 59 | * Returns an identifier which is unique, describing to whom (e.g. a QTI Item, an Ontology Resource, ...) |
| 60 | * the intrinsic metadata value belongs to. |
| 61 | * |
| 62 | * @return string |
| 63 | */ |
| 64 | public function getResourceIdentifier(); |
| 65 | |
| 66 | /** |
| 67 | * Get the the intrinsic value of the metadata e.g. a pet name. |
| 68 | * |
| 69 | * @return string |
| 70 | */ |
| 71 | public function getValue(); |
| 72 | } |