Skip to Navigation | Skip to Content

Ref_impl_Java mailing list archives

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Adding a new method to the Archetype class


Pablo,

If each node has a unique id, this would work. But it's not guaranteed
that each node will have a id. Some leaf level nodes do not have any
node id at all. They will have to be located by path e.g.
"/items[at0001]/value"

Cheers,
Rong

On 26 January 2010 19:01, pablo pazos <pazospablo@hotmail.com> wrote:
> 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