db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Boden <gareth.bo...@egsgroup.com>
Subject Re: Emitting XML from Torque OM classes
Date Wed, 08 Jan 2003 11:12:37 GMT
I submitted something to scarab with a possible solution to this, and 
there was some discussion on the list (but not much).

Contact me if you want more info.

Gareth

On Tuesday, January 7, 2003, at 06:24  pm, Alan Hodgkinson wrote:

>
> Dear All,
>
> I have a requirement to be able to emit XML output from
> my Torque objects. I'd like this to be a normal part of
> all my Torque based objects.
>
> Ideally, what I would like is to be able to get XML strings
> from Torque objects. E.g. have methods in the generated
> classes like:
>
>   public class BaseMytable {
>     public String toXML() {...}
>
> The XML it returns would look (something) like
>
>   <Mytable>
>     <field1>value1</field1>
>     <field2>value2</field2>
>     ...
>   </Mytable>
>
> 0. Is this being implemented or is it already implemented?
>
> 1. The toXML methods should be generated. Where in the Torque
>    classes would be the best place to add it? (I'm assuming
>    that that would become a new torque 'feature')
>
> 2. Is BaseMytable the best place for the generator to place
>    the toXML method (as opposed to the other generated classes)?
>
> 3. I'd also like to extend this to be able to include (recursively)
>    the XML of tables (torque objects) referenced by foreign keys.
>    This might be via a separate method toExtendedXML (perhaps
>    with a more suitable method name).
>
> 4. It would be nice to have the Peer classes also be able to
>    turn a Result set for their table to XML, but I don't know
>    enough of the semantics of the Base classes to know if this
>    is the right approach. Any suggestions?
>
> I'd be interested in your thoughts, encouagement and particaularly
> hints (or even a road map of) about the Torque classes I should
> use/study/extend in order to implement this.
>
> Many thanks in advance:
>
> Alan.
>
> P.S. The long term goal is to use it in conjunction with Cocoon.
>
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-torque-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:turbine-torque-dev-help@jakarta.apache.org>
>
>
---
Development Team Leader, eGS, 5-7 Singer Street, London EC2A 4BQ. +44 
(0)20 7336 1440

CONFIDENTIALITY: This is email is confidential and intended solely for 
the use of the individual to whom it is addressed.  Any views or 
opinions presented are solely those of the author and do not 
necessarily represent those of eGovernment Solutions (UK) Ltd.  If you 
are not the intended recipient, be advised that you have received this 
email in error and that any use, dissemination, forwarding, or copying 
of this email is strictly prohibited.  If you have received this email 
in error please contact the sender.


Mime
View raw message