.concepts(includedConcepts).constraints(includedConstraints) .groups(includedGroups) .build();
private void extractGroup(RuleSource ruleSource, AbstractBlock groupBlock, RuleSetBuilder ruleSetBuilder) throws RuleException { Attributes attributes = new Attributes(groupBlock.getAttributes()); Map<String, Severity> constraints = getGroupElements(attributes, INCLUDES_CONSTRAINTS); Map<String, Severity> concepts = getGroupElements(attributes, INCLUDES_CONCEPTS); Map<String, Severity> groups = getGroupElements(attributes, INCLUDES_GROUPS); Severity severity = getSeverity(attributes, getRuleConfiguration().getDefaultGroupSeverity()); Group group = Group.builder().id(groupBlock.id()).description(groupBlock.getTitle()).severity(severity).ruleSource(ruleSource).concepts(concepts) .constraints(constraints).groups(groups).build(); ruleSetBuilder.addGroup(group); }
private Group createGroup(String id, RuleSource ruleSource, GroupType referenceableType) throws RuleException { SeverityEnumType severityType = referenceableType.getSeverity(); Severity severity = getSeverity(severityType, getRuleConfiguration().getDefaultGroupSeverity()); Map<String, Severity> includeConcepts = getIncludedReferences(referenceableType.getIncludeConcept()); Map<String, Severity> includeConstraints = getIncludedReferences(referenceableType.getIncludeConstraint()); Map<String, Severity> includeGroups = getIncludedReferences(referenceableType.getIncludeGroup()); return Group.builder().id(id).severity(severity).ruleSource(ruleSource).concepts(includeConcepts).constraints(includeConstraints) .groups(includeGroups).build(); }