1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AlgoWeb\ODataMetadata\MetadataV3\edm; |
4
|
|
|
|
5
|
|
|
use AlgoWeb\ODataMetadata\IsOK; |
6
|
|
|
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\GInlineExpressionsTrait; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class representing TTypeAnnotationType |
10
|
|
|
* |
11
|
|
|
* |
12
|
|
|
* XSD Type: TTypeAnnotation |
13
|
|
|
*/ |
14
|
|
|
class TTypeAnnotationType extends IsOK |
15
|
|
|
{ |
16
|
|
|
use GInlineExpressionsTrait; |
17
|
|
|
/** |
18
|
|
|
* @property string $term |
19
|
|
|
*/ |
20
|
|
|
private $term = null; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @property string $qualifier |
24
|
|
|
*/ |
25
|
|
|
private $qualifier = null; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] $propertyValue |
29
|
|
|
*/ |
30
|
|
|
private $propertyValue = []; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Gets as term |
34
|
|
|
* |
35
|
|
|
* @return string |
36
|
|
|
*/ |
37
|
|
|
public function getTerm() |
38
|
|
|
{ |
39
|
|
|
return $this->term; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Sets a new term |
44
|
|
|
* |
45
|
|
|
* @param string $term |
46
|
|
|
* @return self |
47
|
|
|
*/ |
48
|
|
|
public function setTerm($term) |
49
|
|
|
{ |
50
|
|
|
$this->term = $term; |
51
|
|
|
return $this; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Gets as qualifier |
56
|
|
|
* |
57
|
|
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function getQualifier() |
60
|
|
|
{ |
61
|
|
|
return $this->qualifier; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Sets a new qualifier |
66
|
|
|
* |
67
|
|
|
* @param string $qualifier |
68
|
|
|
* @return self |
69
|
|
|
*/ |
70
|
|
|
public function setQualifier($qualifier) |
71
|
|
|
{ |
72
|
|
|
$this->qualifier = $qualifier; |
73
|
|
|
return $this; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Adds as propertyValue |
78
|
|
|
* |
79
|
|
|
* @return self |
80
|
|
|
* @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType $propertyValue |
81
|
|
|
*/ |
82
|
|
|
public function addToPropertyValue(TPropertyValueType $propertyValue) |
83
|
|
|
{ |
84
|
|
|
$this->propertyValue[] = $propertyValue; |
85
|
|
|
return $this; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* isset propertyValue |
90
|
|
|
* |
91
|
|
|
* @param scalar $index |
92
|
|
|
* @return boolean |
93
|
|
|
*/ |
94
|
|
|
public function issetPropertyValue($index) |
95
|
|
|
{ |
96
|
|
|
return isset($this->propertyValue[$index]); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* unset propertyValue |
101
|
|
|
* |
102
|
|
|
* @param scalar $index |
103
|
|
|
* @return void |
104
|
|
|
*/ |
105
|
|
|
public function unsetPropertyValue($index) |
106
|
|
|
{ |
107
|
|
|
unset($this->propertyValue[$index]); |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* Gets as propertyValue |
112
|
|
|
* |
113
|
|
|
* @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] |
114
|
|
|
*/ |
115
|
|
|
public function getPropertyValue() |
116
|
|
|
{ |
117
|
|
|
return $this->propertyValue; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* Sets a new propertyValue |
122
|
|
|
* |
123
|
|
|
* @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] $propertyValue |
124
|
|
|
* @return self |
125
|
|
|
*/ |
126
|
|
|
public function setPropertyValue(array $propertyValue) |
127
|
|
|
{ |
128
|
|
|
$this->propertyValue = $propertyValue; |
129
|
|
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
public function isOK(&$msg = null) |
133
|
|
|
{ |
134
|
|
|
if (!$this->isGInlineExpressionsValid($msg)) { |
135
|
|
|
return false; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
return true; |
139
|
|
|
} |
140
|
|
|
} |
141
|
|
|
|