You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@gmail.com> on 2010/01/06 13:38:50 UTC

New sandbox component: at-digester

Hi all guys
As a new ASF committer, I'm setting up a new Commons Sandbox, called "@Digester"

@Digester

The Apache commons-digester[1] is a great, light and fast XML parser;
it works with the SAX APIs and provides a serie of facilities to map
XML to POJOs.
It's configurable in the following ways:
* instancing and registering digester's rules into the digester;
* using the shorthand registration methods
* XML digester rules.

Even if these methods are excellent, they are limited - if Java
objects are due to be changed quickly, all previous methods need to be
extended/modified.

Inspired by the basic idea behind the JPA, JAXB's specifications, the
digester-annotations package would add some facilities to configure
the commons-digester using the Java5 language metadata annotations
support, it means creating the digester ruleset introspecting the
target POJOs, using a provided set of annotations. Using the annotated
Java object it's possible to create, in runtime the digester parser,
avoiding manual updates.

I mean, for example, given the following XML snippet

<web-app>
[...]
   <servlet>
       <servlet-name>action</servlet-name>
       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
       <init-param>
           <param-name>application</param-name>
           <param-value>org.apache.struts.example.ApplicationResources</param-value>
       </init-param>
       <init-param>
           <param-name>config</param-name>
           <param-value>/WEB-INF/struts-config.xml</param-value>
       </init-param>
   </servlet>
[...]
</web-app>

It could be mapped as

@ObjectCreate("web-app/servlet")
public final class ServletBean {

   @BeanPropertySetter("web-app/servlet/servlet-name")
   private String servletName;

   @BeanPropertySetter("web-app/servlet/servlet-class")
   private String servletClass;

   private final Map<String, String> initParams = new HashMap<String,
String>();

   public String getServletName() {
       return this.servletName;
   }

   public void setServletName(String servletName) {
       this.servletName = servletName;
   }

   public String getServletClass() {
       return this.servletClass;
   }

   public void setServletClass(String servletClass) {
       this.servletClass = servletClass;
   }

   @CallMethod("web-app/servlet/init-param")
   public void
addInitParam(@CallParam("web-app/servlet/init-param/param-name")
String name,
           @CallParam("web-app/servlet/init-param/param-value") String value) {
       this.initParams.put(name, value);
   }

   [...]

}

and a special DigesterLoader is able to create Digester rules simply
by analizing the ServletBean class:

Digester digester = DigesterLoader.createDigester(ServletBean.class);

Of course, this approach has limitations too - i.e. it doesn't work
with 3rd part developed objects - but the combined use of the
different approaches should reduce the manually produced code.

Current status of code:
I've already done almoust the 80% of code on google-code[2] licensed
under ASF2 license and also submitted a deprecated patch[3] on
commons-digester Jira: I would like to remove the
project on google-code and complete the work in
the sandbox, then re-propose to commons-digester community the new
feature.

I really hope you'll find this new way of parsing XML interesting like I do :P
Thanks in advance, best regards!!!
Simone Tripodi

[1] http://commons.apache.org/digester/
[2] http://code.google.com/p/digester-annotations/source/browse/
[3] https://issues.apache.org/jira/browse/DIGESTER-135

-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Wed, Jan 6, 2010 at 2:15 PM, Simone Tripodi <si...@gmail.com> wrote:

> first of all nice to meet you :) There are not differences since mine
> is an extension that uses annotations to build the Digester, I
> proposed the sandbox because is not complete, once terminated I'll
> propose to merge the sanbox code in the proper one.

This sounds like a lot of unnecessary work for me: Creating a new
component, publishing a new site, merging back, and so on. The same
work would rather be spent on your actual target.

I'm not involved in the digester project, but is there no chance of
doing this within the project? May be by creating a new branch, if
required?

Thanks,

Jochen


-- 
Germanys national anthem is the most boring in the world - how telling!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Ok, going to fix it now, thanks!!!

