>>>>> "Keith" == Keith Visco <[EMAIL PROTECTED]> writes:
> Date: Thu, 31 Oct 2002 13:56:54 -0600
> From: Keith Visco <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] [Source Generator] lists and names
> Steffen Fiedler wrote:
>>
>> Hi,
>>
>> I create a class that comtains a list of objects from my own Classes:
>>
>> <!--======================Group===================-->
>>
>> <xsd:element name="Group">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="id" type="xsd:integer"
>> minOccurs="1" maxOccurs="1"/>
>> <xsd:element name="name" type="xsd:string"
>> minOccurs="1" maxOccurs="1"/>
>> <xsd:element name="users" ref="User"
>> maxOccurs="unbounded"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> <!--======================User=======================-->
>> <xsd:element name="User">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="id" type="xsd:integer"
>> minOccurs="1" maxOccurs="1"/>
>> <xsd:element name="name" type="xsd:string"
>> minOccurs="1" maxOccurs="1"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>>
>> That works, but i have two questions:
>> -Why is the name-attribute of the list-element ignored? How can i generate
>> methods get/setUsers() instead of get/setUser() ?
I get a get/setName set in the list-element.
> Sounds like a bug.
Is it specified that getUsers should be generated? the element is
called "users", while the reference is to "user". I think the name
attribute is ignored, if ref is present.
>> -The generated class works intern with Vector/ArrayList for the
>> list-representation, but
>> the getter/setter are generated with Arrays. Its possible to generate
>> them for Vectors too
>> (public Vector getUsers(), public void setUsers(Vector list) )
>>
> If you use 0.9.4, update the castorbuilder.properties file and uncomment
> the following line:
> #org.exolab.castor.builder.extraCollectionMethods=true
> --Keith
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
:wq!
Daan Hoogland Unix consultants v v
[EMAIL PROTECTED] OO developers \ /
### ## ## # >---X---<
http://snow.nl # # # # # # # # / \
Snow B.V. ## # # # # # # # ^ ^
Tel. (+31)30-6051501 # # # # # # # #
Fax. (+31)30-6037445 ### # # ## ## ##
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev