[prev in list] [next in list] [prev in thread] [next in thread]
List: castor-dev
Subject: Re: [castor-dev] fix for optional types
From: Dean Hiller <dhiller () avaya ! com>
Date: 2002-12-31 13:43:14
[Download RAW message or body]
Ok, I think I understand, but I think there may still be a small bug.
Maybe we want the line changed from
if((!type.isEnumerated()) && jType.isPrimitive())
to
if((!type.isEnumerated()) && jType.isPrimitive() && !isRequired())
The reason I ask is in the attached schema, there is a required field
lampMode. It is required and must always exist, yet the source code
generated a _has_lampMode field like it is optional when it isn't. Can
you take a look at this real quick.
thanks,
Dean
Arnaud Blandin wrote:
> Hi Dean,
>
> The 'has' method is generated mainly for the Marshalling Framework to
> identify whether or not a primitive value has been used so I guess the
> code already in place is correct.
>
> Arnaud
> > -----Original Message-----
> > From: Dean Hiller [mailto:dhiller@avaya.com]
> > Sent: Thursday, December 26, 2002 9:57 PM
> > To: castor-dev@exolab.org
> > Subject: [castor-dev] fix for optional types
> >
> > Can someone change line 174 of FieldInfo.java which says
> > if((!type.isEnumerated()) && jType.isPrimitive())
> >
> > to
> > if(!isRequired())
> >
> > I don't understand why in the world isEnum and isPrimitive is there.
> I
> > already owe one test case and will write one for this also. Company
> > network back up, so I will write both tomorrow.
> > thanks,
> > Dean
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > minimalist@exolab.org with a subject of:
> > unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> minimalist@exolab.org with a subject of:
> unsubscribe castor-dev
["lamp-mode-event.xsd" (text/plain)]
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.ecma.ch/standards/ecma-323/csta" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
xmlns:csta="http://www.ecma.ch/standards/ecma-323/csta" \
elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:annotation>
<xsd:documentation>CSTA-lamp-mode-event</xsd:documentation>
</xsd:annotation>
<xsd:include schemaLocation="device-identifiers.xsd"/>
<xsd:include schemaLocation="extension-types.xsd"/>
<xsd:include schemaLocation="physical-device-features.xsd"/>
<xsd:include schemaLocation="status-reporting.xsd"/>
<xsd:element name="LampModeEvent">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="csta:monitorCrossRefID"/>
<xsd:element name="device" type="csta:SubjectDeviceID"/>
<xsd:element name="lamp" type="csta:LampID"/>
<xsd:element name="lampLabel" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="lampMode" type="csta:LampMode"/>
<xsd:element name="lampBrightness" type="csta:LampBrightness" minOccurs="0"/>
<xsd:element name="lampColor" type="csta:LampColor" minOccurs="0"/>
<xsd:element ref="csta:extensions" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
minimalist@exolab.org with a subject of:
unsubscribe castor-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic