You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Victor Mote <vi...@outfitr.com> on 2025/02/15 20:37:34 UTC
XmlSchemaContent convenience patch
Hi WS Developers:
Thanks for a great product.
I have attached a patch to 2.3.0 for your consideration, which simply adds
three abstract methods to org.apache.ws.commons.schema.XmlSchemaContent.
All subclasses in the source tree already have an implementation for each
in place. The purpose is just to avoid looping through the subclasses and
checking/casting an XmlSchemaContent instance to each one to get the value.
The only one I care about or really wish for is the getBaseTypeName, but,
while creating the code, noticed that the other two methods fit the same
pattern. It looks like something similar could be done with the setters,
and, in fact, all three instance variables could be pushed up to the
superclass. I leave that to your judgment, and there may be good reasons
not to do that.
Thanks very much.
Victor Mote
Re: XmlSchemaContent convenience patch
Posted by Colm O hEigeartaigh <co...@apache.org>.
Hi,
Please submit this instead as a pull request on
https://github.com/apache/ws-xmlschema
We can't accept patches to the mailing list.
Thanks,
Colm.
On Sat, Feb 15, 2025 at 8:37 PM Victor Mote <vi...@outfitr.com> wrote:
>
> Hi WS Developers:
>
> Thanks for a great product.
>
> I have attached a patch to 2.3.0 for your consideration, which simply adds three abstract methods to org.apache.ws.commons.schema.XmlSchemaContent. All subclasses in the source tree already have an implementation for each in place. The purpose is just to avoid looping through the subclasses and checking/casting an XmlSchemaContent instance to each one to get the value.
>
> The only one I care about or really wish for is the getBaseTypeName, but, while creating the code, noticed that the other two methods fit the same pattern. It looks like something similar could be done with the setters, and, in fact, all three instance variables could be pushed up to the superclass. I leave that to your judgment, and there may be good reasons not to do that.
>
> Thanks very much.
>
> Victor Mote
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org