Without a short XML schema fragment, this will be hard to tell. So let's
try to be a bit more specific .. ;-).
Werner
PS I have been working quite recently with Java classes as generated
from the FpML 4.2 standard, where the instruments as described by you
are specified in great detail. When you generate classes from this XML
schema(ta), you get several hundred classes, and I have not seen any
problems, though a lot of 'extensions' are used.
Louis, George (Liquidity & Risk Technology) wrote:
Hello,
I have an XSD which defines a generic "Trade" (with some common elements)
In that XSD, I subclass TradeType into "Bond" and "Equity" (with trade
specific elements, inherited by "extension")
When I build the java Castor objects, I get the following methods:
getBond(index)
getBondCount
GetEquity(index)
getEquity(Count)
What I really want is a "getTrade(index)" and "getTradeCount()" which
give me everything for both Equity and Bond (and which I can cast into
Equity and Bond later)
As I add new subclassed trade types (ie, "Swap"), I'd like it so my code
doesn't have to change (everything is initially referred to as
"Trade"). Right now I have to loop through getBond and getEquity.
Any idea how to do this?
TIA -George
------------------------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or
proprietary, and if you are not an intended recipient, please notify the
sender, do not use or share it and delete it. Unless specifically
indicated, this message is not an offer to sell or a solicitation of any
investment products or other financial product or service, an official
confirmation of any transaction, or an official statement of Merrill
Lynch. Subject to applicable law, Merrill Lynch may monitor, review and
retain e-communications (EC) traveling through its networks/systems. The
laws of the country of each sender/recipient may impact the handling of
EC, and EC may be archived, supervised and produced in countries other
than the country in which you are located. This message cannot be
guaranteed to be secure or error-free. This message is subject to terms
available at the following link:
http://www.ml.com/e-communications_terms/. By messaging with Merrill
Lynch you consent to the foregoing.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email