On 8/19/05, Dan Diephouse <[EMAIL PROTECTED]> wrote: <snip>
> To clarify the use cases: > 1. Schema exists, but no java code > 2. Java code exists, but no schema > 3. Both schema and java exist. > How do we map between them, even when there is very little correlation > betwen java and schema. Each one is pretty important I think. > > I see something a bit different then Dennis. (now where is my virtual > white board....) On the left pane I would see a structural > representation of the schema portions. In the middle is a place to apply > "actions" to a chunk of schema. On the right I would see a list of > actions. Actions would be "create object," "set property," or even "run > this piece of java code (via janino, groovy or the like)". > > Say I have a schema like so: > <xsd:complexType name="book"> > <xsd:sequence> > <xsd:element name="author" type="xsd:string"/> > <xsd:element name="title" type="xsd:string"/> > </xsd:sequence> > </xsd:complexType> > > I'd see this on the left (with the option to view the schema source) > + book > |- author > |- title i've been playing around with ideas this week. i've come to the conclusion that abstract representation is vital. what was worrying me for a little while is that different schemas can be equivalent for java mapping purpose. for example, consider two similar schemas which differ only by choice of whether to define a complex type anonymously. a more abstract representation of the schema would help users focus on the mapping and help the tool to guess correctly. this idea can also be applied on the object side. i've added some thoughts to http://people.apache.org/~rdonkin/tool/tune.html (together with another demonstration applet). representations like these on both sides would allow easy and efficent wiring to be created. so, rather than clicking on 'setProperty', i'd see the user just choosing to add a pipe between the xml and the binding point. this would allow intermediary steps to be added easily which may be library pipes or scripts. - robert
