The Resource contains the Description, so,Description.parent = Resource See http://openehr.org/releases/1.0.2/architecture/rm/common_im.pdf page 60
-- Kind regards, Eng. Pablo Pazos Gutiérrez http://cabolabs.com From: dferre...@fe.up.pt To: ref_impl_java@lists.openehr.org Subject: Doubt parsing ADL file Date: Wed, 6 May 2015 17:43:00 +0100 Hi, I’m using the java-libs to parse some adl files from the Clinical Knowledge Manager(CKM).I’m getting some crashes due to stackoverflow when trying to do Archetype.toString().When I checked the Archetype I saw a loop. The field Archetype.description.parentResourse was pointing back at the Archetype. My confusion seems to be in the function org.openehr.rm.common.resource.AuthoredResource.setDescription().I don’t understand why : if (description != null && description.getParentResource() != this) { description.setParentResource(this); }In this code we send “this” to be set as its own parentResource in the description. Can anyone help me understand why this is happening? Best,Duarte Ferreira _______________________________________________ Ref_impl_java mailing list Ref_impl_java@lists.openehr.org http://lists.openehr.org/mailman/listinfo/ref_impl_java_lists.openehr.org
_______________________________________________ Ref_impl_java mailing list Ref_impl_java@lists.openehr.org http://lists.openehr.org/mailman/listinfo/ref_impl_java_lists.openehr.org