| @@ 193-219 (lines=27) @@ | ||
| 190 | return $this; |
|
| 191 | } |
|
| 192 | ||
| 193 | public function isOK(&$msg = null) |
|
| 194 | { |
|
| 195 | if (!$this->isStringNotNullOrEmpty($this->name)) { |
|
| 196 | $msg = "Name cannot be null or empty"; |
|
| 197 | return false; |
|
| 198 | } |
|
| 199 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
| 200 | return false; |
|
| 201 | } |
|
| 202 | if (!$this->isValidArrayOK( |
|
| 203 | $this->key, |
|
| 204 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType', |
|
| 205 | $msg, |
|
| 206 | 1 |
|
| 207 | )) { |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | if (!$this->isValidArrayOK( |
|
| 211 | $this->property, |
|
| 212 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TEntityPropertyType', |
|
| 213 | $msg |
|
| 214 | )) { |
|
| 215 | return false; |
|
| 216 | } |
|
| 217 | ||
| 218 | return true; |
|
| 219 | } |
|
| 220 | } |
|
| 221 | ||
| @@ 132-154 (lines=23) @@ | ||
| 129 | return $this; |
|
| 130 | } |
|
| 131 | ||
| 132 | public function isOK(&$msg = null) |
|
| 133 | { |
|
| 134 | if (!$this->isStringNotNullOrEmpty($this->role)) { |
|
| 135 | $msg = "Role cannot be empty or null"; |
|
| 136 | return false; |
|
| 137 | } |
|
| 138 | if (!$this->isTSimpleIdentifierValid($this->role)) { |
|
| 139 | $msg = "Role must be valid TSimpleIdentifier"; |
|
| 140 | return false; |
|
| 141 | } |
|
| 142 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
| 143 | return false; |
|
| 144 | } |
|
| 145 | if (!$this->isValidArrayOK( |
|
| 146 | $this->propertyRef, |
|
| 147 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType', |
|
| 148 | $msg, |
|
| 149 | 1 |
|
| 150 | )) { |
|
| 151 | return false; |
|
| 152 | } |
|
| 153 | return true; |
|
| 154 | } |
|
| 155 | } |
|
| 156 | ||
| @@ 202-231 (lines=30) @@ | ||
| 199 | return $this; |
|
| 200 | } |
|
| 201 | ||
| 202 | public function isOK(&$msg = null) |
|
| 203 | { |
|
| 204 | if (!$this->isValidArrayOK( |
|
| 205 | $this->documentation, |
|
| 206 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType', |
|
| 207 | $msg, |
|
| 208 | 0, |
|
| 209 | 1 |
|
| 210 | )) { |
|
| 211 | return false; |
|
| 212 | } |
|
| 213 | if (!$this->isValidArrayOK( |
|
| 214 | $this->valueAnnotation, |
|
| 215 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType', |
|
| 216 | $msg |
|
| 217 | )) { |
|
| 218 | return false; |
|
| 219 | } |
|
| 220 | if (!$this->isValidArrayOK( |
|
| 221 | $this->typeAnnotation, |
|
| 222 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType', |
|
| 223 | $msg |
|
| 224 | )) { |
|
| 225 | return false; |
|
| 226 | } |
|
| 227 | if (!$this->isTEntitySetAttributesOK($msg)) { |
|
| 228 | return false; |
|
| 229 | } |
|
| 230 | return true; |
|
| 231 | } |
|
| 232 | } |
|
| 233 | ||
| @@ 190-215 (lines=26) @@ | ||
| 187 | return $this; |
|
| 188 | } |
|
| 189 | ||
| 190 | public function isOK(&$msg = null) |
|
| 191 | { |
|
| 192 | if (!$this->isTPropertyTypeValid($this->underlyingType)) { |
|
| 193 | $msg = "Underlying type must be a valid TPropertyType"; |
|
| 194 | return false; |
|
| 195 | } |
|
| 196 | if (!$this->isTPublicOrInternalAccessOK($this->typeAccess)) { |
|
| 197 | $msg = "Type access must be Public or Internal"; |
|
| 198 | return false; |
|
| 199 | } |
|
| 200 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
| 201 | return false; |
|
| 202 | } |
|
| 203 | if (!$this->isValidArrayOK( |
|
| 204 | $this->member, |
|
| 205 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TEnumTypeMemberType', |
|
| 206 | $msg |
|
| 207 | )) { |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | ||
| 211 | if (!$this->isTTypeAttributesValid($msg)) { |
|
| 212 | return false; |
|
| 213 | } |
|
| 214 | return true; |
|
| 215 | } |
|
| 216 | } |
|
| 217 | ||