Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
CRAP | |
0.00% |
0 / 1 |
| core_kernel_persistence_smoothsql_SmoothRdfs | |
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
5.20 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getClassImplementation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getResourceImplementation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPropertyImplementation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getModel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 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) 2002-2008 (original work) 2014 Open Assessment Technologies SA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | use oat\generis\model\data\Ontology; |
| 23 | use oat\generis\model\data\RdfsInterface; |
| 24 | |
| 25 | /** |
| 26 | * Implementation of the RDFS interface for the smooth sql driver |
| 27 | * |
| 28 | * @author joel bout <joel@taotesting.com> |
| 29 | * @package generis |
| 30 | */ |
| 31 | class core_kernel_persistence_smoothsql_SmoothRdfs implements RdfsInterface |
| 32 | { |
| 33 | /** |
| 34 | * @var core_kernel_persistence_smoothsql_SmoothModel |
| 35 | */ |
| 36 | private $model; |
| 37 | |
| 38 | public function __construct(core_kernel_persistence_smoothsql_SmoothModel $model) |
| 39 | { |
| 40 | $this->model = $model; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * (non-PHPdoc) |
| 45 | * @see \oat\generis\model\data\RdfsInterface::getClassImplementation() |
| 46 | */ |
| 47 | public function getClassImplementation() |
| 48 | { |
| 49 | return new \core_kernel_persistence_smoothsql_Class($this->model); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * (non-PHPdoc) |
| 54 | * @see \oat\generis\model\data\RdfsInterface::getResourceImplementation() |
| 55 | */ |
| 56 | public function getResourceImplementation() |
| 57 | { |
| 58 | return new \core_kernel_persistence_smoothsql_Resource($this->model); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * (non-PHPdoc) |
| 63 | * @see \oat\generis\model\data\RdfsInterface::getPropertyImplementation() |
| 64 | */ |
| 65 | public function getPropertyImplementation() |
| 66 | { |
| 67 | return new \core_kernel_persistence_smoothsql_Property($this->model); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @return Ontology |
| 72 | */ |
| 73 | protected function getModel() |
| 74 | { |
| 75 | return $this->model; |
| 76 | } |
| 77 | } |