RE: Question about ArchetypeSlot.path()
|
Hi Rong, Attached is the adl archetype that I mention in my first email from Jan 15 2010. It is a section with archetype slots to entries. The same thing (entries with the path of the parent attribute) happens with all my Section archetypes with slots to entries. I hope this helps. Best regards, Pablo. > Date: Tue, 26 Jan 2010 09:18:41 +0100 > Subject: Re: Question about ArchetypeSlot.path() > From: rong.acode@gmail.com > To: ref_impl_java@openehr.org > > Hi Pablo, > > Thanks for this bug report. It would be very helpful if you could > provide a minimum archetype and testcase that could demonstrate this > bug and possibly the fix. > > Cheers, > Rong > > 2010/1/17 pablo pazos <pazospablo@hotmail.com>: > > More info, > > I think it's a bug because in the archetype.pathNodeMap field I have only 2 > > nodes with paths: "/" and "/items". > > In archetype.pathNodeMap["/items"] is the 3rd slot of the archetype, so I > > think when the /items attribute is found it is loaded into the > > archetype.pathNodeMap with the key "/items", when the 1st slot is found it > > is loaded into the pathNodeMap with the same path "/items", and so on, so > > the last processed node is the 3rd slot (node 0004) and it entry override > > the previous "/items" key. > > I'm stuck with this :/ > > Any ideas? > > > > this is the XML view of the pathNodeMap: > > <pathNodeMap> > > <entry> > > <string>/</string> > > <org.openehr.am.archetype.constraintmodel.CComplexObject > > reference="../../../definition"/> > > </entry> > > <entry> > > <string>/items</string> > > <org.openehr.am.archetype.constraintmodel.ArchetypeSlot > > reference="../../../definition/attributes/org.openehr.am.archetype.constraintmodel.CMultipleAttribute/children/org.openehr.am.archetype.constraintmodel.ArchetypeSlot[3]"/> > > </entry> > > </pathNodeMap> > > > > Thanks, > > Pablo. > > > > ________________________________ > > From: pazospablo@hotmail.com > > To: ref_impl_java@openehr.org > > Subject: Question about ArchetypeSlot.path() > > Date: Fri, 15 Jan 2010 23:16:52 -0300 > > > > Hi, > > I've a SECTION archetype with 3 slots: > > definition > > SECTION[at0000] matches { -- Evaluación de vía aérea > > items cardinality matches {0..*; unordered} matches { > > allow_archetype EVALUATION[at0002] occurrences matches {0..1} matches { -- > > EVALUATION > > include > > archetype_id/value matches > > {/openEHR-EHR-EVALUATION\.via_aerea(-[a-zA-Z0-9_]+)*\.v1/} > > } > > allow_archetype ACTION[at0003] occurrences matches {0..1} matches { -- > > ACTION > > include > > archetype_id/value matches > > {/openEHR-EHR-ACTION\.via_aerea(-[a-zA-Z0-9_]+)*\.v1/} > > } > > allow_archetype ACTION[at0004] occurrences matches {0..1} matches { -- > > ACTION > > include > > archetype_id/value matches > > {/openEHR-EHR-ACTION\.resumen_actuacion(-[a-zA-Z0-9_]+)*\.v1/} > > } > > } > > } > > When I use the ADL parser to get the AOM Archetype instance and print out > > it's definition as XML, I see this: > > - The SECTION node has path "/", OK! > > - The SECTION has an "items" attribute, this attribute has path "/items", > > OK!!! > > - The first children of "items" is an ArchetypeSlot with nodeId "at0002", so > > I spect that this node has path "/items[at0002]" but has path="/items", like > > the parent attribute. > > - Is this correct or is a bug in the ADL Parser? > > I'm using adl-parser-1.0.1.jar, the same happens with > > adl-parser-1.0.2-SNAPSHOT.jar > > BTH, I use XStream to serialize the objects to XML. > > <org.openehr.am.archetype.constraintmodel.CComplexObject> > > <anyAllowed>false</anyAllowed> > > <path>/</path> > > <rmTypeName>SECTION</rmTypeName> > > <occurrences> > > <lower class="int">1</lower> > > <upper class="int">1</upper> > > <lowerIncluded>true</lowerIncluded> > > <upperIncluded>true</upperIncluded> > > </occurrences> > > <nodeID>at0000</nodeID> > > <attributes> > > <org.openehr.am.archetype.constraintmodel.CMultipleAttribute> > > <anyAllowed>false</anyAllowed> > > <path>/items</path> > > <rmAttributeName>items</rmAttributeName> > > <existence>REQUIRED</existence> > > <children> > > <org.openehr.am.archetype.constraintmodel.ArchetypeSlot> > > <anyAllowed>false</anyAllowed> > > <path>/items</path> > > <rmTypeName>EVALUATION</rmTypeName> > > <occurrences> > > <lower class="int">0</lower> > > <upper class="int">1</upper> > > <lowerIncluded>true</lowerIncluded> > > <upperIncluded>true</upperIncluded> > > </occurrences> > > <nodeID>at0002</nodeID> > > ... the XML continues > > > > Best regards, > > Pablo Pazos Gutierrez > > > > > > ________________________________ > > Windows Live: Keep your friends up to date with what you do online. > > ________________________________ > > Keep your friends updated— even when you’re not signed in. > > _______________________________________________ > > Ref_impl_java mailing list > > Ref_impl_java@openehr.org > > http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java > > > > > > _______________________________________________ > Ref_impl_java mailing list > Ref_impl_java@openehr.org > http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java Windows Live: Keep your friends up to date with what you do online. |
archetype (adl_version=1.4)
openEHR-EHR-SECTION.evaluacion_via_aerea.v1
concept
[at0000] -- Evaluación de vÃa aérea
language
original_language = <[ISO_639-1::es]>
description
original_author = <
["name"] = <"">
>
details = <
["es"] = <
language = <[ISO_639-1::es]>
purpose = <"Evaluación de vÃa aérea">
use = <"Evaluación de vÃa aérea">
misuse = <"">
>
>
lifecycle_state = <"0">
other_contributors = <>
other_details = <
["references"] = <"">
["MD5-CAM-1.0.1"] = <"6B75E07796E31D133C206DDB40642BB0">
>
definition
SECTION[at0000] matches { -- Evaluación de vÃa aérea
items cardinality matches {0..*; unordered} matches {
allow_archetype EVALUATION[at0002] occurrences
matches {0..1} matches { -- EVALUATION
include
archetype_id/value matches
{/openEHR-EHR-EVALUATION\.via_aerea(-[a-zA-Z0-9_]+)*\.v1/}
}
allow_archetype ACTION[at0003] occurrences
matches {0..1} matches { -- ACTION
include
archetype_id/value matches
{/openEHR-EHR-ACTION\.via_aerea(-[a-zA-Z0-9_]+)*\.v1/}
}
allow_archetype ACTION[at0004] occurrences
matches {0..1} matches { -- ACTION
include
archetype_id/value matches
{/openEHR-EHR-ACTION\.resumen_actuacion(-[a-zA-Z0-9_]+)*\.v1/}
}
}
}
ontology
term_definitions = <
["es"] = <
items = <
["at0000"] = <
text = <"Evaluación de vÃa
aérea">
description = <"Evaluación de
vÃa aérea">
>
["at0002"] = <
text = <"EVALUATION">
description = <"*">
>
["at0003"] = <
text = <"ACTION">
description = <"*">
>
["at0004"] = <
text = <"ACTION">
description = <"*">
>
>
>
>
_______________________________________________ Ref_impl_java mailing list Ref_impl_java@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java