GithubHelp home page GithubHelp logo

java-libs's People

Contributors

bjornna avatar eriksundvall avatar gardes avatar hsnaves avatar icorbal avatar markopi avatar mforss avatar ppazos avatar rongchen avatar samuelfrade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-libs's Issues

Error when build in maven

Hello,

I want to use javalib for working with archetypes eN13606. I download the library and i unzip in my disc.
In eclipse, i go to run, run configurations, Maven build and i create new with goal eclipse:eclipse.
it produces a failure:

[INFO] Not running eclipse plugin goal for pom project
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Measurement Service Implementation 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ measure-serv >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ measure-serv <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ measure-serv ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\measure-serv.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "measure-serv" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\measure-serv.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Reference Model Core 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-core >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-core <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-core ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-rm-core.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "openehr-rm-core" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-rm-core.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Minimum Terminology Service 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ mini-termserv >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ mini-termserv <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ mini-termserv ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\mini-termserv.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "mini-termserv" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\mini-termserv.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Reference Model Domain 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-domain >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-domain <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-rm-domain ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-rm-domain.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "openehr-rm-domain" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-rm-domain.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Archetype Object Model 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-aom >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-aom <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-aom ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-aom.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "openehr-aom" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-aom.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR Archetype Profile 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-ap >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-ap <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ openehr-ap ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-ap.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "openehr-ap" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\openehr-ap.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building java ADL Parser 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or

one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-parser >>>
[INFO]
[INFO] --- javacc-maven-plugin:2.6:javacc (default) @ adl-parser ---
[INFO] Skipping - all parsers are up to date
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-parser <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-parser ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\adl-parser.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "adl-parser" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\adl-parser.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building java dADL Parser 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or

one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ dadl-parser >>>
[INFO]
[INFO] --- javacc-maven-plugin:2.6:javacc (default) @ dadl-parser ---
[INFO] Skipping - all parsers are up to date
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ dadl-parser <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ dadl-parser ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\dadl-parser.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "dadl-parser" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\dadl-parser.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ADL Serializer 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-serializer >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-serializer <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ adl-serializer ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\adl-serializer.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "adl-serializer" to C:\Users\clr1\Google Drive\Entorno\workspace\java-libs-master\adl-serializer.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openEHR OET Template Parser and Flattener 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ oet-parser >>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] The openEHR Reference Java Implementation ......... SUCCESS [22.666s]
[INFO] openEHR Measurement Service Implementation ........ SUCCESS [1.001s]
[INFO] openEHR Reference Model Core ...................... SUCCESS [0.316s]
[INFO] openEHR Minimum Terminology Service ............... SUCCESS [2.928s]
[INFO] openEHR Reference Model Domain .................... SUCCESS [0.170s]
[INFO] openEHR Archetype Object Model .................... SUCCESS [0.144s]
[INFO] openEHR Archetype Profile ......................... SUCCESS [0.113s]
[INFO] java ADL Parser ................................... SUCCESS [3.551s]
[INFO] java dADL Parser .................................. SUCCESS [0.193s]
[INFO] ADL Serializer .................................... SUCCESS [0.301s]
[INFO] openEHR OET Template Parser and Flattener ......... FAILURE [0.841s]
[INFO] XML Serializer .................................... SKIPPED
[INFO] openEHR Reference Model Object Builder ............ SKIPPED
[INFO] openEHR RM XML Data Binding Component ............. SKIPPED
[INFO] java dADL Binding ................................. SKIPPED
[INFO] openEHR RM Skeleton Instance Generator ............ SKIPPED
[INFO] Archetype Validator ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.409s
[INFO] Finished at: Thu Jan 16 14:08:06 CET 2014
[INFO] Final Memory: 11M/72M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project oet-parser: Could not resolve dependencies for project openehr:oet-parser:jar:1.0.5-SNAPSHOT: The

following artifacts could not be resolved: openehr:openehr-rm-core:jar:1.0.5-SNAPSHOT, openehr:openehr-rm-domain:jar:1.0.5-SNAPSHOT,