On Sat, Jan 9, 2010 at 1:46 PM, sebb <se...@gmail.com> wrote:
> On 09/01/2010, Simone Tripodi <si...@gmail.com> wrote:
>> Guys,
>>  I finally branched the code, I made a mistake during the import (I
>>  copied into trunk/trunk) and I'm very sorry for that, but nothing was
>>  broken.
>
> No problem - sandboxes are for experimentation after all...
>
>>  So now on
>>
>>
>>  https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk
>
> Source headers and properties all look OK, however there are a lot of
> @author tags in the new code (whereas the main bulk of Digester does
> not seem to use them)
>
> The board preference is for @author tags to be removed, and AFAIK this
> is the general consensus for Commons projects as well. So I would
> prefer to see these tags removed.
>
> Committer names can be added to the POM.
>
>>
>> here is the current digester/trunk branch.
>>  Thank you for your help, best regards
>>  Simo
>>
>>  On Fri, Jan 8, 2010 at 10:55 AM, Simone Tripodi
>>
>> <si...@gmail.com> wrote:
>>  > Hi Henry,
>>  > thanks a lot for your hint!!! Since I already created (and started
>>  > committing code) on the sandbox on
>>  >
>>  > https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk
>>  >
>>  > Can I branch the code here? Should I remove the existing stuff on the
>>  > target dir? Many thanks in advance, I'm sorry but I'm not familiar
>>  > with these procedures on commons.
>>  > Best regards!!!!
>>  > SImo
>>  >
>>  > On Fri, Jan 8, 2010 at 8:18 AM, Henri Yandell <fl...@gmail.com> wrote:
>>  >> You should have the rights.
>>  >>
>>  >> Make the branch into the sandbox rather than inside digester. Something like:
>>  >>
>>  >> svn mkdir https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/
>>  >> svn cp -m "Branching into the sandbox for annotation changes to
>>  >> digester" https://svn.apache.org/repos/asf/commons/proper/digester/trunk
>>  >> https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/branch-name
>>  >>
>>  >>
>>  >> On Thu, Jan 7, 2010 at 10:57 PM, Simone Tripodi
>>  >> <si...@gmail.com> wrote:
>>  >>> Hi all, Jochen, Rahul,
>>  >>> thanks for your help, fine for me working on a branch, I'm more than
>>  >>> pleased to adopt the best solution that fits with the community needs
>>  >>> :)
>>  >>> I don't think I have the rights needed to branch the digester, can
>>  >>> anyone help me please? Many thanks in advance, more than appreciated!
>>  >>> Best regards, have a nice day!
>>  >>> Simo
>>  >>>
>>  >>> On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
>>  >>>> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>>  >>>>> Hi Jochen,
>>  >>>>> sorry for the delay (I'm currently at office), I think it is better if
>>  >>>>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>>  >>>>> not a Digester neither Commons committer; in this scenario I propose
>>  >>>>> to let the community express the opinion in having this new feature
>>  >>>>> included in a next feature release, if they're interested I think it
>>  >>>>> could be good investing efforts on it.
>>  >>>> <snip/>
>>  >>>>
>>  >>>> I've been traveling for a couple of weeks (and mostly offline), but
>>  >>>> otherwise interested in these happenings.
>>  >>>>
>>  >>>> As I mentioned when you posted your proposal initially (not in a
>>  >>>> position to dig up a link to the archives), I think this feature has
>>  >>>> good merits in certain usecases and could even be included in the
>>  >>>> digester trunk when ready. Now that you have access to the Commons
>>  >>>> sandbox, I think its best to work on a digester branch in the sandbox
>>  >>>> (as suggested already by others) rather than treating it as a separate
>>  >>>> component. Having said that, whatever works best for you is fine to
>>  >>>> get the ball rolling here.
>>  >>>>
>>  >>>> Finally, were you a Commons committer already, the sandbox branch too
>>  >>>> would have been unnecessary (you could have worked on trunk itself).
>>  >>>>
>>  >>>> -Rahul
>>  >>>>
>>  >>>>
>>  >>>>
>>  >>>>> Let me know, have a nice day :)
>>  >>>>> Simo
>>  >>>>>
>>  >>>>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>>  >>>>> <jo...@gmail.com> wrote:
>>  >>>>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>  >>>>>>
>>  >>>>>>> very nice to meet you! I imported the digester as dependency since,
>>  >>>>>>> fortunately, I don't have to modify the existing code, but just adding
>>  >>>>>>> a new package that contains the new feature.
>>  >>>>>>
>>  >>>>>> Just adds to my concerns. If you are not even modifying existing code,
>>  >>>>>> one might even consider not to create a branch.
>>  >>>>>>
>>  >>>>>>
>>  >>>>>> --
>>  >>>>>> Germanys national anthem is the most boring in the world - how telling!
>>  >>>>>>
>>  >>>>
>>  >>>> ---------------------------------------------------------------------
>>  >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  >>>> For additional commands, e-mail: dev-help@commons.apache.org
>>  >>>>
>>  >>>>
>>  >>>
>>  >>>
>>  >>>
>>  >>> --
>>  >>> http://www.google.com/profiles/simone.tripodi
>>  >>>
>>  >>> ---------------------------------------------------------------------
>>  >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  >>> For additional commands, e-mail: dev-help@commons.apache.org
>>  >>>
>>  >>>
>>  >>
>>  >> ---------------------------------------------------------------------
>>  >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  >> For additional commands, e-mail: dev-help@commons.apache.org
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > http://www.google.com/profiles/simone.tripodi
>>  >
>>
>>
>>
>>  --
>>  http://www.google.com/profiles/simone.tripodi
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by sebb <se...@gmail.com>.
On 09/01/2010, Simone Tripodi <si...@gmail.com> wrote:
> Guys,
>  I finally branched the code, I made a mistake during the import (I
>  copied into trunk/trunk) and I'm very sorry for that, but nothing was
>  broken.

No problem - sandboxes are for experimentation after all...

>  So now on
>
>
>  https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk

Source headers and properties all look OK, however there are a lot of
@author tags in the new code (whereas the main bulk of Digester does
not seem to use them)

The board preference is for @author tags to be removed, and AFAIK this
is the general consensus for Commons projects as well. So I would
prefer to see these tags removed.

Committer names can be added to the POM.

