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 | * A MetadataExtractor implements the mechanics to extract all metadata values from a given source. |
| 26 | * |
| 27 | * A MetadataExtractor implementation could extract MetadataValue objects from various kind of sources, such |
| 28 | * as IMS Manifest XML Files, Ontologies, QTI Items, QTI Tests, ... |
| 29 | * |
| 30 | * @author Jérôme Bogaerts <jerome@taotesting.com> |
| 31 | * @see MetadataValue The MedataValue interface, describing objects extracted and returned by a MetadataExtractor. |
| 32 | */ |
| 33 | interface MetadataExtractor |
| 34 | { |
| 35 | /** |
| 36 | * Extract the metadata values from a given source. |
| 37 | * Please see the documentation of the MetadataValue interface for in depth information |
| 38 | * about what a metadata value actually is. |
| 39 | * |
| 40 | * The return value of this method is an associative array. Each key is a Resource Identifier and |
| 41 | * each value for a key is an array of MetadataValue object that belongs to the resource identified |
| 42 | * by Resource Identifier. |
| 43 | * |
| 44 | * If no MetadataValue objects could be infered from the $source, an empty array is returned. |
| 45 | * |
| 46 | * @param mixed $source The source you want to extract MetaDataValue objects from. |
| 47 | * @throws MetadataExtractionException If something goes wrong during the extraction process. |
| 48 | * @return MetadataValue[] An associative array where MetadataValue objects are regrouped by Resource Identifier. |
| 49 | */ |
| 50 | public function extract($source); |
| 51 | } |