* @param constraintTypes The {@link ConstraintType}s.
* @param ruleSet The {@link RuleSet}.
*/
private void readConstraints(Map<String, QueryDefinitionType> queryDefinitionTypes, Map<String, ConceptType> conceptTypes, Map<String, ConstraintType> constraintTypes, RuleSet ruleSet) {
for (ConstraintType constraintType : constraintTypes.values()) {
Constraint constraint = getOrCreateConstraint(constraintType.getId(), ruleSet.getConstraints());
constraint.setDescription(constraintType.getDescription());
if (constraintType.getUseQueryDefinition() != null) {
constraint.setQuery(createQueryFromDefinition(constraintType.getUseQueryDefinition().getRefId(), constraintType.getParameter(), queryDefinitionTypes));
} else {
constraint.setQuery(createQuery(constraintType.getCypher(), constraintType.getParameter()));
}
constraint.setRequiredConcepts(getRequiredConcepts(constraintType.getRequiresConcept(), conceptTypes, ruleSet));
}
}