You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Robert Burrell Donkin <ro...@gmail.com> on 2008/12/04 22:29:39 UTC

[sieve] Node serializer [WAS Re: [jira] Commented: (JSIEVE-43) Add API for generating a Sieve script from a parse tree]

the basic design outlined below should be simple and quick to
implement. please feel free to jump in with questions, comments or
improvements.

i was wondering whether this output stuff would be a better match for
the util module than the main jSieve library

opinions?

- robert

On Thu, Dec 4, 2008 at 9:26 PM, Robert Burrell Donkin (JIRA)
<se...@james.apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/JSIEVE-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653491#action_12653491 ]
>
> Robert Burrell Donkin commented on JSIEVE-43:
> ---------------------------------------------
>
> Had a little think about design. Would like to be flexible enough to support various output pipelines: should be able to write out a Sieve script or xml.
>
> Implementing SieveParserVisitor seems like the best place to start. This visitor is designed to perform it's own tree recursion which suits well.
>
> The classic first stage of the pipeline is to turn the tree recursion into a linear series of start and end events. For flexibility, these should be node based. This will end up a rather large API with each start and end calls for each concrete node type.
>
> This would probably be enough to plugin custom output to strings including basic XML rendering. More stages in the pipeline would be required for more sophisticated such as XML pipelining.
>
> On balance should be very do-able.
>
>> Add API for generating a Sieve script from a parse tree
>> --------------------------------------------------------
>>
>>                 Key: JSIEVE-43
>>                 URL: https://issues.apache.org/jira/browse/JSIEVE-43
>>             Project: JAMES jSieve
>>          Issue Type: New Feature
>>    Affects Versions: 0.2, 0.3, 1.0
>>            Reporter: Boris Burtin
>>
>> There's currently no way to generate a Sieve script from a jSieve Node tree.  This would be very helpful for cases where you need to parse a script, modify some nodes, and then generate a new script that incorporates the changes.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: [sieve] Node serializer [WAS Re: [jira] Commented: (JSIEVE-43) Add API for generating a Sieve script from a parse tree]

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, Dec 8, 2008 at 8:01 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>> the basic design outlined below should be simple and quick to
>> implement. please feel free to jump in with questions, comments or
>> improvements.
>
> "This will end up a rather large API with each start and end calls for
> each concrete node type."
>
> What are the node types involved?
>
>> i was wondering whether this output stuff would be a better match for
>> the util module than the main jSieve library
>>
>> opinions?
>
> It will need some time/code change to get a shape :-)

started working in
http://svn.apache.org/repos/asf/james/jsieve/trunk/util/src/main/java/org/apache/jsieve/util/

- robert

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


Re: [sieve] Node serializer [WAS Re: [jira] Commented: (JSIEVE-43) Add API for generating a Sieve script from a parse tree]

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> the basic design outlined below should be simple and quick to
> implement. please feel free to jump in with questions, comments or
> improvements.

"This will end up a rather large API with each start and end calls for
each concrete node type."

What are the node types involved?

> i was wondering whether this output stuff would be a better match for
> the util module than the main jSieve library
> 
> opinions?

It will need some time/code change to get a shape :-)

Stefano


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