openehr:openehr-aom:jar:1.0.5-SNAPSHOT, openehr:adl-parser:jar:1.0.5-SNAPSHOT, openehr:openehr-ap:jar:1.0.5-SNAPSHOT, openehr:measure-

serv:jar:1.0.5-SNAPSHOT, openehr:mini-termserv:jar:1.0.5-SNAPSHOT, openehr:adl-serializer:jar:1.0.5-SNAPSHOT: Could not find artifact

openehr:openehr-rm-core:jar:1.0.5-SNAPSHOT -> [Help 1]

Can you help me?

Very thanks for your attention.

Regards.

Obtaining object for archetype

Hello,

Is there some library to produce an object from an archetype, containing the information of attributes, data types, ... ?

Thanks for your help.

Regards.

Flattener keeping terminology, language bindings

(I posted this on the discourse channel as well - apologies for cross-posting)

I’ve been using java-libs to flatten a template, i.e., apply all of its constraints and print the resulting archetype. This is working wonderfully - but the end result is missing terminology and language bindings - this makes it rather unusable when generating a UI, for instance.

Updating the Flattener code to keep these bindings is an option, but seems complex: internal node-ids would have to be updated (these are typically re-used in archetypes, e.g., at0004) to have unique terminology bindings across the archetypes.

Thoughts?

Thanks,
William

Simplify archetype.childNodePathBase method

In Archetype there are two methods to handle paths. Looking at each one, it seems childNodePathBase could return just path().

public String parentNodePath() {

    // remove both "/"  and attribute name
    return path().substring(0, path().length() - rmAttributeName.length() - 1);
}

public String childNodePathBase() {
    return parentNodePath() + PATH_SEPARATOR + rmAttributeName;
}

Editing archetype

Hello,

I am using ADLParser for reading structure of archetype, definition and ontology, and fine.
If I want to add new term_definitions and term_bindings programmatically, how can i do it?
I think that i can create new ArchetypeTerm and OntologyBindingItem and add in the lists, but how can they save in the adl file?

Thanks for your help.

Regards.

regarding ResourceItem

Hi,

A short notification for there is a small but disturbing problem in Java-lib code, which I was studying for some project purpose.

In the code in java-libs is in conflict with the specifications (the specifications are right, also conform the many examples on CKM). It is not a big thing, but can be confusing for someone new in OpenEHR.

I did not find a Jira-project to post it, so I do it here.

Thx
Bert

The explanation, for if some wants to repair it.

It is about these documents/source files:

  1. https://github.com/openEHR/java-libs/blob/master/openehr-aom/src/main/java/org/openehr/am/archetype/Archetype.java
  2. https://github.com/openEHR/java-libs/blob/master/openehr-rm-core/src/main/java/org/openehr/rm/common/resource/ResourceDescription.java
  3. https://github.com/openEHR/java-libs/blob/master/openehr-rm-core/src/main/java/org/openehr/rm/common/resource/AuthoredResource.java

and this:
4) http://www.openehr.org/releases/AM/latest/docs/ADL1.4/ADL1.4.html#_description_section
5) http://www.openehr.org/releases/AM/Release-2.0.6/docs/AOM1.4/AOM1.4.html#_resource_description_class

In 5 is details of kind Hash<String, ResourceDescription>, which is also in analogy with 4, where there is an example.
But this conflicts with 1, where there is the code of the Archetype-class which inherits from 3 (where the ResourceDescription is found, which is indeed the ResourceDescription class from 2)

There error also occurs in
https://github.com/openEHR/reference-models/blob/master/models/openEHR/Release-1.0.2/XSD/Resource.xsd

Suggestion for error in org.openehr.am.validation.RMInspector

  • In lines 327 and 357 of org.openehr.am.validation.RMInspector, a null pointer exception is raised since sometimes the "rmClass.getSimpleName()" (inside log.debug) is null. Therefore, we propose the insertion of the following code:
if(rmClass != null) {
     log.debug("rmClass: "+ rmClass.getSimpleName());
} else {
     log.debug("rmClass null");
}

Error while flattening oet file.

Hello,
I am using openehr 1.0.4 (1.0.11-SNAPSHOT as well) java ref impl libs to process a oet template.
I get the error,

org.openehr.am.template.FlatteningException: no constraint on path: /items[at0046] of openEHR-EHR-CLUSTER.symptom.v1
at org.openehr.am.template.Flattener.applyRule(Flattener.java:802)
at org.openehr.am.template.Flattener.applyRules(Flattener.java:779)

the same thing happens with both versions, 1.0.4 as well as 1.0.11-SNAPSHOT.
Link to the oet file I am trying to process.
https://drive.google.com/file/d/0B2rfmXR_HvZQanQ0eVFFRDdNTUE/view?usp=sharing

The java code is out of the test case for OET (oet-parse module in openehr, javalibs maven project).
I am working on Linux, Jdk1.8, maven3 dev-environment.

Please help, What am I missing? What do I have to do in the template to make this work?
Is the template file itself invalid?
Please help with this i am stuck and unable to proceed.

Thanks,
Subhro.

About database design

After view all of the codes, I think this project realized the openEHR standards very well. But if I want to put them into practice, the database design is very important. The openEHR provides a method called "node+path", I don't know whether it would work well with these libs. So my question is if I want to use these codes to build my own EHR project, how should the database be designed to guarantee that the project can work well with large amount of data and the query is efficient. Thank you.

Error While Installation

I am getting some error while installation which are
Please help me how to resolve them

/**/

Tests run: 55, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] The openEHR Reference Java Implementation .......... SUCCESS [ 1.768 s]
[INFO] openEHR Measurement Service Implementation ......... SUCCESS [ 4.627 s]
[INFO] openEHR Reference Model Core ....................... SUCCESS [ 7.326 s]
[INFO] openEHR Minimum Terminology Service ................ SUCCESS [ 4.527 s]
[INFO] openEHR Reference Model Domain ..................... SUCCESS [ 6.917 s]
[INFO] openEHR Archetype Object Model ..................... SUCCESS [ 5.835 s]
[INFO] openEHR Archetype Profile .......................... SUCCESS [ 4.396 s]
[INFO] java ADL Parser .................................... FAILURE [ 59.394 s]
[INFO] java dADL Parser ................................... SKIPPED
[INFO] ADL Serializer ..................................... SKIPPED
[INFO] openEHR OET Template Parser and Flattener .......... SKIPPED
[INFO] XML Serializer ..................................... SKIPPED
[INFO] openEHR Reference Model Object Builder ............. SKIPPED
[INFO] openEHR RM XML Data Binding Component .............. SKIPPED
[INFO] java dADL Binding .................................. SKIPPED
[INFO] openEHR RM Skeleton Instance Generator ............. SKIPPED
[INFO] Archetype Validator ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2014-12-26T19:40:34+05:30
[INFO] Final Memory: 88M/234M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project rm-builder: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\gd\Desktop\java-libs-master\java-libs-master\rm
-builder\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn -rf :rm-builder
/**/

.

where is the class "ADLParser"?

I just cannot find the class ADLParser. I can test adl-parser in command line, but after I import the project to eclipse using m2e, there are errors showing that ADLParser cannot be resolved to a type.

XMLSerializer#printStringMap(label, map, out) issue

Hello,

I'm trying to serialize my archetype as XML. When I have an archetype with an description like this:

description
    original_author = <
        ["date"] = <"2015-01-01">
        ["name"] = <"Sample Author">
        ["organisation"] = <"Sample Organisation">
        ["email"] = <"[email protected]">
    >

it gets printed in the XML like this:

<original_author id="date" />
<original_author id="name" />
<original_author id="organisation" />
<original_author id="email" />

when it should be printed like this:

<original_author id="date">2015-01-01</original_author>
<original_author id="name">Sample Author</original_author>
[...]

