| @@ 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 | ||
| @@ 160-183 (lines=24) @@ | ||
| 157 | return $this; |
|
| 158 | } |
|
| 159 | ||
| 160 | public function isOK(&$msg = null) |
|
| 161 | { |
|
| 162 | if (!$this->isTSimpleIdentifierValid($this->name)) { |
|
| 163 | $msg = "Name must be a valid TSimpleIdentifier"; |
|
| 164 | return false; |
|
| 165 | } |
|
| 166 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
| 167 | return false; |
|
| 168 | } |
|
| 169 | if (!$this->isObjectNullOrOK($this->referentialConstraint, $msg)) { |
|
| 170 | return false; |
|
| 171 | } |
|
| 172 | if (!$this->isValidArrayOK( |
|
| 173 | $this->end, |
|
| 174 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TAssociationEndType', |
|
| 175 | $msg, |
|
| 176 | 2, |
|
| 177 | 2 |
|
| 178 | )) { |
|
| 179 | return false; |
|
| 180 | } |
|
| 181 | ||
| 182 | return true; |
|
| 183 | } |
|
| 184 | } |
|
| 185 | ||
| @@ 104-126 (lines=23) @@ | ||
| 101 | return $this; |
|
| 102 | } |
|
| 103 | ||
| 104 | public function isOK(&$msg = null) |
|
| 105 | { |
|
| 106 | if (null != $this->role && !$this->isTSimpleIdentifierValid($this->role)) { |
|
| 107 | $msg = "Role must be a valid TSimpleIdentifier"; |
|
| 108 | return false; |
|
| 109 | } |
|
| 110 | if (!$this->isTSimpleIdentifierValid($this->entitySet)) { |
|
| 111 | $msg = "Entity set must be a valid TSimpleIdentifier"; |
|
| 112 | return false; |
|
| 113 | } |
|
| 114 | if (!$this->isObjectNullOrType( |
|
| 115 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TDocumentationType', |
|
| 116 | $this->documentation, |
|
| 117 | $msg |
|
| 118 | )) { |
|
| 119 | return false; |
|
| 120 | } |
|
| 121 | if (!$this->isExtensibilityElementOK($msg)) { |
|
| 122 | return false; |
|
| 123 | } |
|
| 124 | ||
| 125 | return true; |
|
| 126 | } |
|
| 127 | } |
|
| 128 | ||