Checks all data sets in IIM records 1, 2 and 3 for constraint violations.

@return list of constraint violations, empty set if IIM file is valid
500470
public Set<ConstraintViolation> validate() {
		Set<ConstraintViolation> errors = new LinkedHashSet<ConstraintViolation>();
		for (int record = 1; record <= 3; ++record) {
			errors.addAll(validate(record));
		}
		return errors;
	}
277181
public List<Failure> checkResolvedFailures() {
        List<Failure> fullList = new ArrayList<Failure>();

        fullList.addAll(super.checkResolvedFailures());

        for (Scenario scenario : this.scenarios.keySet()) {
            fullList.addAll(scenario.checkResolvedFailures());
        }

        return fullList;
    }
694823
public java.util.List<com.google.rpc.QuotaFailure.Violation> getViolationsList() {
    return violations_;
  }
698851
public function check() {
        $this->_errors = [];

        foreach ($this->_constraints as $constraints) {
            if (!isset($this->_data[$this->_field])) {
                $this->_data[$this->_field] = [];
            }

            if (!is_array($this->_data[$this->_field])) {
                $this->_data[$this->_field] = [$this->_data[$this->_field]];
            }

            foreach ($this->_data[$this->_field] as $value) {
                switch ($constraints['type']) {
                    case self::EQUAL:
                        if ($value != $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::DIFFERENT:
                        if ($value == $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::MORETHAN:
                        if ($value <= $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LESSTHAN:
                        if ($value >= $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::BETWEEN:
                        if ($value < $constraints['value'][0] || $value > $constraints['value'][1]) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::IN:
                        if (!in_array($value, $constraints['value'])) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::NOTIN:
                        if (in_array($value, $constraints['value'])) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LENGTH:
                        if (strlen($value) != $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LENGTHMIN:
                        if (strlen($value) < $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LENGTHMAX:
                        if (strlen($value) > $constraints['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LENGTHIN:
                        if (!in_array(strlen($value), $constraints['value'])) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::LENGTHBETWEEN:
                        if (strlen($value) < $constraints['value'][0] || strlen($value) > $constraints['value'][1]) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::REGEX:
                        if (!preg_match($constraints['value'], $value)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::URL:
                        if (!filter_var($value, FILTER_VALIDATE_URL)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::MAIL:
                        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::INT:
                        if (!filter_var($value, FILTER_VALIDATE_INT)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::FLOAT:
                        if (!filter_var($value, FILTER_VALIDATE_FLOAT)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::ALPHA:
                        if (!preg_match('#^([a-zA-Z]+)$#', $value)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::ALPHANUM:
                        if (!preg_match('#^([a-zA-Z0-9]+)$#', $value)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::ALPHADASH:
                        if (!preg_match('#^([a-zA-Z0-9_-]+)$#', $value)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::IP:
                        if (!filter_var($value, FILTER_VALIDATE_IP)) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::SQL:
                        $sql = new Sql();
                        $sql->query('query-form-validation', $constraints['value']['query']);
                        $sql->vars('value', $value);
                        $sql->vars($constraints['value']['vars']);
                        $data = $sql->fetch('query-form-validation', Sql::PARAM_FETCHCOLUMN);

                        $querySuccess = true;

                        switch ($constraints['value']['constraint']) {
                            case '==':
                                if ($data != $constraints['value']['value']) {
                                    $querySuccess = false;
                                }
                                break;

                            case '!=':
                                if ($data == $constraints['value']['value']) {
                                    $querySuccess = false;
                                }
                                break;

                            case '>':
                                if ($data <= $constraints['value']['value']) {
                                    $querySuccess = false;
                                }
                                break;

                            case '<':
                                if ($data >= $constraints['value']['value']) {
                                    $querySuccess = false;
                                }
                                break;
                        }

                        if (!$querySuccess) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                        }
                        break;

                    case self::CUSTOM:
                        /** @var object[] $constraints */
                        if ($constraints['value']->filter() == false) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['value']->error()]);
                        }
                        break;
                }
            }

            switch ($constraints['type']) {
                case self::COUNT:
                    if (count($this->_data[$this->_field]) != $constraints['value']) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;

                case self::COUNTMIN:
                    if (count($this->_data[$this->_field]) < $constraints['value']) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;

                case self::COUNTMAX:
                    if (count($this->_data[$this->_field]) > $constraints['value']) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;

                case self::COUNTIN:
                    /** @var array $constraints */
                    if (!in_array(count($this->_data[$this->_field]), $constraints['value'])) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;

                case self::EXIST:
                    if (count($this->_data[$this->_field]) == 0) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;

                case self::NOTEXIST:
                    if (count($this->_data[$this->_field]) > 0) {
                        array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);
                    }
                    break;
            }
        }
    }
1111740
public GridBagConstraints getGBConstraints()
    {
        if (m_gbconstraints == null)
        {
            m_gbconstraints = new GridBagConstraints();
            m_gbconstraints.insets = new Insets(2, 2, 2, 2);
            m_gbconstraints.ipadx = 2;
            m_gbconstraints.ipady = 2;
        }
        return m_gbconstraints;
    }
828204
public java.util.List<? extends org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder> 
      getConstraintOrBuilderList() {
    return constraint_;
  }
1011999
private Set<String> getConstraintNameList(){
		Set<String> result = new HashSet<>();
		String propertyValue = getProperty(ConstraintContextProperty.ALL_CONSTRAINTS);
		if(propertyValue == null)
			return result;
		StringTokenizer attributeTokens = StringUtils.splitArrayString(propertyValue, String.valueOf(ArrayUtils.VALUE_SEPARATION));
		while(attributeTokens.hasMoreTokens()){
			String nextToken = attributeTokens.nextToken();
			result.add(nextToken);
		}
		return result;
	}
791119
private Boolean constraintsExists(String labelName, List<String> propertyNames) {
        Schema schema = db.schema();

        for (ConstraintDefinition constraintDefinition : Iterables.asList(schema.getConstraints(Label.label(labelName)))) {
            List<String> properties = Iterables.asList(constraintDefinition.getPropertyKeys());

            if (properties.equals(propertyNames)) {
                return true;
            }
        }

        return false;
    }
1189625
@Override
	public boolean hasNextCase() {
		for (ConstraintWrap wrap : summands) {
			if (wrap.constraint.hasNextCase()) {
				return true;
			}
		}
		return false;
	}
1242933
public List<HivePartitionDataset> findDatasets()
      throws IOException {
    Preconditions.checkArgument(this.state.contains(ComplianceConfigurationKeys.RESTORE_DATASET),
        "Missing required property " + ComplianceConfigurationKeys.RESTORE_DATASET);
    HivePartitionDataset hivePartitionDataset =
        HivePartitionFinder.findDataset(this.state.getProp(ComplianceConfigurationKeys.RESTORE_DATASET), this.state);

    Preconditions.checkNotNull(hivePartitionDataset, "No dataset to restore");
    return Collections.singletonList(hivePartitionDataset);
  }
1295022
public Map<String, Map<String, Map<String, Map<String, ?>>>> validationConstraints() {
		return getEntity(invokeGet("_constraints", null), Map.class);
	}
290868
public java.util.List<ComplianceByConfigRule> getComplianceByConfigRules() {
        if (complianceByConfigRules == null) {
            complianceByConfigRules = new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>();
        }
        return complianceByConfigRules;
    }
979839
public Map<String, Map<String, Map<String, Map<String, ?>>>> getAllValidationConstraints(String... types) {
		Map<String, Map<String, Map<String, Map<String, ?>>>> allConstr = new LinkedHashMap<>();
		if (types == null || types.length == 0) {
			types = ParaObjectUtils.getAllTypes(this).values().toArray(new String[0]);
		}
		try {
			for (String aType : types) {
				Map<String, Map<String, Map<String, ?>>> vc = new LinkedHashMap<>();
				// add all core constraints first
				if (ValidationUtils.getCoreValidationConstraints().containsKey(aType)) {
					vc.putAll(ValidationUtils.getCoreValidationConstraints().get(aType));
				}
				// also add the ones that are defined locally for this app
				Map<String, Map<String, Map<String, ?>>> appConstraints = getValidationConstraints().get(aType);
				if (appConstraints != null && !appConstraints.isEmpty()) {
					vc.putAll(appConstraints);
				}
				if (!vc.isEmpty()) {
					allConstr.put(aType, vc);
				}
			}
		} catch (Exception ex) {
			logger.error(null, ex);
		}
		return allConstr;
	}
1325654
private boolean checkConstraint(Collection<String> constraints, Tile tile)
    {
        return tile != null
               && constraints.contains(mapGroup.getGroup(tile))
               && !tile.getFeature(TileCollision.class).getCollisionFormulas().isEmpty();
    }
1351602
private static <E> Collection<E> checkElements(
      Collection<E> elements, Constraint<? super E> constraint) {
    Collection<E> copy = Lists.newArrayList(elements);
    for (E element : copy) {
      constraint.checkElement(element);
    }
    return copy;
  }
891780
public com.google.rpc.PreconditionFailure.Violation getViolations(int index) {
    return violations_.get(index);
  }
975833
public Set<ConstraintViolation> validate(DataSetInfo info) {
		Set<ConstraintViolation> errors = new LinkedHashSet<ConstraintViolation>();
		try {
			if (info.isMandatory() && get(info.getDataSetNumber()) == null) {
				errors.add(new ConstraintViolation(info, ConstraintViolation.MANDATORY_MISSING));
			}
			if (!info.isRepeatable() && getAll(info.getDataSetNumber()).size() > 1) {
				errors.add(new ConstraintViolation(info, ConstraintViolation.REPEATABLE_REPEATED));
			}
		} catch (SerializationException e) {
			errors.add(new ConstraintViolation(info, ConstraintViolation.INVALID_VALUE));
		}
		return errors;
	}