Re: [Simple-support] Problem with override
Brought to you by:
niallg
|
From: saurabh s. <sau...@ya...> - 2009-02-27 02:12:49
|
Hi,
But this solution will always serialize the Formula to "reference", am I right?
What if one wants to have "reference" , "constant" or "function" depending on the actual implementation?
Is this possible?
Regards,
Saurabh.
________________________________
From: Niall Gallagher <gal...@ya...>
To: "sim...@li..." <sim...@li...>; Sacchi Giovanna <gio...@te...>
Sent: Thursday, 26 February, 2009 6:20:32 PM
Subject: Re: [Simple-support] Problem with override
Hi,
Just name the @Element like so.
@Element(name="reference")
Formula formula;
This will serialize the Formula class as "reference".
Hope this helps,
Niall
--- On Thu, 2/26/09, Sacchi Giovanna <gio...@te...> wrote:
From: Sacchi Giovanna <gio...@te...>
Subject: [Simple-support] Problem with override
To: "sim...@li..." <sim...@li...>
Date: Thursday, February 26, 2009, 3:13 AM
Hi,
I’m trying to serialize a class similar to this one:
publicclassBinding {
@Attribute
privateType type;
@Attribute
privateString name;
@Attribute
privateSide side;
@Attribute(required=false)
privateString part;
@Element
privateFormula formula;
...
}
Where Formula is an interface implemented by three classes: Constant, Function and Reference. For instance, I have annotated the Reference class, like that:
publicclassReference implementsFormula {
@Attribute
privateString activity;
@Attribute
privateType type;
@Attribute
privateString name;
@Attribute
privateSide side;
...
}
When the Binding class is serialized the following xml file is produced:
<bindingtype="NORMAL" name="par21" side="IN">
<formulaclass="com.tilab.wemash.model.Reference" activity="webServiceActivity1" type="NORMAL" name="par11" side="OUT"/>
</binding>
I would like to know if it there is any way to produce, instead, the following xml:
<bindingtype="NORMAL" name="par21" side="IN">
<referenceclass="com.tilab.wemash.model.Reference" activity="webServiceActivity1" type="NORMAL" name="par11" side="OUT"/>
</binding>
That is: when the element formula of the Binding is serialized, I want that the name of the class Reference is used as element name instead of the name of the interface implemented by the class Reference.
Regards,
Giovanna
------------------------------------------------------------------
Telecom Italia
Giovanna Sacchi
Information Technology
Innovation, Architecture & Quality
IT Innovation
Via G. Reiss Romoli, 274 - 10148 Torino
+ 39 011 2288040
+ 39 331 6001656
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.Rispetta l'ambiente. Non stampare questa mail se non è necessario.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/ |