Return-Path: X-Original-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CE596FF4 for ; Sat, 9 Jul 2011 00:38:14 +0000 (UTC) Received: (qmail 58640 invoked by uid 500); 9 Jul 2011 00:38:14 -0000 Delivered-To: apmail-incubator-isis-dev-archive@incubator.apache.org Received: (qmail 58599 invoked by uid 500); 9 Jul 2011 00:38:14 -0000 Mailing-List: contact isis-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: isis-dev@incubator.apache.org Delivered-To: mailing list isis-dev@incubator.apache.org Received: (qmail 58591 invoked by uid 99); 9 Jul 2011 00:38:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 00:38:13 +0000 X-ASF-Spam-Status: No, hits=4.5 required=5.0 tests=HTML_MESSAGE,MANY_SPAN_IN_TEXT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [130.88.192.208] (HELO t8.cs.man.ac.uk) (130.88.192.208) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 00:38:07 +0000 Received: from cpc1-roch5-0-0-cust79.10-1.cable.virginmedia.com ([86.1.128.80] helo=[192.168.1.12]) by sonoft8.cs.man.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1QfLYG-0001xQ-2Q for isis-dev@incubator.apache.org; Sat, 09 Jul 2011 01:37:44 +0100 From: Iain Flynn Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-2--995306806 Subject: Re: Problem with non-support of Collections as arguments. Date: Sat, 9 Jul 2011 01:37:38 +0100 In-Reply-To: <40354557-8C71-4BB5-96AE-F0C23386DDDA@googlemail.com> To: isis-dev@incubator.apache.org References: <3BDA533E-0173-418D-A3D6-A1F96E6AA884@cs.man.ac.uk> <4E17234E.288.14116B@kevin.kmz.co.za> <4E1731E3.1060006@cs.man.ac.uk> <4E174CEA.10765.966FE@kevin.kmz.co.za> <40354557-8C71-4BB5-96AE-F0C23386DDDA@googlemail.com> Message-Id: X-Mailer: Apple Mail (2.1084) --Apple-Mail-2--995306806 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Dan, An example of a generated class (and some automatically generated = methods) is public abstract class Adaptation extends Ancestor { @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, = int featureID, NotificationChain msgs) { switch (featureID) { case = AnidirectoryPackage.ADAPTATION__ADAPTATION_OF: if (adaptationOf !=3D null) msgs =3D = ((InternalEObject)adaptationOf).eInverseRemove(this, = AnidirectoryPackage.IP__ADAPTATIONS, IP.class, msgs); return = basicSetAdaptationOf((IP)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } @Override public NotificationChain eInverseRemove(InternalEObject = otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case = AnidirectoryPackage.ADAPTATION__ADAPTATION_OF: return basicSetAdaptationOf(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } } As you can see, this has some references to AnidirectoryPackage. public class AnidirectoryPackage extends EPackageImpl { /** * Returns the meta object for the reference '{@link = dom.anidirectory.AdaptationCharacter#getBelongingTo Belonging = To}'. * * * @return the meta object for the reference 'Belonging = To'. * @see dom.anidirectory.AdaptationCharacter#getBelongingTo() * @see #getAdaptationCharacter() * @generated */ public EReference getAdaptationCharacter_BelongingTo() { return = (EReference)adaptationCharacterEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the attribute '{@link = dom.anidirectory.AdaptationCharacter#getSurname Surname}'. * * * @return the meta object for the attribute 'Surname'. * @see dom.anidirectory.AdaptationCharacter#getSurname() * @see #getAdaptationCharacter() * @generated */ public EAttribute getAdaptationCharacter_Surname() { return = (EAttribute)adaptationCharacterEClass.getEStructuralFeatures().get(1); } } If that doesn't help, just say so. Thanks again, - Iain On 8 Jul 2011, at 22:10, Dan Haywood wrote: > Thanks for all the detail, but I can't quite visualise it. Can you = paste some source files with all the different bits (ie a small test = case that exhibits the problem)?=20 >=20 > Thx > Dan >=20 > Sent from my iPhone >=20 > On 8 Jul 2011, at 21:02, Iain Flynn wrote: >=20 >> Hi Kevin, >>=20 >> The wrapper is a class containing Isis methods that has an empty = subclass of AbstractDomainObject has an inner class, an instance of = which it has as an attribute. The wrapper has the ADO methods and calls = the inner object to take care of them. >>=20 >> (I've actually discovered since last time that this wrapper may well = not be necessary, but I don't have reason to believe that's relevant = here.) >>=20 >> EMF generates a class for each domain object I feed into it. These = classes have the attributes and operations I specify, as well as some = EMF helper methods. >>=20 >> EMF also generates two classes for the model, known in my project as = AnidirectoryFactory and AnidirectoryPackage. The latter is the one using = the EMF class (EResource) that has the reference to addAll(). >>=20 >> The AnidirectoryPackage, to paraphrase the provided description, = contains accessors to the classes and their operations, features, and = datatypes for use by EMF's metamodel. >>=20 >> As this class is the one with the offending reference, does this = sound like something to try composition with? It does use EResource as a = return value, but I don't believe the generated classes make any = references to it. >>=20 >> Thank you again for your help, >>=20 >> - Iain Flynn. --Apple-Mail-2--995306806--