Skip to content

Commit

Permalink
Merge branch 'release/v2.19.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed Oct 28, 2024
2 parents 7272e33 + 7396e21 commit 9626ff7
Show file tree
Hide file tree
Showing 32 changed files with 2,280 additions and 156 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Note: version releases in the 0.x.y range may introduce breaking changes.

## [2.19.0]
### Added
- Option to validate compositions for child nodes not defined in template ([631](https://github.com/ehrbase/openEHR_SDK/pull/631))
### Fixed

## [2.18.0]
### Changed
- Updated archie to 3.11.0 and antlr to 4.13.1 ([#640](https://github.com/ehrbase/openEHR_SDK/pull/640))
Expand Down Expand Up @@ -448,3 +453,4 @@ Note: version releases in the 0.x.y range may introduce breaking changes.
[2.16.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.15.0...v2.16.0
[2.17.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.16.0...v2.17.0
[2.18.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.17.0...v2.18.0
[2.19.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.18.0...v2.19.0
2 changes: 1 addition & 1 deletion aql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>aql</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<artifactId>bom</artifactId>
<groupId>org.ehrbase.openehr.sdk</groupId>
<version>2.18.0</version>
<version>2.19.0</version>
<packaging>pom</packaging>

<name>openEHR SDK</name>
Expand Down Expand Up @@ -67,7 +67,7 @@
<mockito.version>4.11.0</mockito.version>
<slf4j.version>1.7.36</slf4j.version>
<xmlbeans.version>3.1.0</xmlbeans.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
Expand Down
4 changes: 2 additions & 2 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>client</artifactId>
Expand Down Expand Up @@ -158,7 +158,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>6.1.6</version>
<version>6.1.14</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion example-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>sdk-parent</artifactId>
<groupId>org.ehrbase.openehr.sdk</groupId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion generator-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>generator-commons</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions generator-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>sdk-parent</artifactId>
<groupId>org.ehrbase.openehr.sdk</groupId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -26,13 +26,13 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.13.1</version>
<version>3.15.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.9.7</version>
<version>3.9.9</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>generator</artifactId>
Expand All @@ -39,7 +39,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<version>3.8.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand Down
2 changes: 1 addition & 1 deletion opt-1.4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>opt-1.4</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>bom</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
<relativePath>./bom/pom.xml</relativePath>
</parent>

<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
<packaging>pom</packaging>
<name>openEHR SDK</name>

Expand Down
2 changes: 1 addition & 1 deletion response-dto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>response-dto</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion serialisation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>serialisation</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

import static org.ehrbase.openehr.sdk.util.rmconstants.RmConstants.*;

import com.nedap.archie.openehrtestrm.Element;
import com.nedap.archie.rm.RMObject;
import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.composition.Composition;
import com.nedap.archie.rm.composition.EventContext;
import com.nedap.archie.rm.composition.IsmTransition;
import com.nedap.archie.rm.datastructures.Element;
import com.nedap.archie.rm.datavalues.quantity.DvInterval;
import com.nedap.archie.rminfo.ArchieRMInfoLookup;
import com.nedap.archie.rminfo.RMTypeInfo;
Expand Down Expand Up @@ -143,14 +143,21 @@ private void handle(Context<T> context) {
handle(context);
});
}

postVisitChildren(context, currentNode);
}

postHandle(context);
insertDefaults(context);
context.getRmObjectDeque().remove();
context.getNodeDeque().remove();
context.getObjectDeque().remove();
}

protected void postVisitChildren(Context<T> context, WebTemplateNode currentNode) {
// NOOP
}

private Stream<NodeConstellation> streamChildConstellations(
Context<T> context,
WebTemplateNode currentNode,
Expand Down
2 changes: 1 addition & 1 deletion serialisation_conformance_test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>serialisation_conformance_test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion terminology/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>terminology</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>test-coverage</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion test-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>test-data</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"archetype_node_id": "at0005"
}
],
"archetype_node_id": "[at0001]"
"archetype_node_id": "at0001"
}
},
"content": [
Expand Down
2 changes: 1 addition & 1 deletion util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>util</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</parent>

<artifactId>validation</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,59 +20,34 @@
import com.nedap.archie.aom.CObject;
import com.nedap.archie.flattener.OperationalTemplateProvider;
import com.nedap.archie.rminfo.ModelInfoLookup;
import com.nedap.archie.rmobjectvalidator.RMObjectValidatingProcessor;
import com.nedap.archie.rmobjectvalidator.RMObjectValidationMessage;
import com.nedap.archie.rmobjectvalidator.RMObjectValidationMessageType;
import com.nedap.archie.rmobjectvalidator.RMObjectValidator;
import com.nedap.archie.rmobjectvalidator.ValidationConfiguration;
import java.util.Collection;

public class ConfigurableRMObjectValidator extends RMObjectValidator {
public class ArchetypeNeglectingRMObjectValidator extends RMObjectValidator {

private final boolean archetypeValidation;

public ConfigurableRMObjectValidator(
public ArchetypeNeglectingRMObjectValidator(
ModelInfoLookup lookup,
OperationalTemplateProvider provider,
ValidationConfiguration validationConfiguration) {
this(lookup, provider, validationConfiguration, true);
}

public ConfigurableRMObjectValidator(
ModelInfoLookup lookup,
OperationalTemplateProvider provider,
ValidationConfiguration validationConfiguration,
boolean archetypeValidation) {
super(lookup, provider, validationConfiguration);
this.archetypeValidation = archetypeValidation;
}

public ConfigurableRMObjectValidator(ModelInfoLookup lookup, OperationalTemplateProvider provider) {
this(lookup, provider, null);
}

public boolean isArchetypeValidation() {
return archetypeValidation;
}

protected void addMessage(RMObjectValidationMessage message) {
if (!archetypeValidation && message.getType() == RMObjectValidationMessageType.ARCHETYPE_NOT_FOUND) return;
super.addMessage(message);
}

protected void addMessage(CObject cobject, String actualPath, String message) {
addMessage(new RMObjectValidationMessage(cobject, actualPath, message));
if (message.getType() != RMObjectValidationMessageType.ARCHETYPE_NOT_FOUND) {
super.addMessage(message);
}
}

protected void addMessage(CObject cobject, String actualPath, String message, RMObjectValidationMessageType type) {
addMessage(new RMObjectValidationMessage(cobject, actualPath, message, type));
if (type != RMObjectValidationMessageType.ARCHETYPE_NOT_FOUND) {
super.addMessage(cobject, actualPath, message, type);
}
}

protected void addAllMessages(Collection<RMObjectValidationMessage> messages) {
messages.forEach(msg -> addMessage(msg));
}

protected void addAllMessagesFrom(RMObjectValidatingProcessor other) {
addAllMessages(other.getMessages());
messages.forEach(this::addMessage);
}
}
Loading

0 comments on commit 9626ff7

Please sign in to comment.