>
> here is the current digester/trunk branch.
>  Thank you for your help, best regards
>  Simo
>
>  On Fri, Jan 8, 2010 at 10:55 AM, Simone Tripodi
>
> <si...@gmail.com> wrote:
>  > Hi Henry,
>  > thanks a lot for your hint!!! Since I already created (and started
>  > committing code) on the sandbox on
>  >
>  > https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk
>  >
>  > Can I branch the code here? Should I remove the existing stuff on the
>  > target dir? Many thanks in advance, I'm sorry but I'm not familiar
>  > with these procedures on commons.
>  > Best regards!!!!
>  > SImo
>  >
>  > On Fri, Jan 8, 2010 at 8:18 AM, Henri Yandell <fl...@gmail.com> wrote:
>  >> You should have the rights.
>  >>
>  >> Make the branch into the sandbox rather than inside digester. Something like:
>  >>
>  >> svn mkdir https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/
>  >> svn cp -m "Branching into the sandbox for annotation changes to
>  >> digester" https://svn.apache.org/repos/asf/commons/proper/digester/trunk
>  >> https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/branch-name
>  >>
>  >>
>  >> On Thu, Jan 7, 2010 at 10:57 PM, Simone Tripodi
>  >> <si...@gmail.com> wrote:
>  >>> Hi all, Jochen, Rahul,
>  >>> thanks for your help, fine for me working on a branch, I'm more than
>  >>> pleased to adopt the best solution that fits with the community needs
>  >>> :)
>  >>> I don't think I have the rights needed to branch the digester, can
>  >>> anyone help me please? Many thanks in advance, more than appreciated!
>  >>> Best regards, have a nice day!
>  >>> Simo
>  >>>
>  >>> On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
>  >>>> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>  >>>>> Hi Jochen,
>  >>>>> sorry for the delay (I'm currently at office), I think it is better if
>  >>>>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>  >>>>> not a Digester neither Commons committer; in this scenario I propose
>  >>>>> to let the community express the opinion in having this new feature
>  >>>>> included in a next feature release, if they're interested I think it
>  >>>>> could be good investing efforts on it.
>  >>>> <snip/>
>  >>>>
>  >>>> I've been traveling for a couple of weeks (and mostly offline), but
>  >>>> otherwise interested in these happenings.
>  >>>>
>  >>>> As I mentioned when you posted your proposal initially (not in a
>  >>>> position to dig up a link to the archives), I think this feature has
>  >>>> good merits in certain usecases and could even be included in the
>  >>>> digester trunk when ready. Now that you have access to the Commons
>  >>>> sandbox, I think its best to work on a digester branch in the sandbox
>  >>>> (as suggested already by others) rather than treating it as a separate
>  >>>> component. Having said that, whatever works best for you is fine to
>  >>>> get the ball rolling here.
>  >>>>
>  >>>> Finally, were you a Commons committer already, the sandbox branch too
>  >>>> would have been unnecessary (you could have worked on trunk itself).
>  >>>>
>  >>>> -Rahul
>  >>>>
>  >>>>
>  >>>>
>  >>>>> Let me know, have a nice day :)
>  >>>>> Simo
>  >>>>>
>  >>>>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>  >>>>> <jo...@gmail.com> wrote:
>  >>>>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>  >>>>>>
>  >>>>>>> very nice to meet you! I imported the digester as dependency since,
>  >>>>>>> fortunately, I don't have to modify the existing code, but just adding
>  >>>>>>> a new package that contains the new feature.
>  >>>>>>
>  >>>>>> Just adds to my concerns. If you are not even modifying existing code,
>  >>>>>> one might even consider not to create a branch.
>  >>>>>>
>  >>>>>>
>  >>>>>> --
>  >>>>>> Germanys national anthem is the most boring in the world - how telling!
>  >>>>>>
>  >>>>
>  >>>> ---------------------------------------------------------------------
>  >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  >>>> For additional commands, e-mail: dev-help@commons.apache.org
>  >>>>
>  >>>>
>  >>>
>  >>>
>  >>>
>  >>> --
>  >>> http://www.google.com/profiles/simone.tripodi
>  >>>
>  >>> ---------------------------------------------------------------------
>  >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  >>> For additional commands, e-mail: dev-help@commons.apache.org
>  >>>
>  >>>
>  >>
>  >> ---------------------------------------------------------------------
>  >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  >> For additional commands, e-mail: dev-help@commons.apache.org
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > http://www.google.com/profiles/simone.tripodi
>  >
>
>
>
>  --
>  http://www.google.com/profiles/simone.tripodi
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Guys,
I finally branched the code, I made a mistake during the import (I
copied into trunk/trunk) and I'm very sorry for that, but nothing was
broken.
So now on

https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk

here is the current digester/trunk branch.
Thank you for your help, best regards
Simo

On Fri, Jan 8, 2010 at 10:55 AM, Simone Tripodi
<si...@gmail.com> wrote:
> Hi Henry,
> thanks a lot for your hint!!! Since I already created (and started
> committing code) on the sandbox on
>
> https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk
>
> Can I branch the code here? Should I remove the existing stuff on the
> target dir? Many thanks in advance, I'm sorry but I'm not familiar
> with these procedures on commons.
> Best regards!!!!
> SImo
>
> On Fri, Jan 8, 2010 at 8:18 AM, Henri Yandell <fl...@gmail.com> wrote:
>> You should have the rights.
>>
>> Make the branch into the sandbox rather than inside digester. Something like:
>>
>> svn mkdir https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/
>> svn cp -m "Branching into the sandbox for annotation changes to
>> digester" https://svn.apache.org/repos/asf/commons/proper/digester/trunk
>> https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/branch-name
>>
>>
>> On Thu, Jan 7, 2010 at 10:57 PM, Simone Tripodi
>> <si...@gmail.com> wrote:
>>> Hi all, Jochen, Rahul,
>>> thanks for your help, fine for me working on a branch, I'm more than
>>> pleased to adopt the best solution that fits with the community needs
>>> :)
>>> I don't think I have the rights needed to branch the digester, can
>>> anyone help me please? Many thanks in advance, more than appreciated!
>>> Best regards, have a nice day!
>>> Simo
>>>
>>> On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
>>>> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>>> Hi Jochen,
>>>>> sorry for the delay (I'm currently at office), I think it is better if
>>>>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>>>>> not a Digester neither Commons committer; in this scenario I propose
>>>>> to let the community express the opinion in having this new feature
>>>>> included in a next feature release, if they're interested I think it
>>>>> could be good investing efforts on it.
>>>> <snip/>
>>>>
>>>> I've been traveling for a couple of weeks (and mostly offline), but
>>>> otherwise interested in these happenings.
>>>>
>>>> As I mentioned when you posted your proposal initially (not in a
>>>> position to dig up a link to the archives), I think this feature has
>>>> good merits in certain usecases and could even be included in the
>>>> digester trunk when ready. Now that you have access to the Commons
>>>> sandbox, I think its best to work on a digester branch in the sandbox
>>>> (as suggested already by others) rather than treating it as a separate
>>>> component. Having said that, whatever works best for you is fine to
>>>> get the ball rolling here.
>>>>
>>>> Finally, were you a Commons committer already, the sandbox branch too
>>>> would have been unnecessary (you could have worked on trunk itself).
>>>>
>>>> -Rahul
>>>>
>>>>
>>>>
>>>>> Let me know, have a nice day :)
>>>>> Simo
>>>>>
>>>>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>>>>> <jo...@gmail.com> wrote:
>>>>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>>>>
>>>>>>> very nice to meet you! I imported the digester as dependency since,
>>>>>>> fortunately, I don't have to modify the existing code, but just adding
>>>>>>> a new package that contains the new feature.
>>>>>>
>>>>>> Just adds to my concerns. If you are not even modifying existing code,
>>>>>> one might even consider not to create a branch.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Germanys national anthem is the most boring in the world - how telling!
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.google.com/profiles/simone.tripodi
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
>
> --
> http://www.google.com/profiles/simone.tripodi
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Hi Henry,
thanks a lot for your hint!!! Since I already created (and started
committing code) on the sandbox on

