Skip to content

Conversation

@Bramaten
Copy link
Contributor

@Bramaten Bramaten commented Oct 9, 2025

No description provided.

@Bramaten Bramaten linked an issue Oct 9, 2025 that may be closed by this pull request
@Bramaten
Copy link
Contributor Author

Bramaten commented Oct 9, 2025

Next: add report structure

@Bramaten
Copy link
Contributor Author

Todo: groups, constraints and concepts should be able to override more than one of their type

@Bramaten
Copy link
Contributor Author

Todo: fix json schema for yamls (bug) and tests

@Bramaten
Copy link
Contributor Author

Add Maven IT test for overriding groups, constraints and concepts

xmlStreamWriter.writeEndElement();
}
List<String> overriddenIds = group.getOverriddenIds();
if (overriddenIds != null && !overriddenIds.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code could be extracted to a separate method taking the element name and overridden ids as parameters. The method could then be re-used for concepts and constraints.

LOGGER.warn("Could not find concepts matching to '{}'.", conceptPattern);
} else {
for (Concept matchingConcept : matchingConcepts) {
if (ruleSet.getConceptBucket()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of the method applyConcept (which is called directly below)

.stream()
.map(Concept.ProvidedConcept::getProvidedConceptId)
.collect(toList());
if (!new HashSet<>(overridingConceptsProvides).equals(new HashSet<>(overriddenConceptsProvides))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be overridingConceptsProvides.containsAll(overriddenConceptsProvides) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my initial thought too, but the problem I see here: Shouldn't the overriding concepts provide the same concepts as the overridden concepts AND vice versa to ensure reliable behavior? Or should the overriding concept be able to provide more?

@Bramaten Bramaten requested a review from DirkMahler December 18, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Overriding of Rules

3 participants