The issue is very likely located inside the org.openehr.am.serialize.XMLSerializer#printStringMap-method:

    private void printStringMap(String label, Map<String, String> map, Element out) {

        if(map != null && !map.isEmpty()) {
            for(Map.Entry <String, String> entry : map.entrySet()) {
                Element elm = new Element(label, defaultNamespace);
                out.getChildren().add(elm);
                elm.setAttribute("id", entry.getKey());
                if (entry.getValue() != null) {
                    elm.setText(map.get(entry.getValue()));
                }
            }
        }
    }

It looks like map.get(...)-call was accidently used in elm.setText(map.get(entry.getValue()). Please fix!

Mixed rmTypeName from RM and Java

Some CObjects have rmTypeName equals as the specification, and some others have the Java class names, e.g. DvQuantity (Java) instead of DV_QUANTITY (specs).

I believe all rmTypeNames should be as the specs. Is that a bug or is on purpose?

Creating instance for arquetypes

Hello,

For creating instance for arquetypes, ¿is using DADL Parser? or not?

Where can i find information over this?

Regards.

Small correction to XSD in oet-parser

I'm trying to validate the OPTs generated by the Template Designer.

The TD is generating a template_id in the definition element of OPTs and this schema doesn't include that node: https://github.com/openEHR/java-libs/blob/master/oet-parser/src/main/xsd/Template.xsd

Current:

<xs:complexType name="C_ARCHETYPE_ROOT">
  <xs:complexContent>
    <xs:extension base="C_COMPLEX_OBJECT">
      <xs:sequence>
        <xs:element name="archetype_id" type="ARCHETYPE_ID"/>
        <xs:element name="default_values" type="DEFAULT_VALUE" minOccurs="0" maxOccurs="unbounded"/>

Proposed change:

<xs:complexType name="C_ARCHETYPE_ROOT">
  <xs:complexContent>
    <xs:extension base="C_COMPLEX_OBJECT">
      <xs:sequence>
        <xs:element name="archetype_id" type="ARCHETYPE_ID"/>
        <xs:element name="template_id" type="TEMPLATE_ID" minOccurs="0"/>
        <xs:element name="default_values" type="DEFAULT_VALUE" minOccurs="0" maxOccurs="unbounded"/>

Example instance generated by TD: https://github.com/ppazos/cabolabs-ehrserver/blob/master/opts/Encuentro.opt

Problematic portion:

<definition>
...
<archetype_id>
  <value>openEHR-EHR-COMPOSITION.encounter.v1</value>
</archetype_id>
<template_id><!-- TD generated this -->
  <value>Encuentro</value>
</template_id>
<term_definitions code="at0000">
...

BUG: Tests for CDVScale where implemented on windows :)

Build fails on linux because the ADL files are referenced like adl-test-ENTRY.c_dv_scale.test.adl and the file is called adl-test-entry.c_dv_scale.test.adl

Note the upper case ENTRY vs the lower case in CDvScaleTest. In Windows the files are the same, in linux case should be exactly the same.

All tests developed in this way are failing on linux.

StackOverflowError when calling Archetype#hashCode

Hello, when I'm calling Archetype.toString(), I get the following error:

Exception in thread "main" java.lang.StackOverflowError
    at org.openehr.rm.common.resource.ResourceDescriptionItem.hashCode(ResourceDescriptionItem.java:210)
    at java.util.Objects.hashCode(Objects.java:98)
    at java.util.HashMap$Node.hashCode(HashMap.java:296)
    at java.util.AbstractMap.hashCode(AbstractMap.java:507)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:215)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    at org.openehr.rm.common.resource.ResourceDescription.hashCode(ResourceDescription.java:227)
    at org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:909)
    at org.openehr.rm.common.resource.AuthoredResource.hashCode(AuthoredResource.java:186)
    [....]

The bug seems to result from ResourceDescription using its parentResource field (which is the archetype) as part of its hashCode. I don't know if this is intentional.

This bug is annoying because it also breaks Archetype#toString.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.