https://svn.apache.org/repos/asf/commons/sandbox/at-digester/trunk

Can I branch the code here? Should I remove the existing stuff on the
target dir? Many thanks in advance, I'm sorry but I'm not familiar
with these procedures on commons.
Best regards!!!!
SImo

On Fri, Jan 8, 2010 at 8:18 AM, Henri Yandell <fl...@gmail.com> wrote:
> You should have the rights.
>
> Make the branch into the sandbox rather than inside digester. Something like:
>
> svn mkdir https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/
> svn cp -m "Branching into the sandbox for annotation changes to
> digester" https://svn.apache.org/repos/asf/commons/proper/digester/trunk
> https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/branch-name
>
>
> On Thu, Jan 7, 2010 at 10:57 PM, Simone Tripodi
> <si...@gmail.com> wrote:
>> Hi all, Jochen, Rahul,
>> thanks for your help, fine for me working on a branch, I'm more than
>> pleased to adopt the best solution that fits with the community needs
>> :)
>> I don't think I have the rights needed to branch the digester, can
>> anyone help me please? Many thanks in advance, more than appreciated!
>> Best regards, have a nice day!
>> Simo
>>
>> On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
>>> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>> Hi Jochen,
>>>> sorry for the delay (I'm currently at office), I think it is better if
>>>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>>>> not a Digester neither Commons committer; in this scenario I propose
>>>> to let the community express the opinion in having this new feature
>>>> included in a next feature release, if they're interested I think it
>>>> could be good investing efforts on it.
>>> <snip/>
>>>
>>> I've been traveling for a couple of weeks (and mostly offline), but
>>> otherwise interested in these happenings.
>>>
>>> As I mentioned when you posted your proposal initially (not in a
>>> position to dig up a link to the archives), I think this feature has
>>> good merits in certain usecases and could even be included in the
>>> digester trunk when ready. Now that you have access to the Commons
>>> sandbox, I think its best to work on a digester branch in the sandbox
>>> (as suggested already by others) rather than treating it as a separate
>>> component. Having said that, whatever works best for you is fine to
>>> get the ball rolling here.
>>>
>>> Finally, were you a Commons committer already, the sandbox branch too
>>> would have been unnecessary (you could have worked on trunk itself).
>>>
>>> -Rahul
>>>
>>>
>>>
>>>> Let me know, have a nice day :)
>>>> Simo
>>>>
>>>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>>>> <jo...@gmail.com> wrote:
>>>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>>>
>>>>>> very nice to meet you! I imported the digester as dependency since,
>>>>>> fortunately, I don't have to modify the existing code, but just adding
>>>>>> a new package that contains the new feature.
>>>>>
>>>>> Just adds to my concerns. If you are not even modifying existing code,
>>>>> one might even consider not to create a branch.
>>>>>
>>>>>
>>>>> --
>>>>> Germanys national anthem is the most boring in the world - how telling!
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>>
>> --
>> http://www.google.com/profiles/simone.tripodi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Henri Yandell <fl...@gmail.com>.
You should have the rights.

Make the branch into the sandbox rather than inside digester. Something like:

svn mkdir https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/
svn cp -m "Branching into the sandbox for annotation changes to
digester" https://svn.apache.org/repos/asf/commons/proper/digester/trunk
https://svn.apache.org/repos/asf/commons/sandbox/digester-anno/branch-name


On Thu, Jan 7, 2010 at 10:57 PM, Simone Tripodi
<si...@gmail.com> wrote:
> Hi all, Jochen, Rahul,
> thanks for your help, fine for me working on a branch, I'm more than
> pleased to adopt the best solution that fits with the community needs
> :)
> I don't think I have the rights needed to branch the digester, can
> anyone help me please? Many thanks in advance, more than appreciated!
> Best regards, have a nice day!
> Simo
>
> On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
>> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>>> Hi Jochen,
>>> sorry for the delay (I'm currently at office), I think it is better if
>>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>>> not a Digester neither Commons committer; in this scenario I propose
>>> to let the community express the opinion in having this new feature
>>> included in a next feature release, if they're interested I think it
>>> could be good investing efforts on it.
>> <snip/>
>>
>> I've been traveling for a couple of weeks (and mostly offline), but
>> otherwise interested in these happenings.
>>
>> As I mentioned when you posted your proposal initially (not in a
>> position to dig up a link to the archives), I think this feature has
>> good merits in certain usecases and could even be included in the
>> digester trunk when ready. Now that you have access to the Commons
>> sandbox, I think its best to work on a digester branch in the sandbox
>> (as suggested already by others) rather than treating it as a separate
>> component. Having said that, whatever works best for you is fine to
>> get the ball rolling here.
>>
>> Finally, were you a Commons committer already, the sandbox branch too
>> would have been unnecessary (you could have worked on trunk itself).
>>
>> -Rahul
>>
>>
>>
>>> Let me know, have a nice day :)
>>> Simo
>>>
>>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>>> <jo...@gmail.com> wrote:
>>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>>
>>>>> very nice to meet you! I imported the digester as dependency since,
>>>>> fortunately, I don't have to modify the existing code, but just adding
>>>>> a new package that contains the new feature.
>>>>
>>>> Just adds to my concerns. If you are not even modifying existing code,
>>>> one might even consider not to create a branch.
>>>>
>>>>
>>>> --
>>>> Germanys national anthem is the most boring in the world - how telling!
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
>
> --
> http://www.google.com/profiles/simone.tripodi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Hi all, Jochen, Rahul,
thanks for your help, fine for me working on a branch, I'm more than
pleased to adopt the best solution that fits with the community needs
:)
I don't think I have the rights needed to branch the digester, can
anyone help me please? Many thanks in advance, more than appreciated!
Best regards, have a nice day!
Simo

