Hi Srdjan,
Srdjan Djuricic schrieb:
Hi Oliver,
Sorry for the late reply. I believe our uses cases are different. You
are asking how castor creates java classes when you have extend/restrict
from xml schema. I was asking about an option in the configuration
files for the default super class for all classes.
Regarding the use case, it depends on the functionality of the super
class you would like to insert. To add additional attributes or if you
want to express an inheritance structure, it would be cleaner if you
expand your schema, that models your java code. If I would be strictly
speaking in my use case, each type has to have an super class Thing
without any elements. That's because I map concepts from the ontology
world to xml schema defining web services that fulfill a request from
owl-s as good as possible.
I also thought about generating additional functionality into the
generating java classes, but that's more about static test cases that
delivers a test value for each generated get method. Do you know
something about it?
I am not sure if
there a explicit description on castor's site that tell you exactly how
it treats a different xml construct. The best way might be to see and
generate java classes from your xsd and see what exactly happens.
That's what I do ;-) Current status is, that Castor can generate the
desired java code on the basis of my reference schema. But because I
can't generate this corresponding schema constructs with the Castor API
my efforts stagnate a bit.
Best Regards,
Oliver
-----Original Message-----
From: Oliver Fourman [mailto:[EMAIL PROTECTED]
Sent: March 6, 2007 1:45 AM
To: [email protected]
Subject: Re: [castor-user] Use of superclass for source generation
Hi Srdjan,
I am interested in your schema that deals with super classes. Can
you post an example?
Last week I posted a similar question concerning this object:
http://archive.castor.codehaus.org/user/45E72825.80102%40dfki.de
http://archive.castor.codehaus.org/dev/45E7FD70.4050401%40dfki.de
My goal is to define types, that extends / restrict other types in my
schema. Next, I'm also interested what the Castor CodeGen does with such
types when translating them into the oo world.
Do you know any good lists where such xml schema topics are discussed?
Best regards,
Oliver
Srdjan Djuricic schrieb:
Hello,
I am generating java classes from the XML schemas and I am also
setting a super class to all the generated classes. Besides just
having classes that extend the supertype is it possible to somehow
include the properties of the super class in the class descriptions so
that when I am marshalling a java object properties inherited from the
supertype would be included in the marshalled output? I know I am
probably asking for too much here :)
Thanks,
Srdjan
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email