Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
9 / 9 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
1 / 1 |
ResourceTranslation | |
100.00% |
9 / 9 |
|
100.00% |
4 / 4 |
4 | |
100.00% |
1 / 1 |
setOriginResourceUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOriginResourceUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getProgressUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
jsonSerialize | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 |
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) 2024 (original work) Open Assessment Technologies SA; |
19 | */ |
20 | |
21 | declare(strict_types=1); |
22 | |
23 | namespace oat\tao\model\Translation\Entity; |
24 | |
25 | use oat\tao\model\TaoOntology; |
26 | |
27 | class ResourceTranslation extends AbstractResource |
28 | { |
29 | private string $originResourceUri; |
30 | |
31 | public function setOriginResourceUri(string $originResourceUri): void |
32 | { |
33 | $this->originResourceUri = $originResourceUri; |
34 | } |
35 | |
36 | public function getOriginResourceUri(): string |
37 | { |
38 | return $this->originResourceUri; |
39 | } |
40 | |
41 | public function getProgressUri(): string |
42 | { |
43 | return $this->getMetadataValue(TaoOntology::PROPERTY_TRANSLATION_PROGRESS); |
44 | } |
45 | |
46 | public function jsonSerialize(): array |
47 | { |
48 | return array_merge( |
49 | [ |
50 | 'originResourceUri' => $this->getOriginResourceUri() |
51 | ], |
52 | parent::jsonSerialize(), |
53 | ); |
54 | } |
55 | } |