[ 
https://issues.apache.org/jira/browse/DIGESTER-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768281#action_12768281
 ] 

Simone Tripodi commented on DIGESTER-135:
-----------------------------------------

Of course this approach has his known[1] limitations and works for a Digester 
subset application cases, btw should/could (IMHO) simplify, even if a little, 
the RuleSet startup.

Just to let you know: I started developing it because I was getting "bored" of 
instantiating manually all Digester rules, checking XML patterns first, then 
checking bean fields, then writing the rules... and since I was parsing a 
customer client web service response that, in developing time, was changing 
format frequently, I was looking for something that could generate for me 
automatically all Digester rules needed reducing the risk to have "out-of-sync" 
the XML response with my business object... does it justify, in this scenario, 
the presence of such "tool"?

This also to explain that I didn't choice to just add a new feature to an 
already well known component, but rather to share a tool that, at least for me, 
was helpful and alleviated my daily work ... 

Can you provide please an example of builder-like API you mentioned? Do you 
mean (in pseudocode) something like

{code}
Digester digester = new DigesterBuilder()
                                .addObjectCreate("my", MyCustomObject.class)
                                .addRule("my/pattern", new UserCustomRule())
                                .createDigester();
{code}

Btw, we could work together on it if you've the pleasere, just let me know!

[1] http://tinyurl.com/yjgla4h

> Digester rules defined through Java5 Annotatations
> --------------------------------------------------
>
>                 Key: DIGESTER-135
>                 URL: https://issues.apache.org/jira/browse/DIGESTER-135
>             Project: Commons Digester
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Simone Tripodi
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: DigesterAnnotations.patch
>
>
> Taking inspiration by Google-Guice, JAXB and JPA's annotations, the existing 
> package can be extended adding some facilities to configure the 
> commons-digester using the Java language metadata annotations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to