On Thu, Jan 7, 2010 at 8:47 PM, Rahul Akolkar <ra...@gmail.com> wrote:
> On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
>> Hi Jochen,
>> sorry for the delay (I'm currently at office), I think it is better if
>> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
>> not a Digester neither Commons committer; in this scenario I propose
>> to let the community express the opinion in having this new feature
>> included in a next feature release, if they're interested I think it
>> could be good investing efforts on it.
> <snip/>
>
> I've been traveling for a couple of weeks (and mostly offline), but
> otherwise interested in these happenings.
>
> As I mentioned when you posted your proposal initially (not in a
> position to dig up a link to the archives), I think this feature has
> good merits in certain usecases and could even be included in the
> digester trunk when ready. Now that you have access to the Commons
> sandbox, I think its best to work on a digester branch in the sandbox
> (as suggested already by others) rather than treating it as a separate
> component. Having said that, whatever works best for you is fine to
> get the ball rolling here.
>
> Finally, were you a Commons committer already, the sandbox branch too
> would have been unnecessary (you could have worked on trunk itself).
>
> -Rahul
>
>
>
>> Let me know, have a nice day :)
>> Simo
>>
>> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
>> <jo...@gmail.com> wrote:
>>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>>
>>>> very nice to meet you! I imported the digester as dependency since,
>>>> fortunately, I don't have to modify the existing code, but just adding
>>>> a new package that contains the new feature.
>>>
>>> Just adds to my concerns. If you are not even modifying existing code,
>>> one might even consider not to create a branch.
>>>
>>>
>>> --
>>> Germanys national anthem is the most boring in the world - how telling!
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Rahul Akolkar <ra...@gmail.com>.
On Thu, Jan 7, 2010 at 7:11 AM, Simone Tripodi <si...@gmail.com> wrote:
> Hi Jochen,
> sorry for the delay (I'm currently at office), I think it is better if
> we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
> not a Digester neither Commons committer; in this scenario I propose
> to let the community express the opinion in having this new feature
> included in a next feature release, if they're interested I think it
> could be good investing efforts on it.
<snip/>

I've been traveling for a couple of weeks (and mostly offline), but
otherwise interested in these happenings.

As I mentioned when you posted your proposal initially (not in a
position to dig up a link to the archives), I think this feature has
good merits in certain usecases and could even be included in the
digester trunk when ready. Now that you have access to the Commons
sandbox, I think its best to work on a digester branch in the sandbox
(as suggested already by others) rather than treating it as a separate
component. Having said that, whatever works best for you is fine to
get the ball rolling here.

Finally, were you a Commons committer already, the sandbox branch too
would have been unnecessary (you could have worked on trunk itself).

-Rahul



> Let me know, have a nice day :)
> Simo
>
> On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
> <jo...@gmail.com> wrote:
>> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>>
>>> very nice to meet you! I imported the digester as dependency since,
>>> fortunately, I don't have to modify the existing code, but just adding
>>> a new package that contains the new feature.
>>
>> Just adds to my concerns. If you are not even modifying existing code,
>> one might even consider not to create a branch.
>>
>>
>> --
>> Germanys national anthem is the most boring in the world - how telling!
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Hi Jochen,
sorry for the delay (I'm currently at office), I think it is better if
we involve Rahul Akolkar (CC-ed in the mail): I'm an ASF committer but
not a Digester neither Commons committer; in this scenario I propose
to let the community express the opinion in having this new feature
included in a next feature release, if they're interested I think it
could be good investing efforts on it.
Let me know, have a nice day :)
Simo

On Thu, Jan 7, 2010 at 9:01 AM, Jochen Wiedmann
<jo...@gmail.com> wrote:
> On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:
>
>> very nice to meet you! I imported the digester as dependency since,
>> fortunately, I don't have to modify the existing code, but just adding
>> a new package that contains the new feature.
>
> Just adds to my concerns. If you are not even modifying existing code,
> one might even consider not to create a branch.
>
>
> --
> Germanys national anthem is the most boring in the world - how telling!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Thu, Jan 7, 2010 at 7:54 AM, Simone Tripodi <si...@gmail.com> wrote:

> very nice to meet you! I imported the digester as dependency since,
> fortunately, I don't have to modify the existing code, but just adding
> a new package that contains the new feature.

Just adds to my concerns. If you are not even modifying existing code,
one might even consider not to create a branch.


-- 
Germanys national anthem is the most boring in the world - how telling!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Hi Henry,
very nice to meet you! I imported the digester as dependency since,
fortunately, I don't have to modify the existing code, but just adding
a new package that contains the new feature. Thanks a lot for your
hint, very appreciated!
Best regards,
Simo

