[Simple-support] Fwd: same data-typed ElementList in ElementListUnion
Brought to you by:
niallg
|
From: Jaewoo L. <dl...@gm...> - 2013-01-14 05:17:18
|
I sent a mail attached my project, but the mail wasn't uploaded on
simple-support mailing lists.
So I re-send my e-mail with no attachment.
If you don't receive my project code, please let me know.
Thank you for your help.
---------- Forwarded message ----------
From: Jaewoo Lee <dl...@gm...>
Date: 2013/1/14
Subject: Re: [Simple-support] same data-typed ElementList in
ElementListUnion
To: Niall Gallagher <gal...@ya...>
Hi, Niall.
I attached my code for demonstarating error of ElementListUnion.
I'll brief some about my code.
This project is Read/Write XML Document with using Simple Framework.
Main method is "\src\com\simpletest\test\SimpleMain.java".
and "src\com\simpletest\test\ReadExample.java" is the class operating the
project.
I wanted to implement "ANY" type.
Then, according to your advice, I made new datat-type, "ANYFORALL". It
included all of variables(element, attribute) of all sub-class as
ElementListUnion.
The attached code is miniature of my project.
\src\com\simpletest\something\Task.java is Root Element class.
@Root
public class Task {
@ElementListUnion({
@ElementList(name = "low", entry = "low", inline = true, required =
false, type = HEIGHT.class),
@ElementList(name = "high", entry = "high", inline = true, required =
false, type = HEIGHT.class),
@ElementList(name = "width", entry = "width", inline = true, required =
false, type = AREA.class),
@ElementList(name = "center", entry = "center", inline = true, required =
false, type = AREA.class)
})
private List<Operation> operations;
}
HEIGHT.java and AREA.java included Attrivutes(String value, String unit) as
same.
Could you compare that documents(input.xml, output.xml) with any compare
tool?
-------------------------------------------------------------------------------------
input.xml
<task name="setup">
<low value="4.3" unit="10+3/ul" />
<high value="10.8" unit="10+3/ul" />
<width value="4.3" unit="10+3/ul" />
<center value="10.8" unit="10+3/ul" />
</task>
------------------------------------------------------------------------------
output.xml
<task>
<low value="4.3" unit="10+3/ul"/>
<low value="10.8" unit="10+3/ul"/>
<width value="4.3" unit="10+3/ul"/>
<width value="10.8" unit="10+3/ul"/>
</task>
------------------------------------------------------------------
Then... Take a look and give me some help plz.
Thank you so much for your help.
2013/1/11 Niall Gallagher <gal...@ya...>
> Can you provide a unit test that demonstrates this? If you can show it
> really is an error via a JUnit test then ill fix it straight away.
>
> Thanks,
> Niall
>
> --- On Fri, 11/1/13, Jaewoo Lee <dl...@gm...> wrote:
>
> > From: Jaewoo Lee <dl...@gm...>
> > Subject: [Simple-support] same data-typed ElementList in ElementListUnion
> > To: sim...@li...
> > Received: Friday, 11 January, 2013, 1:36 AM
> > Hi, Niall.
> > I am defining ElementListUnion like
> > below.
> > @ElementListUnion({
> > @ElementList(name = "low", entry =
> > "low", inline = true, required = false, type =
> > IVXBPQ.class),
> > @ElementList(name =
> > "high", entry = "high", inline = true,
> > required = false, type = IVXBPQ.class), @ElementList(name =
> > "width", entry = "width", inline =
> > true, required = false, type = PQ.class),
> > @ElementList(name =
> > "center", entry = "center", inline =
> > true, required = false, type =
> > PQ.class)}
> >
> > and, I inputed sample code like below.
> > <low name = ""
> > /><high name = ""
> > />
> > but output came like below
> >
> > <low name = ""/><low name =
> > ""/>
> > ------------------------------------------------------------
> > In ElementListUnion, Couldn't I define same
> > data-typed ElementList? or is it bug?
> > Thanks for your help.
> >
> > -----Inline Attachment Follows-----
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API
> > and
> > much more. Get web development skills now with LearnDevNow
> > -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs
> > and experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> > -----Inline Attachment Follows-----
> >
> > _______________________________________________
> > Simple-support mailing list
> > Sim...@li...
> > https://lists.sourceforge.net/lists/listinfo/simple-support
> >
>
|