simple-support Mailing List for Simple (Page 81)
Brought to you by:
niallg
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(13) |
May
(13) |
Jun
(27) |
Jul
(4) |
Aug
(14) |
Sep
(7) |
Oct
|
Nov
(6) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
(15) |
May
(24) |
Jun
(24) |
Jul
(30) |
Aug
(5) |
Sep
(19) |
Oct
(27) |
Nov
(16) |
Dec
(24) |
| 2009 |
Jan
(34) |
Feb
(24) |
Mar
(35) |
Apr
(26) |
May
(8) |
Jun
(17) |
Jul
(28) |
Aug
(31) |
Sep
(36) |
Oct
(35) |
Nov
(20) |
Dec
(16) |
| 2010 |
Jan
(40) |
Feb
(21) |
Mar
(47) |
Apr
(45) |
May
(34) |
Jun
(68) |
Jul
(46) |
Aug
(39) |
Sep
(47) |
Oct
(20) |
Nov
(42) |
Dec
(13) |
| 2011 |
Jan
(41) |
Feb
(16) |
Mar
(32) |
Apr
(44) |
May
(28) |
Jun
(35) |
Jul
(37) |
Aug
(33) |
Sep
(60) |
Oct
(20) |
Nov
(35) |
Dec
(23) |
| 2012 |
Jan
(34) |
Feb
(23) |
Mar
(34) |
Apr
(21) |
May
(48) |
Jun
(24) |
Jul
(31) |
Aug
(39) |
Sep
(25) |
Oct
(10) |
Nov
(27) |
Dec
(28) |
| 2013 |
Jan
(32) |
Feb
(24) |
Mar
(24) |
Apr
(9) |
May
(4) |
Jun
(6) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
(12) |
| 2014 |
Jan
(14) |
Feb
(16) |
Mar
(5) |
Apr
(3) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
(6) |
Oct
|
Nov
(6) |
Dec
|
| 2015 |
Jan
(3) |
Feb
(15) |
Mar
(7) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
|
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Federico F. <fed...@fi...> - 2007-05-11 07:38:17
|
Hi all, what should I do to wrap long text into <![CDATA[ ]]> ? |
|
From: Mike Q. <mik...@su...> - 2007-05-08 16:08:13
|
Hi all,
=20
Think I have found a bug in the implementation of Persister where it
leaves Input/Output streams open.
=20
This method opens a stream but never closes it.
=20
public void write(Object source, File out) throws Exception {
write(source, new FileOutputStream(out));
}
=20
Probably needs to be something like..
=20
public void write(Object source, File out) throws Exception {
OutputStream outputStream =3D new FileOutputStream(out);
try {
write(source, outputStream);
}
finally {
try {
outputStream.close();
}
catch (Exception e) {
// ignore close error
}
}
}
=20
Similar problem in the read() method.
=20
public <T> T read(Class<? extends T> type, File source) throws
Exception {
return (T)read(type, new FileInputStream(source)); =20
}
=20
For completeness this StringReader should also be closed after use.
=20
public <T> T read(Class<? extends T> type, String source) throws
Exception {
return (T)read(type, new StringReader(source)); =20
}
=20
Cheers.
=20
Mike.
This e-mail is bound by the terms and conditions described at http://www=
=2Esubexazure.com/mail-disclaimer.html
=0D |
|
From: Niall G. <gal...@ya...> - 2007-05-01 18:30:46
|
Hi,
I generally tend to delegate to the persister callback methods for validation. For example:
public class MyClass {
@ElementList(name="list", type=Example.class)
private Collection<Example> list;
// Validation after deserialization
@Validate
public void myValidationMethod() {
if(list.size() < 1 || list.size() > 10) {
throw new MyValidationException("List validation failed");
}
}
// Validation before serialization
@Persist
public void myPersistMethod() {
myValidationMethod();
}
}
Niall
----- Original Message ----
From: Mike Quilleash <mik...@su...>
To: Niall Gallagher <gal...@ya...>; sim...@li...
Sent: Tuesday, May 1, 2007 10:40:18 AM
Subject: RE: [Simple-support] Possible enhancements
DIV {
MARGIN:0px;}
Hi Niall,
Glad to hear some of these features are already
planned.
I have another one :)
Add some basic validation to multiple
annotations.
e.g. @ElementList( min = "1", max = "10"
)
which adds a constraint on the number of elements this list
may contain.
Cheers.
Mike.
From:
sim...@li...
[mailto:sim...@li...] On Behalf Of Niall
Gallagher
Sent: 01 May 2007 18:23
To:
sim...@li...
Subject: Re: [Simple-support]
Possible enhancements
Hi
Mike,
Thanks for the feedback regarding your mails on the tutorial. With
regards to the improvements suggested:
1) Default the element/attribute
name to the method or field name
I have already started on this and it
should be in the next release.
2) Use the generic parameter type for
collections and the component type for arrays
This is something I will
investigate further for collections. With regard to arrays this is already
done
3) Add in the targets for the annotations
Yes, I initially
held off on this as only fields were supported in earlier releases. I think I
will also make @Root inherited.
Thanks,
Niall
----- Original Message ----
From: Mike Quilleash
<mik...@su...>
To:
sim...@li...
Sent: Tuesday, May 1, 2007 11:26:20
AM
Subject: [Simple-support] Possible enhancements
Hi
all,
First off, nice
project! I've finally got fed up at navigating around dom4j nodes so was
looking around for xml binding stuff. Started looking at JAXB but I'm not
sure I've ever seen a more complicated way of doing something that should be so
simple. My next stop was google search "xml binding simple" which brought
me here.
I really like the
annotation approach to doing this as it's quick and easy to understand.
The tutorial was also excellent as I could actually start coding in
<5 minutes, bit of a novelty after spending an hour poring over JAXB
APIs.
I have some
suggestions to maybe enhance/simplify some areas regarding the
annotations. Please don't take this as any form of criticism, just some
ideas :)
1) Default the
element/attribute name to the field/method it is on (not sure if the annotations
are supported on methods)
e.g.
@Attribute( name = "path" )
private String
path;
The name = "path"
seems pretty redundant to me in this case. Could just
be
@Attribute
private String
path;
2) Derive types from
generics/array types where possible.
@ElementList( name = "schemas", type
= Schema.class)
private List< Schema >
schemas;
OR
@ElementArray( name = "schemas",
type = Schema.class)
private Schema[]
schemas;
I believe the type/class can be derived from the
generic type of the array type.
field.getType().getComponentType().
Generics you can use
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[
0 ].
Combined with 1) above makes the above
examples
@ElementList
private List< Schema >
schemas;
OR
@ElementArray
private Schema[]
schemas;
3) Make the annotations limited on what they can be applied to.
Minor point, but at the moment I can use @Attribute on a class if I really
want to. I imagine nothing would go wrong, it would just be ignored, but
it adds another piece of implicit
documentation.
@Target( FIELD, METHOD )
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute
{
Cheers.
Mike.
This e-mail is bound by the terms and conditions described at http://www.subexazure.com/mail-disclaimer.html
-------------------------------------------------------------------------
This
SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE
version of DB2 express and take
control of your XML. No limits. Just data.
Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Simple-support mailing
list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
Ahhh...imagining that irresistible "new car" smell?
Check out new
cars at Yahoo! Autos. This e-mail is bound by the terms and conditions described at http://www.subexazure.com/mail-disclaimer.html
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |
|
From: Mike Q. <mik...@su...> - 2007-05-01 17:40:29
|
Hi Niall,
=20
Glad to hear some of these features are already planned.
=20
I have another one :)
=20
Add some basic validation to multiple annotations.
=20
e.g. @ElementList( min =3D "1", max =3D "10" )
=20
which adds a constraint on the number of elements this list may contain.
=20
Cheers.
=20
Mike.
________________________________
From: sim...@li...
[mailto:sim...@li...] On Behalf Of Niall
Gallagher
Sent: 01 May 2007 18:23
To: sim...@li...
Subject: Re: [Simple-support] Possible enhancements
Hi Mike,
Thanks for the feedback regarding your mails on the tutorial. With
regards to the improvements suggested:
1) Default the element/attribute name to the method or field name
I have already started on this and it should be in the next release.
2) Use the generic parameter type for collections and the component type
for arrays
This is something I will investigate further for collections. With
regard to arrays this is already done
3) Add in the targets for the annotations
Yes, I initially held off on this as only fields were supported in
earlier releases. I think I will also make @Root inherited.
Thanks,
Niall
----- Original Message ----
From: Mike Quilleash <mik...@su...>
To: sim...@li...
Sent: Tuesday, May 1, 2007 11:26:20 AM
Subject: [Simple-support] Possible enhancements
Hi all,
=20
First off, nice project! I've finally got fed up at navigating around
dom4j nodes so was looking around for xml binding stuff. Started
looking at JAXB but I'm not sure I've ever seen a more complicated way
of doing something that should be so simple. My next stop was google
search "xml binding simple" which brought me here.
=20
I really like the annotation approach to doing this as it's quick and
easy to understand. The tutorial was also excellent as I could actually
start coding in <5 minutes, bit of a novelty after spending an hour
poring over JAXB APIs.
=20
I have some suggestions to maybe enhance/simplify some areas regarding
the annotations. Please don't take this as any form of criticism, just
some ideas :)
=20
=20
1) Default the element/attribute name to the field/method it is on (not
sure if the annotations are supported on methods)
=20
e.g.
=20
@Attribute( name =3D "path" )
private String path;
The name =3D "path" seems pretty redundant to me in this case. Could =
just
be
=20
@Attribute
private String path;
=20
=20
2) Derive types from generics/array types where possible.
=20
=20
@ElementList( name =3D "schemas", type =3D Schema.class)
private List< Schema > schemas;
OR
=20
@ElementArray( name =3D "schemas", type =3D Schema.class)
private Schema[] schemas;
I believe the type/class can be derived from the generic type of the
array type.
=20
field.getType().getComponentType().
=20
Generics you can use
=20
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[ 0
].
=20
=20
Combined with 1) above makes the above examples
=20
=20
@ElementList
private List< Schema > schemas;
OR
=20
@ElementArray
private Schema[] schemas;
=20
=20
3) Make the annotations limited on what they can be applied to. Minor
point, but at the moment I can use @Attribute on a class if I really
want to. I imagine nothing would go wrong, it would just be ignored,
but it adds another piece of implicit documentation.
=20
@Target( FIELD, METHOD )
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute {
=20
=20
=20
Cheers.
=20
Mike.
This e-mail is bound by the terms and conditions described at
http://www.subexazure.com/mail-disclaimer.html
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
________________________________
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
<http://us.rd.yahoo.com/evt=3D48245/*http://autos.yahoo.com/new_cars.html=
;
_ylc=3DX3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcn=
M
-> =20
This e-mail is bound by the terms and conditions described at http://www=
=2Esubexazure.com/mail-disclaimer.html
=0D |
|
From: Niall G. <gal...@ya...> - 2007-05-01 17:22:44
|
Hi Mike,
Thanks for the feedback regarding your mails on the tutorial. With regards to the improvements suggested:
1) Default the element/attribute name to the method or field name
I have already started on this and it should be in the next release.
2) Use the generic parameter type for collections and the component type for arrays
This is something I will investigate further for collections. With regard to arrays this is already done
3) Add in the targets for the annotations
Yes, I initially held off on this as only fields were supported in earlier releases. I think I will also make @Root inherited.
Thanks,
Niall
----- Original Message ----
From: Mike Quilleash <mik...@su...>
To: sim...@li...
Sent: Tuesday, May 1, 2007 11:26:20 AM
Subject: [Simple-support] Possible enhancements
Hi
all,
First off, nice
project! I've finally got fed up at navigating around dom4j nodes so was
looking around for xml binding stuff. Started looking at JAXB but I'm not
sure I've ever seen a more complicated way of doing something that should be so
simple. My next stop was google search "xml binding simple" which brought
me here.
I really like the
annotation approach to doing this as it's quick and easy to understand.
The tutorial was also excellent as I could actually start coding in
<5 minutes, bit of a novelty after spending an hour poring over JAXB
APIs.
I have some
suggestions to maybe enhance/simplify some areas regarding the
annotations. Please don't take this as any form of criticism, just some
ideas :)
1) Default the
element/attribute name to the field/method it is on (not sure if the annotations
are supported on methods)
e.g.
@Attribute( name = "path" )
private String
path;
The name = "path"
seems pretty redundant to me in this case. Could just
be
@Attribute
private String
path;
2) Derive types from
generics/array types where possible.
@ElementList( name = "schemas", type
= Schema.class)
private List< Schema >
schemas;
OR
@ElementArray( name = "schemas",
type = Schema.class)
private Schema[]
schemas;
I believe the type/class can be derived from the
generic type of the array type.
field.getType().getComponentType().
Generics you can use
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[
0 ].
Combined with 1) above makes the above
examples
@ElementList
private List< Schema > schemas;
OR
@ElementArray
private Schema[]
schemas;
3) Make the annotations limited
on what they can be applied to. Minor point, but at the moment I can
use @Attribute on a class if I really want to. I imagine nothing would go
wrong, it would just be ignored, but it adds another piece of implicit
documentation.
@Target( FIELD, METHOD
)
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute
{
Cheers.
Mike.
This e-mail is bound by the terms and conditions described at http://www.subexazure.com/mail-disclaimer.html
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |
|
From: Mike Q. <mik...@su...> - 2007-05-01 13:00:23
|
I think another typo
=20
@Root(name=3D"example")
public class Example implements Task {
@Example(name=3D"task")
private Task task;
public double execute() {
return task.execute();
} =20
}
The @Example looks wrong, probably supposed to be @Element?
Cheers.
Mike.
________________________________
From: Mike Quilleash=20
Sent: 01 May 2007 13:10
To: Mike Quilleash ; sim...@li...
Subject: RE: [Simple-support] Possible enhancements
Also found a typo in the docs,
=20
@ElementArray(name=3D"ages", parent=3D"name")
private int[] ages; =20
Should be parent=3D"age" i think.
Mike.
________________________________
From: sim...@li...
[mailto:sim...@li...] On Behalf Of Mike
Quilleash=20
Sent: 01 May 2007 11:26
To: sim...@li...
Subject: [Simple-support] Possible enhancements
Hi all,
=20
First off, nice project! I've finally got fed up at navigating around
dom4j nodes so was looking around for xml binding stuff. Started
looking at JAXB but I'm not sure I've ever seen a more complicated way
of doing something that should be so simple. My next stop was google
search "xml binding simple" which brought me here.
=20
I really like the annotation approach to doing this as it's quick and
easy to understand. The tutorial was also excellent as I could actually
start coding in <5 minutes, bit of a novelty after spending an hour
poring over JAXB APIs.
=20
I have some suggestions to maybe enhance/simplify some areas regarding
the annotations. Please don't take this as any form of criticism, just
some ideas :)
=20
=20
1) Default the element/attribute name to the field/method it is on (not
sure if the annotations are supported on methods)
=20
e.g.
=20
@Attribute( name =3D "path" )
private String path;
The name =3D "path" seems pretty redundant to me in this case. Could =
just
be
=20
@Attribute
private String path;
=20
=20
2) Derive types from generics/array types where possible.
=20
=20
@ElementList( name =3D "schemas", type =3D Schema.class)
private List< Schema > schemas;
OR
=20
@ElementArray( name =3D "schemas", type =3D Schema.class)
private Schema[] schemas;
I believe the type/class can be derived from the generic type of the
array type.
=20
field.getType().getComponentType().
=20
Generics you can use
=20
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[ 0
].
=20
=20
Combined with 1) above makes the above examples
=20
=20
@ElementList
private List< Schema > schemas;
OR
=20
@ElementArray
private Schema[] schemas;
=20
=20
3) Make the annotations limited on what they can be applied to. Minor
point, but at the moment I can use @Attribute on a class if I really
want to. I imagine nothing would go wrong, it would just be ignored,
but it adds another piece of implicit documentation.
=20
@Target( FIELD, METHOD )
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute {
=20
=20
=20
Cheers.
=20
Mike.
This e-mail is bound by the terms and conditions described at
http://www.subexazure.com/mail-disclaimer.html
This e-mail is bound by the terms and conditions described at http://www=
=2Esubexazure.com/mail-disclaimer.html
=0D |
|
From: Mike Q. <mik...@su...> - 2007-05-01 12:10:38
|
Also found a typo in the docs,
=20
@ElementArray(name=3D"ages", parent=3D"name")
private int[] ages; =20
Should be parent=3D"age" i think.
Mike.
________________________________
From: sim...@li...
[mailto:sim...@li...] On Behalf Of Mike
Quilleash=20
Sent: 01 May 2007 11:26
To: sim...@li...
Subject: [Simple-support] Possible enhancements
Hi all,
=20
First off, nice project! I've finally got fed up at navigating around
dom4j nodes so was looking around for xml binding stuff. Started
looking at JAXB but I'm not sure I've ever seen a more complicated way
of doing something that should be so simple. My next stop was google
search "xml binding simple" which brought me here.
=20
I really like the annotation approach to doing this as it's quick and
easy to understand. The tutorial was also excellent as I could actually
start coding in <5 minutes, bit of a novelty after spending an hour
poring over JAXB APIs.
=20
I have some suggestions to maybe enhance/simplify some areas regarding
the annotations. Please don't take this as any form of criticism, just
some ideas :)
=20
=20
1) Default the element/attribute name to the field/method it is on (not
sure if the annotations are supported on methods)
=20
e.g.
=20
@Attribute( name =3D "path" )
private String path;
The name =3D "path" seems pretty redundant to me in this case. Could =
just
be
=20
@Attribute
private String path;
=20
=20
2) Derive types from generics/array types where possible.
=20
=20
@ElementList( name =3D "schemas", type =3D Schema.class)
private List< Schema > schemas;
OR
=20
@ElementArray( name =3D "schemas", type =3D Schema.class)
private Schema[] schemas;
I believe the type/class can be derived from the generic type of the
array type.
=20
field.getType().getComponentType().
=20
Generics you can use
=20
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[ 0
].
=20
=20
Combined with 1) above makes the above examples
=20
=20
@ElementList
private List< Schema > schemas;
OR
=20
@ElementArray
private Schema[] schemas;
=20
=20
3) Make the annotations limited on what they can be applied to. Minor
point, but at the moment I can use @Attribute on a class if I really
want to. I imagine nothing would go wrong, it would just be ignored,
but it adds another piece of implicit documentation.
=20
@Target( FIELD, METHOD )
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute {
=20
=20
=20
Cheers.
=20
Mike.
This e-mail is bound by the terms and conditions described at
http://www.subexazure.com/mail-disclaimer.html
This e-mail is bound by the terms and conditions described at http://www=
=2Esubexazure.com/mail-disclaimer.html
=0D |
|
From: Mike Q. <mik...@su...> - 2007-05-01 10:26:33
|
Hi all,
=20
First off, nice project! I've finally got fed up at navigating around
dom4j nodes so was looking around for xml binding stuff. Started
looking at JAXB but I'm not sure I've ever seen a more complicated way
of doing something that should be so simple. My next stop was google
search "xml binding simple" which brought me here.
=20
I really like the annotation approach to doing this as it's quick and
easy to understand. The tutorial was also excellent as I could actually
start coding in <5 minutes, bit of a novelty after spending an hour
poring over JAXB APIs.
=20
I have some suggestions to maybe enhance/simplify some areas regarding
the annotations. Please don't take this as any form of criticism, just
some ideas :)
=20
=20
1) Default the element/attribute name to the field/method it is on (not
sure if the annotations are supported on methods)
=20
e.g.
=20
@Attribute( name =3D "path" )
private String path;
The name =3D "path" seems pretty redundant to me in this case. Could =
just
be
=20
@Attribute
private String path;
=20
=20
2) Derive types from generics/array types where possible.
=20
=20
@ElementList( name =3D "schemas", type =3D Schema.class)
private List< Schema > schemas;
OR
=20
@ElementArray( name =3D "schemas", type =3D Schema.class)
private Schema[] schemas;
I believe the type/class can be derived from the generic type of the
array type.
=20
field.getType().getComponentType().
=20
Generics you can use
=20
((ParameterizedType)field.getGenericType()).getActualTypeArguments()[ 0
].
=20
=20
Combined with 1) above makes the above examples
=20
=20
@ElementList
private List< Schema > schemas;
OR
=20
@ElementArray
private Schema[] schemas;
=20
=20
3) Make the annotations limited on what they can be applied to. Minor
point, but at the moment I can use @Attribute on a class if I really
want to. I imagine nothing would go wrong, it would just be ignored,
but it adds another piece of implicit documentation.
=20
@Target( FIELD, METHOD )
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute {
=20
=20
=20
Cheers.
=20
Mike.
This e-mail is bound by the terms and conditions described at http://www=
=2Esubexazure.com/mail-disclaimer.html
=0D |
|
From: Niall G. <gal...@ya...> - 2007-04-26 17:57:21
|
Hi,=0A=0ACurrently there is no support for converting an XML schema to an a= nnotated class. Although, there may be in a future release.=0A=0ANiall=0A= =0A----- Original Message ----=0AFrom: Lloren=E7 Chiner <lc...@ya...>= =0ATo: sim...@li...=0ASent: Tuesday, April 24, 2007= 11:55:20 AM=0ASubject: [Simple-support] help=0A=0AVery good solution for X= ML treatment but did anybody has some tool to reverse an XML Schema and gen= erate the annotated classes?=0A=0A++thks=0A=0A =0A=0ALloren=E7=0A=0A=0A=0A= =0A Ahhh...imagining that irresistible "new car" smell?=0A Check out= =0Anew cars at Yahoo! Autos.=0A--------------------------------------------= -----------------------------=0AThis SF.net email is sponsored by DB2 Expre= ss=0ADownload DB2 Express C - the FREE version of DB2 express and take=0Aco= ntrol of your XML. No limits. Just data. Click to get it now.=0Ahttp://sour= ceforge.net/powerbar/db2/=0A_______________________________________________= =0ASimple-support mailing lis...@li...=0Ahtt= ps://lists.sourceforge.net/lists/listinfo/simple-support=0A=0A=0A=0A=0A=0A= =0A__________________________________________________=0ADo You Yahoo!?=0ATi= red of spam? Yahoo! Mail has the best spam protection around =0Ahttp://mai= l.yahoo.com |
|
From: <lc...@ya...> - 2007-04-24 10:55:28
|
Very good solution for XML treatment but did anybody has some tool to rever= se an XML Schema and generate the annotated classes?=0A++thks=0A=0ALloren= =E7=0A=0A__________________________________________________=0ADo You Yahoo!= ?=0ATired of spam? Yahoo! Mail has the best spam protection around =0Ahttp= ://mail.yahoo.com |
|
From: Niall G. <gal...@ya...> - 2007-04-23 00:15:12
|
Hi Thomas, The only real examples provided are the unit tests. The should provide a reasonable starting point which can be used to learn the frameworks capabilities. Niall ----- Original Message ---- From: Thomas J. Buhr <vis...@gm...> To: sim...@li... Sent: Sunday, April 22, 2007 8:40:12 AM Subject: [Simple-support] Simple XML Examples Simple XML, Simple XML looks like a powerful way to serialize and deserialize Java objects. The tutorial moves through a lot of scenarios quickly but there is no sample code in the actual downloads. Not having much time on a company project I'm hoping to make an evaluation to use Simple XML and it would be great if the samples the tutorial were available for this purpose. Are runnable samples available? Best Regards, Thom ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Thomas J. B. <vis...@gm...> - 2007-04-22 15:40:22
|
Simple XML, Simple XML looks like a powerful way to serialize and deserialize Java objects. The tutorial moves through a lot of scenarios quickly but there is no sample code in the actual downloads. Not having much time on a company project I'm hoping to make an evaluation to use Simple XML and it would be great if the samples the tutorial were available for this purpose. Are runnable samples available? Best Regards, Thom |
|
From: Niall G. <gal...@ya...> - 2007-04-12 14:23:51
|
Hi=0A=0ATo your first question, is it possible to sub-class and override an= notated fields: =0A=0AYes, the most specialized class will take presecedanc= e over super classes for field annotations. =0A=0ATo the second, can you an= notate a method and override in a subclass: =0A=0AYou can, however only in = release 1.2, which will be released today some time. All you need to do is = annotate the bean setter and getter methods, subclasses can override the me= thod which will be used by the persister during serialization and deseriali= zatio.=0A=0AAlthough not officially released, 1.2 final build can be downlo= aded from =0A=0Ahttp://svn.sourceforge.net/viewvc/simple/trunk/download/str= eam/target/1.2/=0A=0ANiall=0A=0A=0A----- Original Message ----=0AFrom: Gill= es BRUNET <gil...@ho...>=0ATo: sim...@li...= t=0ASent: Thursday, April 12, 2007 3:14:38 PM=0ASubject: [Simple-support] S= ubclassing with Simple XML Serialization=0A=0A=0A=0A=0AP=0A{=0Amargin:0px;p= adding:0px;}=0Abody=0A{=0AFONT-SIZE:10pt;FONT-FAMILY:Tahoma;}=0A=0AHi,=0A = =0AHow the generalization and polymorphism are supported using Simple XML S= erialization?=0A =0AMore concretely: Is it possible to define a super class= with attributes and elements annotations, and to specialize it using a sub= -class with a root annotation? Is it possible to annotate virtual methods a= s attributes or elements in order to specialize them in sub-classes?=0A=0A = =0A=0AGilles B.=0A=0ASoyez parmi les premiers =E0 essayer Windows Live Mail= .-------------------------------------------------------------------------= =0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin SourceForge.n= et's Techsay panel and you'll get the chance to share your=0Aopinions on IT= & business topics through brief surveys-and earn cash=0Ahttp://www.techsay= .com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A___________= ____________________________________=0ASimple-support mailing list=0ASimple= -su...@li...=0Ahttps://lists.sourceforge.net/lists/listin= fo/simple-support=0A=0A=0A=0A=0A=0A=0A=0A =0A________________________= ____________________________________________________________=0AWe won't tel= l. Get more on shows you hate to love =0A(and love to hate): Yahoo! TV's Gu= ilty Pleasures list.=0Ahttp://tv.yahoo.com/collections/265 |
|
From: Gilles B. <gil...@ho...> - 2007-04-12 14:14:50
|
Hi, How the generalization and polymorphism are supported using Simple XML = Serialization? More concretely: Is it possible to define a super class with= attributes and elements annotations, and to specialize it using a sub-clas= s with a root annotation? Is it possible to annotate virtual methods as att= ributes or elements in order to specialize them in sub-classes? =20 Gilles B. _________________________________________________________________ Soyez parmi les premiers =E0 essayer Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
|
From: Niall G. <gal...@ya...> - 2007-04-06 12:55:12
|
Hi,
With relation to recent comments on improvements and features to be added to the framework I have added the following:
1) A new @Text annotation
This annotation will allow free text to be deserialized from an XML document using structures such as
<element attr1="value1" attr2="value2">
This is free text
</element>
The
@Text annotation can not be used with the @Element, @ElementList, or
@ElementArray within a single class. Also only one @Text annotation can
be used per class.
2) Loose mappings
The @Root annotation has been given a new attribute called "strict". This is used as follows:
@Root(name="example", strict=false)
public class Example {
@Element(name="foo")
private String foo;
}
The above can be used to deserialize something such as:
<example attr1="value1">
<foo>Example string</foo>
<ignore attr="blah">Ignore this text</ignore>
</example>
The loose mapping (i.e strict=false) allows the deserialization to ignore some attributes or elements.
This
has not yet been released as an official version as I am currently
debating whether the strict attribute for the @Root annotation is the
best way to specify loose mappings. The beta can be downloaded from :
http://svn.sourceforge.net/viewvc/simple/trunk/download/stream/target/1.2-beta/
Niall Gallagher
Niall Gallagher
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
|
|
From: Niall G. <gal...@ya...> - 2007-04-03 20:21:37
|
Hi,
I have not yet performed any comparisons against Java XML Serialization. I would imagine the performance is comparable. Using XML serialization it can parse 10,000 XML documents of reasonable size in about 2.5 seconds on a pentium centrino 2GHz.
Niall Gallagher
----- Original Message ----
From: Tom Williams <tho...@du...>
To: sim...@li...
Sent: Monday, April 2, 2007 1:58:48 AM
Subject: [Simple-support] Speed Comparison / Benefits versus standard serialization
Hi Chaps,
I was wondering how XML serialization compares speedwise against the
standard serialization mechanism. As far as I understand serialization
isn't a fast process (relatively speaking to something like binary
socket communication), but slower transmission speeds would obviously
affect overall application performance.
If anyone has any comparisons, links to relevant articles etc, I'd be
very appreciative.
Many thanks,
Tom
--
p {
font-family:Arial, Helvetica, sans-serif;font-size:10px;color:#999999;font-weight:bold;margin-top:1px;}
a {
text-decoration:none;
color:#999999;}
img.logo {
float:left;width:66px;height:76px;margin-right:5px;}
Thomas Williams
Developer
Dubit
Tel: 0113 2501101
Web: www.dubitlimited.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097 |
|
From: Tom W. <tho...@du...> - 2007-04-02 08:59:16
|
Hi Chaps, I was wondering how XML serialization compares speedwise against the standard serialization mechanism. As far as I understand serialization isn't a fast process (relatively speaking to something like binary socket communication), but slower transmission speeds would obviously affect overall application performance. If anyone has any comparisons, links to relevant articles etc, I'd be very appreciative. Many thanks, Tom -- Thomas Williams Developer Dubit Tel: 0113 2501101 Web: www.dubitlimited.com <http://www.dubitlimited.com> |
|
From: Arne C. <arn...@cl...> - 2007-04-01 20:51:11
|
Niall,
That's correct. The XmlText Attribute cannot handle text with
interspursed with other elements, just elements with attributes and a
simple text blob. I guees once you are looking at the below XML, you're
really considering mark-up and not a data-format as such.
BTW, I just noticed that Simple will throw an exception if it encounters
an attribute or element it doesn't know. Is there a way to defeat this
behavior? I know it goes against typesafe data, but being able to ignore
unknown elements makes the serializer more robust, in case you are
ingesting someone else's XML. I.e. an addition in their output doesn't
break your ingestions, it just means some data is lost.
cheers,
arne
Niall Gallagher wrote:
>Hi,
>
>Seems like a nice way to do it. However I assume that such an annotation could not be used with elements? For instance:
>
><root>
> <element attr="a">
> Text
> <element2>
> Text
> </element>
> Text
> </element>
></root>
>
>
>For the above what would the text be? I think Ill probably implement the @Text annotation with the restriction that it can not be used with elements, and only one @Text annotation per class. So the only possible structure would be:
>
><element attr1="1" attrn="n"> Text</element>
>
>Is this how .NET handles it?
>
>Niall Gallagher
>
>----- Original Message ----
>From: Arne Claassen <arn...@cl...>
>To: Niall Gallagher <gal...@ya...>
>Sent: Friday, March 30, 2007 8:20:43 AM
>Subject: Re: [Simple-support] Element with both attributes and text body?
>
>Niall,
>
>The way .NET handles it, is with an Attribute (i.e. Annotation) called
>XmlTextAttribute like this:
>
>[XmlText()]
>public string text
>
>So an annotation equivalent could be
>
>@Text()
>private String text;
>
>The catch with this Annotation is that it can only be used once in any
>class.
>
>cheers,
>arne
>
>Niall Gallagher wrote:
>
>
>
>>Hi Arne,
>>
>>Well this is something I was considering, however this comes down to a
>>serialization versus deserialization issue. It would be simple to
>>deserialize such a structure. For instance:
>>
>>
>>
>>@Root(name="myelement")
>>
>>public class MyObject {
>>
>>
>> @Attribute(name="someAttribute")
>> private String someAttribute;
>>
>>
>>
>> private String text;
>>
>>
>>
>> public MyObject(String text) {
>>
>> this.text = text;
>>
>> }
>>
>>}
>>
>>
>>
>>The difficulty is in serialization, how could the decision be made to
>>serialize? I guess an additional annotation or interface telling the
>>framework what action to take could be done? Currently though I have
>>decided not to add support for this, at least until I can think of a
>>decent way to implement it.
>>
>>Suggestions are welcome on how to approach this.
>>
>>
>>
>>Niall
>>
>>
>>----- Original Message ----
>>From: Arne Claassen <arn...@cl...>
>>To: sim...@li...
>>Sent: Wednesday, March 28, 2007 8:34:48 AM
>>Subject: [Simple-support] Element with both attributes and text body?
>>
>>I just found Simple today. Excellent work on the project. Nice, simple,
>>small. I usually work in C#, so Simple's syntax is very comfortable to
>>me compared to .NET's attribute driven mark-up.
>>
>>Of course, I've already hit a stumbling block. Is there a way to define
>>a class that has both Attributes and body text for an Element? I.e. I'm
>>trying to create a class to represent:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
>>utime="1175098850078">
>> payload
>></message>
>>
>>The closest I've figured out is:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
>>utime="1175098850078">
>> <data>payload</data>
>></message>
>>
>>
>>thanks,
>>arne
>>
>>-------------------------------------------------------------------------
>>Take Surveys. Earn Cash. Influence the Future of IT
>>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>opinions on IT & business topics through brief surveys-and earn cash
>>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>_______________________________________________
>>Simple-support mailing list
>>Sim...@li...
>>https://lists.sourceforge.net/lists/listinfo/simple-support
>>
>>
>>
>>
>>
>>
>>____________________________________________________________________________________
>>Expecting? Get great news right away with email Auto-Check.
>>Try the Yahoo! Mail Beta.
>>http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>>
>>
>>
>>
>>
>
>
>
>
>
>
>
>____________________________________________________________________________________
>Sucker-punch spam with award-winning protection.
>Try the free Yahoo! Mail Beta.
>http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
>
>
|
|
From: Niall G. <gal...@ya...> - 2007-04-01 17:39:14
|
Hi,
Seems like a nice way to do it. However I assume that such an annotation could not be used with elements? For instance:
<root>
<element attr="a">
Text
<element2>
Text
</element>
Text
</element>
</root>
For the above what would the text be? I think Ill probably implement the @Text annotation with the restriction that it can not be used with elements, and only one @Text annotation per class. So the only possible structure would be:
<element attr1="1" attrn="n"> Text</element>
Is this how .NET handles it?
Niall Gallagher
----- Original Message ----
From: Arne Claassen <arn...@cl...>
To: Niall Gallagher <gal...@ya...>
Sent: Friday, March 30, 2007 8:20:43 AM
Subject: Re: [Simple-support] Element with both attributes and text body?
Niall,
The way .NET handles it, is with an Attribute (i.e. Annotation) called
XmlTextAttribute like this:
[XmlText()]
public string text
So an annotation equivalent could be
@Text()
private String text;
The catch with this Annotation is that it can only be used once in any
class.
cheers,
arne
Niall Gallagher wrote:
>Hi Arne,
>
>Well this is something I was considering, however this comes down to a
>serialization versus deserialization issue. It would be simple to
>deserialize such a structure. For instance:
>
>
>
>@Root(name="myelement")
>
>public class MyObject {
>
>
> @Attribute(name="someAttribute")
> private String someAttribute;
>
>
>
> private String text;
>
>
>
> public MyObject(String text) {
>
> this.text = text;
>
> }
>
>}
>
>
>
>The difficulty is in serialization, how could the decision be made to
>serialize? I guess an additional annotation or interface telling the
>framework what action to take could be done? Currently though I have
>decided not to add support for this, at least until I can think of a
>decent way to implement it.
>
>Suggestions are welcome on how to approach this.
>
>
>
>Niall
>
>
>----- Original Message ----
>From: Arne Claassen <arn...@cl...>
>To: sim...@li...
>Sent: Wednesday, March 28, 2007 8:34:48 AM
>Subject: [Simple-support] Element with both attributes and text body?
>
>I just found Simple today. Excellent work on the project. Nice, simple,
>small. I usually work in C#, so Simple's syntax is very comfortable to
>me compared to .NET's attribute driven mark-up.
>
>Of course, I've already hit a stumbling block. Is there a way to define
>a class that has both Attributes and body text for an Element? I.e. I'm
>trying to create a class to represent:
>
><?xml version="1.0" encoding="UTF-8"?>
><message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
>utime="1175098850078">
> payload
></message>
>
>The closest I've figured out is:
>
><?xml version="1.0" encoding="UTF-8"?>
><message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
>utime="1175098850078">
> <data>payload</data>
></message>
>
>
>thanks,
>arne
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys-and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>Simple-support mailing list
>Sim...@li...
>https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
>
>
>
>
>____________________________________________________________________________________
>Expecting? Get great news right away with email Auto-Check.
>Try the Yahoo! Mail Beta.
>http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>
>
>
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
|
|
From: Niall G. <gal...@ya...> - 2007-03-29 20:09:58
|
Hi Arne,
Well this is something I was considering, however this comes down to a
serialization versus deserialization issue. It would be simple to
deserialize such a structure. For instance:
@Root(name="myelement")
public class MyObject {
@Attribute(name="someAttribute")
private String someAttribute;
private String text;
public MyObject(String text) {
this.text = text;
}
}
The difficulty is in serialization, how could the decision be made to
serialize? I guess an additional annotation or interface telling the
framework what action to take could be done? Currently though I have
decided not to add support for this, at least until I can think of a
decent way to implement it.
Suggestions are welcome on how to approach this.
Niall
----- Original Message ----
From: Arne Claassen <arn...@cl...>
To: sim...@li...
Sent: Wednesday, March 28, 2007 8:34:48 AM
Subject: [Simple-support] Element with both attributes and text body?
I just found Simple today. Excellent work on the project. Nice, simple,
small. I usually work in C#, so Simple's syntax is very comfortable to
me compared to .NET's attribute driven mark-up.
Of course, I've already hit a stumbling block. Is there a way to define
a class that has both Attributes and body text for an Element? I.e. I'm
trying to create a class to represent:
<?xml version="1.0" encoding="UTF-8"?>
<message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
utime="1175098850078">
payload
</message>
The closest I've figured out is:
<?xml version="1.0" encoding="UTF-8"?>
<message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default"
utime="1175098850078">
<data>payload</data>
</message>
thanks,
arne
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
|
|
From: Arne C. <arn...@cl...> - 2007-03-28 16:34:56
|
I just found Simple today. Excellent work on the project. Nice, simple, small. I usually work in C#, so Simple's syntax is very comfortable to me compared to .NET's attribute driven mark-up. Of course, I've already hit a stumbling block. Is there a way to define a class that has both Attributes and body text for an Element? I.e. I'm trying to create a class to represent: <?xml version="1.0" encoding="UTF-8"?> <message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default" utime="1175098850078"> payload </message> The closest I've figured out is: <?xml version="1.0" encoding="UTF-8"?> <message guid="ABDB9C3E-31B5-09B5-6E0F-5BC5F86BF5C7" type="default" utime="1175098850078"> <data>payload</data> </message> thanks, arne |
|
From: Niall G. <gal...@ya...> - 2007-02-21 21:44:28
|
Hi Adam,=0A=0A=0A=0AI am involved with two projects:=0A=0A=0A=0A1) http://s= impleweb.sourceforge.net (HTTP server)=0A=0A2) http://simple.sourceforge.n= et (XML serialization framework)=0A=0A=0A=0AThis mailing list is associated= with the Simple XML serialization=0Aframework. If you are asking why there= is no archive for this project=0Athen the answer is, there is no archive. = This is because the project is new, only a couple of months old now. You ma= y have noticed that the project creation date on sourceforge is quite old, = I think its sometime in 2004. It is old because I had initially intended to= host the Simple HTTP server on it quite a while ago. However, I have inste= ad created a new XML serialization API which is now hosted here.=0A=0AIniti= ally I have responded to personal emails and support requests,=0Ahowever I = have not yet recieved any mails through the mailing list, I=0Aam hoping thi= s is because the framework is intuitive and well=0Adocumented.=0A=0AFeel fr= ee to use this mailing list, I will respond to all queries.=0A =0ANiall Gal= lagher=0A=0A----- Original Message ----=0AFrom: "Ada...@In..." <= Ada...@In...>=0ATo: sim...@li...=0ACc: "= Van Orman, Michael" <Mic...@In...>=0ASent: Tuesday, Februar= y 20, 2007 1:38:03 PM=0ASubject: [Simple-support] Unable to access the Arch= ives from sourceforge.net for Simple=0A=0A=0A=0A =0A=0ABoth I and =0Aanothe= r person have signed up of the list, but we are unable to access the =0Aarc= hive:=0A=0A( published link =0Afrom the sourceforge.net site: http://source= forge.net/mailarchive/forum.php?forum=3Dsimple-support )=0A=0A =0A=0AHelp o= r =0Asuggestions?=0A=0AThanks in advance =0Afor your time.=0A=0A =0A=0A-- = =0AAdam.=0A----------------------------------------------------------------= ---------=0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin Sour= ceForge.net's Techsay panel and you'll get the chance to share your=0Aopini= ons on IT & business topics through brief surveys-and earn cash=0Ahttp://ww= w.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A__= _____________________________________________=0ASimple-support mailing list= =0AS...@li...=0Ahttps://lists.sourceforge.net/lis= ts/listinfo/simple-support=0A=0A=0A=0A=0A=0A=0A=0A =0A_____________________= _______________________________________________________________=0ADon't get= soaked. Take a quick peak at the forecast=0Awith the Yahoo! Search weathe= r shortcut.=0Ahttp://tools.search.yahoo.com/shortcuts/#loc_weather |
|
From: <Ada...@In...> - 2007-02-20 21:38:32
|
Both I and another person have signed up of the list, but we are unable to access the archive: ( published link from the sourceforge.net site: http://sourceforge.net/mailarchive/forum.php?forum=3Dsimple-support ) =20 Help or suggestions? Thanks in advance for your time. =20 -- Adam. |