On Thu, Jan 7, 2010 at 2:27 AM, Henri Yandell <fl...@gmail.com> wrote:
> One option to consider, if you want, is to branch digester into the
> sandbox and work on it that way. In case trying to treat it as an
> extension gets too painful.
>
> Hen
>
> On Wed, Jan 6, 2010 at 5:15 AM, Simone Tripodi <si...@gmail.com> wrote:
>> Hi Jochen,
>> first of all nice to meet you :) There are not differences since mine
>> is an extension that uses annotations to build the Digester, I
>> proposed the sandbox because is not complete, once terminated I'll
>> propose to merge the sanbox code in the proper one.
>> Have a nice day, best regards,
>> Simo
>>
>> On Wed, Jan 6, 2010 at 2:02 PM, Jochen Wiedmann
>> <jo...@gmail.com> wrote:
>>> What is the difference between this and the digester? Why is it a new
>>> project and can't it be integrated into the existing?
>>>
>>>
>>>
>>> On Wed, Jan 6, 2010 at 1:38 PM, Simone Tripodi <si...@gmail.com> wrote:
>>>> Hi all guys
>>>> As a new ASF committer, I'm setting up a new Commons Sandbox, called "@Digester"
>>>>
>>>> @Digester
>>>>
>>>> The Apache commons-digester[1] is a great, light and fast XML parser;
>>>> it works with the SAX APIs and provides a serie of facilities to map
>>>> XML to POJOs.
>>>> It's configurable in the following ways:
>>>> * instancing and registering digester's rules into the digester;
>>>> * using the shorthand registration methods
>>>> * XML digester rules.
>>>>
>>>> Even if these methods are excellent, they are limited - if Java
>>>> objects are due to be changed quickly, all previous methods need to be
>>>> extended/modified.
>>>>
>>>> Inspired by the basic idea behind the JPA, JAXB's specifications, the
>>>> digester-annotations package would add some facilities to configure
>>>> the commons-digester using the Java5 language metadata annotations
>>>> support, it means creating the digester ruleset introspecting the
>>>> target POJOs, using a provided set of annotations. Using the annotated
>>>> Java object it's possible to create, in runtime the digester parser,
>>>> avoiding manual updates.
>>>>
>>>> I mean, for example, given the following XML snippet
>>>>
>>>> <web-app>
>>>> [...]
>>>>   <servlet>
>>>>       <servlet-name>action</servlet-name>
>>>>       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>>>>       <init-param>
>>>>           <param-name>application</param-name>
>>>>           <param-value>org.apache.struts.example.ApplicationResources</param-value>
>>>>       </init-param>
>>>>       <init-param>
>>>>           <param-name>config</param-name>
>>>>           <param-value>/WEB-INF/struts-config.xml</param-value>
>>>>       </init-param>
>>>>   </servlet>
>>>> [...]
>>>> </web-app>
>>>>
>>>> It could be mapped as
>>>>
>>>> @ObjectCreate("web-app/servlet")
>>>> public final class ServletBean {
>>>>
>>>>   @BeanPropertySetter("web-app/servlet/servlet-name")
>>>>   private String servletName;
>>>>
>>>>   @BeanPropertySetter("web-app/servlet/servlet-class")
>>>>   private String servletClass;
>>>>
>>>>   private final Map<String, String> initParams = new HashMap<String,
>>>> String>();
>>>>
>>>>   public String getServletName() {
>>>>       return this.servletName;
>>>>   }
>>>>
>>>>   public void setServletName(String servletName) {
>>>>       this.servletName = servletName;
>>>>   }
>>>>
>>>>   public String getServletClass() {
>>>>       return this.servletClass;
>>>>   }
>>>>
>>>>   public void setServletClass(String servletClass) {
>>>>       this.servletClass = servletClass;
>>>>   }
>>>>
>>>>   @CallMethod("web-app/servlet/init-param")
>>>>   public void
>>>> addInitParam(@CallParam("web-app/servlet/init-param/param-name")
>>>> String name,
>>>>           @CallParam("web-app/servlet/init-param/param-value") String value) {
>>>>       this.initParams.put(name, value);
>>>>   }
>>>>
>>>>   [...]
>>>>
>>>> }
>>>>
>>>> and a special DigesterLoader is able to create Digester rules simply
>>>> by analizing the ServletBean class:
>>>>
>>>> Digester digester = DigesterLoader.createDigester(ServletBean.class);
>>>>
>>>> Of course, this approach has limitations too - i.e. it doesn't work
>>>> with 3rd part developed objects - but the combined use of the
>>>> different approaches should reduce the manually produced code.
>>>>
>>>> Current status of code:
>>>> I've already done almoust the 80% of code on google-code[2] licensed
>>>> under ASF2 license and also submitted a deprecated patch[3] on
>>>> commons-digester Jira: I would like to remove the
>>>> project on google-code and complete the work in
>>>> the sandbox, then re-propose to commons-digester community the new
>>>> feature.
>>>>
>>>> I really hope you'll find this new way of parsing XML interesting like I do :P
>>>> Thanks in advance, best regards!!!
>>>> Simone Tripodi
>>>>
>>>> [1] http://commons.apache.org/digester/
>>>> [2] http://code.google.com/p/digester-annotations/source/browse/
>>>> [3] https://issues.apache.org/jira/browse/DIGESTER-135
>>>>
>>>> --
>>>> http://www.google.com/profiles/simone.tripodi
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Germanys national anthem is the most boring in the world - how telling!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>>
>> --
>> http://www.google.com/profiles/simone.tripodi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Henri Yandell <fl...@gmail.com>.
One option to consider, if you want, is to branch digester into the
sandbox and work on it that way. In case trying to treat it as an
extension gets too painful.

Hen

