Adding a new method to the Archetype class
|
Hi, I know that the nodeID attribute of CObject is used to distinguish between two sibling nodes, but when I create an archetype using the Ocean's Archetype Editor, each node in the ADL has a different nodeID value, so we can use the nodeID to distinguish between all nodes in the archetype.
So, is it right to think of adding a new method to the Archetype class to get a node from it's nodeID? it's like the node(path) method but node(nodeID).
I think it's easier to use nodeID instead of the node path, for example, if you have a RM object instance (rmIns) and the archetype (arch) that constraints this instance, with arch.node( rmIns.archetypeNodeId ) you'll get the particular node that constraints the rmIns, so you can validate the rmIns against it's constraints.
I can't find an easy alternative way to do this, I mean, walk through an RM instance and validate each node against the corresponding archetype nodes. What do you think? Cheers, Pablo Pazos Gutierrez Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you. |
_______________________________________________ Ref_impl_java mailing list Ref_impl_java@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java