Revision: 444
Author: humberto.naves
Log Message:
Revision: 444
Author: humberto.naves
Log Message:
Hi!
Could you briefly describe what the new checkins are about and what the current plans are?
Best regards,
Erik Sundvall
erisu@imt.liu.se http://www.imt.liu.se/~erisu/ Tel: +46-13-227579
Hi everybody,
The is a little draft documentation for the new Zilics-Models attached.
Cheers,
Humberto Naves
features.txt (9.48 KB)
Apath.txt (4.75 KB)
workbench.txt (1.08 KB)
Hi Humberto,
Thanks for the documentation and the new commits. The feature list looks very impressive. It will be great if they can be merged with the trunk. I started a new branch as a copy of the current trunk. Please feel free to start the merge there.
Cheers,
Rong
The branch is located at http://svn.openehr.org/ref_impl_java/BRANCHES/trunk-zm-merge
/Rong
Wonderful work Humbetro & Co!
As you know some of us have wanted to do similar things for a long
time but have not had the time to prioritize this.
Regarding merging to the trunk, could you describe what functions from
the trunk that are _not_ in your code? If the new code functionality
is a superset of the existing trunk, then maybe what should be done is
more of a "replace" than a "merge" (even though it might technically
be a SVN merge).
Best regards,
Erik Sundvall
erisu@imt.liu.se http://www.imt.liu.se/~erisu/ Tel: +46-13-227579
Humberto Naves wrote:
Very interesting
going from
Archetype Workbench
The archetype workbench is a handy tool for the programmer to do some
useful tasks, such as:
1) Convert between ADL <-> XML formats
2) Static validate instances of Archetype/Templates/Locatables
3) Dynamic validate instances of Locatables (Semantic validation)
against a template/archetype
4) Perform A-path queries on instances of Archetype/Templates/Locatables
(A) Does this mean the XML > ADL is done? If so I will look at
integrating it into our ant based system esp wrt checking via round
tripping e.g. ADL > XML > ADL > Diff & XML > ADL > XML > XMLDiff
(B) By instances, do you mean archetypes & templates or instances
created from a given archetype or template?
C) What exactly do you mean by (3)?
TIA
Adam
Hi Adam,
(A) Yes, XML to ADL conversion is already done.
(B) When I said about static validation I meant a validation of the
object instance itself without relating to any archetype/template. For
example, for a CodePhrase instance to be well defined, its "codeString"
field (and its "terminologyId" field) must be not null, and for a
Archetype instance to be considered well defined, all "nodeId"'s used
in the constraints must be defined in its ArchetypeOntology. Static
validation was created because ZM objects are mutable.
(C) With dynamic validation you can check, for example, if a given
Composition created from a Template matches all constraints of the template.
Cheers,
Humberto Silva Naves
Adam Flinton wrote:
Hi Erik,
There are some functions that are not in our code, for example: compare
function (grater than, equals to and less than) between some ordinal
data types, arithmetic operations (add, sub) between DvDurations, and
some validations of the basic data types are not properly fished.
Cheers,
Humberto Naves
Hi
I tried to build the code but it failed. I attach the surefire error report.
It would be interesting to know if others have succeeded.
Regards
Olof Torgersson
br.com.zilics.archetypes.models.rm.utils.path.ArchPathParserTest.txt (2.59 KB)
To answer ny own question. There's an error in the test code?
ArchPathParserTest.java
public void testParseAndEvaluateFor() throws Exception {
String expr = "for $i in (2, 3, 4), $j in (40, 50) return ($i + $j)";
List<SingleValue> expectedValues = new ArrayList<SingleValue>();
/* code in repository
expectedValues.add(new SingleValue(42));
expectedValues.add(new SingleValue(43));
expectedValues.add(new SingleValue(44));
expectedValues.add(new SingleValue(52));
expectedValues.add(new SingleValue(53));
expectedValues.add(new SingleValue(54));
*/
// Code that works (inner loop changes for each value in outer loop)
expectedValues.add(new SingleValue(42));
expectedValues.add(new SingleValue(52));
expectedValues.add(new SingleValue(43));
expectedValues.add(new SingleValue(53));
expectedValues.add(new SingleValue(44));
expectedValues.add(new SingleValue(54));
ListValue expected = ListValue.getInstanceFromList(expectedValues);
ListValue result = parseAndEvaluate(expr);
assertEquals(expected, result);
}
With this change everything seems to compile fine.
(I'm running Mac OS X, v 10.5.5)
Regards
Olof
11 nov 2008 kl. 10.57 skrev Olof Torgersson:
Hi,
You are correct, there is a bug here caused by a HashMap that I used (so the ordering of entrySet() is unpredictable). To fix this, I will change the current implementation of class “For” and instead of using HashMap, I will use LinkedHashMap. I already corrected this bug here, but since I am behind a firewall, I can’t commit my changes until tomorow.
Cheers,
Humberto Naves
Hi,
What are the licensing terms for using your code?
Olof
11 nov 2008 kl. 16.29 skrev Humberto Naves:
Hi
Is there a plan for how/when this merge can/will be carried out?
I’d be willing to help, but I’m not sure that I know enough about the reference implementation
Regards
Olof
3 nov 2008 kl. 20.43 skrev Rong Chen:
Hi,
We will use MPL, the same license of the current implementation.
Cheers,
Humberto Naves
Hi,
Right now, we have some deadlines to meet and will go back to the merge in about 4 weeks. The merge will take aprox. 2 weeks to complete, thereafter. If you want to collaborate, we can discuss the details…
Best regards,
Humberto
Hi,
I have a question about the class ArchetypeID:
It seems like methods like domainConcept() only return something if you have validated the object.
Is this intended semantics?
Example
ArchetypeID aid = get this from somewhere
aid. domainConcept returns null, whereas
aid.validate();
aid. domainConcept() returns what one would expect.
On the other hand aid.toString() works the same in all cases.
regards
Olof
3 nov 2008 kl. 19.14 skrev Humberto Naves:
Hi,
Is there any news regarding the integration?
Regards
Olof Torgersson
13 nov 2008 kl. 12.34 skrev Humberto Naves:
Hi Olof,
I will look into the template support and code merge within a week or so.
Regards,
Rong