On Wed, Jan 6, 2010 at 5:15 AM, Simone Tripodi <si...@gmail.com> wrote:
> Hi Jochen,
> first of all nice to meet you :) There are not differences since mine
> is an extension that uses annotations to build the Digester, I
> proposed the sandbox because is not complete, once terminated I'll
> propose to merge the sanbox code in the proper one.
> Have a nice day, best regards,
> Simo
>
> On Wed, Jan 6, 2010 at 2:02 PM, Jochen Wiedmann
> <jo...@gmail.com> wrote:
>> What is the difference between this and the digester? Why is it a new
>> project and can't it be integrated into the existing?
>>
>>
>>
>> On Wed, Jan 6, 2010 at 1:38 PM, Simone Tripodi <si...@gmail.com> wrote:
>>> Hi all guys
>>> As a new ASF committer, I'm setting up a new Commons Sandbox, called "@Digester"
>>>
>>> @Digester
>>>
>>> The Apache commons-digester[1] is a great, light and fast XML parser;
>>> it works with the SAX APIs and provides a serie of facilities to map
>>> XML to POJOs.
>>> It's configurable in the following ways:
>>> * instancing and registering digester's rules into the digester;
>>> * using the shorthand registration methods
>>> * XML digester rules.
>>>
>>> Even if these methods are excellent, they are limited - if Java
>>> objects are due to be changed quickly, all previous methods need to be
>>> extended/modified.
>>>
>>> Inspired by the basic idea behind the JPA, JAXB's specifications, the
>>> digester-annotations package would add some facilities to configure
>>> the commons-digester using the Java5 language metadata annotations
>>> support, it means creating the digester ruleset introspecting the
>>> target POJOs, using a provided set of annotations. Using the annotated
>>> Java object it's possible to create, in runtime the digester parser,
>>> avoiding manual updates.
>>>
>>> I mean, for example, given the following XML snippet
>>>
>>> <web-app>
>>> [...]
>>>   <servlet>
>>>       <servlet-name>action</servlet-name>
>>>       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>>>       <init-param>
>>>           <param-name>application</param-name>
>>>           <param-value>org.apache.struts.example.ApplicationResources</param-value>
>>>       </init-param>
>>>       <init-param>
>>>           <param-name>config</param-name>
>>>           <param-value>/WEB-INF/struts-config.xml</param-value>
>>>       </init-param>
>>>   </servlet>
>>> [...]
>>> </web-app>
>>>
>>> It could be mapped as
>>>
>>> @ObjectCreate("web-app/servlet")
>>> public final class ServletBean {
>>>
>>>   @BeanPropertySetter("web-app/servlet/servlet-name")
>>>   private String servletName;
>>>
>>>   @BeanPropertySetter("web-app/servlet/servlet-class")
>>>   private String servletClass;
>>>
>>>   private final Map<String, String> initParams = new HashMap<String,
>>> String>();
>>>
>>>   public String getServletName() {
>>>       return this.servletName;
>>>   }
>>>
>>>   public void setServletName(String servletName) {
>>>       this.servletName = servletName;
>>>   }
>>>
>>>   public String getServletClass() {
>>>       return this.servletClass;
>>>   }
>>>
>>>   public void setServletClass(String servletClass) {
>>>       this.servletClass = servletClass;
>>>   }
>>>
>>>   @CallMethod("web-app/servlet/init-param")
>>>   public void
>>> addInitParam(@CallParam("web-app/servlet/init-param/param-name")
>>> String name,
>>>           @CallParam("web-app/servlet/init-param/param-value") String value) {
>>>       this.initParams.put(name, value);
>>>   }
>>>
>>>   [...]
>>>
>>> }
>>>
>>> and a special DigesterLoader is able to create Digester rules simply
>>> by analizing the ServletBean class:
>>>
>>> Digester digester = DigesterLoader.createDigester(ServletBean.class);
>>>
>>> Of course, this approach has limitations too - i.e. it doesn't work
>>> with 3rd part developed objects - but the combined use of the
>>> different approaches should reduce the manually produced code.
>>>
>>> Current status of code:
>>> I've already done almoust the 80% of code on google-code[2] licensed
>>> under ASF2 license and also submitted a deprecated patch[3] on
>>> commons-digester Jira: I would like to remove the
>>> project on google-code and complete the work in
>>> the sandbox, then re-propose to commons-digester community the new
>>> feature.
>>>
>>> I really hope you'll find this new way of parsing XML interesting like I do :P
>>> Thanks in advance, best regards!!!
>>> Simone Tripodi
>>>
>>> [1] http://commons.apache.org/digester/
>>> [2] http://code.google.com/p/digester-annotations/source/browse/
>>> [3] https://issues.apache.org/jira/browse/DIGESTER-135
>>>
>>> --
>>> http://www.google.com/profiles/simone.tripodi
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Germanys national anthem is the most boring in the world - how telling!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
>
> --
> http://www.google.com/profiles/simone.tripodi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Simone Tripodi <si...@gmail.com>.
Hi Jochen,
first of all nice to meet you :) There are not differences since mine
is an extension that uses annotations to build the Digester, I
proposed the sandbox because is not complete, once terminated I'll
propose to merge the sanbox code in the proper one.
Have a nice day, best regards,
Simo

On Wed, Jan 6, 2010 at 2:02 PM, Jochen Wiedmann
<jo...@gmail.com> wrote:
> What is the difference between this and the digester? Why is it a new
> project and can't it be integrated into the existing?
>
>
>
> On Wed, Jan 6, 2010 at 1:38 PM, Simone Tripodi <si...@gmail.com> wrote:
>> Hi all guys
>> As a new ASF committer, I'm setting up a new Commons Sandbox, called "@Digester"
>>
>> @Digester
>>
>> The Apache commons-digester[1] is a great, light and fast XML parser;
>> it works with the SAX APIs and provides a serie of facilities to map
>> XML to POJOs.
>> It's configurable in the following ways:
>> * instancing and registering digester's rules into the digester;
>> * using the shorthand registration methods
>> * XML digester rules.
>>
>> Even if these methods are excellent, they are limited - if Java
>> objects are due to be changed quickly, all previous methods need to be
>> extended/modified.
>>
>> Inspired by the basic idea behind the JPA, JAXB's specifications, the
>> digester-annotations package would add some facilities to configure
>> the commons-digester using the Java5 language metadata annotations
>> support, it means creating the digester ruleset introspecting the
>> target POJOs, using a provided set of annotations. Using the annotated
>> Java object it's possible to create, in runtime the digester parser,
>> avoiding manual updates.
>>
>> I mean, for example, given the following XML snippet
>>
>> <web-app>
>> [...]
>>   <servlet>
>>       <servlet-name>action</servlet-name>
>>       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>>       <init-param>
>>           <param-name>application</param-name>
>>           <param-value>org.apache.struts.example.ApplicationResources</param-value>
>>       </init-param>
>>       <init-param>
>>           <param-name>config</param-name>
>>           <param-value>/WEB-INF/struts-config.xml</param-value>
>>       </init-param>
>>   </servlet>
>> [...]
>> </web-app>
>>
>> It could be mapped as
>>
>> @ObjectCreate("web-app/servlet")
>> public final class ServletBean {
>>
>>   @BeanPropertySetter("web-app/servlet/servlet-name")
>>   private String servletName;
>>
>>   @BeanPropertySetter("web-app/servlet/servlet-class")
>>   private String servletClass;
>>
>>   private final Map<String, String> initParams = new HashMap<String,
>> String>();
>>
>>   public String getServletName() {
>>       return this.servletName;
>>   }
>>
>>   public void setServletName(String servletName) {
>>       this.servletName = servletName;
>>   }
>>
>>   public String getServletClass() {
>>       return this.servletClass;
>>   }
>>
>>   public void setServletClass(String servletClass) {
>>       this.servletClass = servletClass;
>>   }
>>
>>   @CallMethod("web-app/servlet/init-param")
>>   public void
>> addInitParam(@CallParam("web-app/servlet/init-param/param-name")
>> String name,
>>           @CallParam("web-app/servlet/init-param/param-value") String value) {
>>       this.initParams.put(name, value);
>>   }
>>
>>   [...]
>>
>> }
>>
>> and a special DigesterLoader is able to create Digester rules simply
>> by analizing the ServletBean class:
>>
>> Digester digester = DigesterLoader.createDigester(ServletBean.class);
>>
>> Of course, this approach has limitations too - i.e. it doesn't work
>> with 3rd part developed objects - but the combined use of the
>> different approaches should reduce the manually produced code.
>>
>> Current status of code:
>> I've already done almoust the 80% of code on google-code[2] licensed
>> under ASF2 license and also submitted a deprecated patch[3] on
>> commons-digester Jira: I would like to remove the
>> project on google-code and complete the work in
>> the sandbox, then re-propose to commons-digester community the new
>> feature.
>>
>> I really hope you'll find this new way of parsing XML interesting like I do :P
>> Thanks in advance, best regards!!!
>> Simone Tripodi
>>
>> [1] http://commons.apache.org/digester/
>> [2] http://code.google.com/p/digester-annotations/source/browse/
>> [3] https://issues.apache.org/jira/browse/DIGESTER-135
>>
>> --
>> http://www.google.com/profiles/simone.tripodi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
>
> --
> Germanys national anthem is the most boring in the world - how telling!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
http://www.google.com/profiles/simone.tripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: New sandbox component: at-digester

Posted by Jochen Wiedmann <jo...@gmail.com>.
What is the difference between this and the digester? Why is it a new
project and can't it be integrated into the existing?



On Wed, Jan 6, 2010 at 1:38 PM, Simone Tripodi <si...@gmail.com> wrote:
> Hi all guys
> As a new ASF committer, I'm setting up a new Commons Sandbox, called "@Digester"
>
> @Digester
>
> The Apache commons-digester[1] is a great, light and fast XML parser;
> it works with the SAX APIs and provides a serie of facilities to map
> XML to POJOs.
> It's configurable in the following ways:
> * instancing and registering digester's rules into the digester;
> * using the shorthand registration methods
> * XML digester rules.
>
> Even if these methods are excellent, they are limited - if Java
> objects are due to be changed quickly, all previous methods need to be
> extended/modified.
>
> Inspired by the basic idea behind the JPA, JAXB's specifications, the
> digester-annotations package would add some facilities to configure
> the commons-digester using the Java5 language metadata annotations
> support, it means creating the digester ruleset introspecting the
> target POJOs, using a provided set of annotations. Using the annotated
> Java object it's possible to create, in runtime the digester parser,
> avoiding manual updates.
>
> I mean, for example, given the following XML snippet
>
> <web-app>
> [...]
>   <servlet>
>       <servlet-name>action</servlet-name>
>       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>       <init-param>
>           <param-name>application</param-name>
>           <param-value>org.apache.struts.example.ApplicationResources</param-value>
>       </init-param>
>       <init-param>
>           <param-name>config</param-name>
>           <param-value>/WEB-INF/struts-config.xml</param-value>
>       </init-param>
>   </servlet>
> [...]
> </web-app>
>
> It could be mapped as
>
> @ObjectCreate("web-app/servlet")
> public final class ServletBean {
>
>   @BeanPropertySetter("web-app/servlet/servlet-name")
>   private String servletName;
>
>   @BeanPropertySetter("web-app/servlet/servlet-class")
>   private String servletClass;
>
>   private final Map<String, String> initParams = new HashMap<String,
> String>();
>
>   public String getServletName() {
>       return this.servletName;
>   }
>
>   public void setServletName(String servletName) {
>       this.servletName = servletName;
>   }
>
>   public String getServletClass() {
>       return this.servletClass;
>   }
>
>   public void setServletClass(String servletClass) {
>       this.servletClass = servletClass;
>   }
>
>   @CallMethod("web-app/servlet/init-param")
>   public void
> addInitParam(@CallParam("web-app/servlet/init-param/param-name")
> String name,
>           @CallParam("web-app/servlet/init-param/param-value") String value) {
>       this.initParams.put(name, value);
>   }
>
>   [...]
>
> }
>
> and a special DigesterLoader is able to create Digester rules simply
> by analizing the ServletBean class:
>
> Digester digester = DigesterLoader.createDigester(ServletBean.class);
>
> Of course, this approach has limitations too - i.e. it doesn't work
> with 3rd part developed objects - but the combined use of the
> different approaches should reduce the manually produced code.
>
> Current status of code:
> I've already done almoust the 80% of code on google-code[2] licensed
> under ASF2 license and also submitted a deprecated patch[3] on
> commons-digester Jira: I would like to remove the
> project on google-code and complete the work in
> the sandbox, then re-propose to commons-digester community the new
> feature.
>
> I really hope you'll find this new way of parsing XML interesting like I do :P
> Thanks in advance, best regards!!!
> Simone Tripodi
>
> [1] http://commons.apache.org/digester/
> [2] http://code.google.com/p/digester-annotations/source/browse/
> [3] https://issues.apache.org/jira/browse/DIGESTER-135
>
> --
> http://www.google.com/profiles/simone.tripodi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



-- 
Germanys national anthem is the most boring in the world - how telling!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org