camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton <namlen...@rambler.ru>
Subject XML Support for BinaryPredicate
Date Mon, 05 Nov 2012 11:43:23 GMT
Hi All,
Could anybody tells me - does support for BinaryPredicate exists for routes
to XML marshaling?
Actually I’m trying to save RouteDefinition (here is toString value):
Route[[From[timer://foo?fixedRate=true&period=1000]] ->
[Choice[[When[{property{CamelTimerCounter} <= 3} ->
[To[log:FIRST?showProperties=true]]],
When[simple{${property.CamelTimerCounter} range '4..6'} ->
[Choice[[When[simple{${property.CamelTimerCounter} regex '.*[02468]$'} ->
[To[log:SECOND?showProperties=true]]]]
Otherwise[[To[log:SECOND_OTHER?showProperties=true]]]]]]]
Otherwise[[To[log:FIRST_OTHER?showProperties=true]]]]]]
to XML:
final JAXBContext jaxb =
JAXBContext.newInstance("org.apache.camel.model:org.apache.camel.model”);
        final Marshaller marshaller = jaxb.createMarshaller();
        final RouteDefinition routeDefinition =
routeBuilder.getRouteCollection().getRoutes().get(0);
        marshaller.marshal(routeDefinition, new File("test-route-" +
routeDefinition.getId() + ".xml"));

But get an empty expressionDefinition element for the one that should hold
object for “[{property{CamelTimerCounter} <= 3”. In same time Simple and
predicates were well marshaled.
I had took a look on
org.apache.camel.model.ExpressionNodeHelper#toExpressionDefinition and see
no support for BinaryPredicates. Do I missing something or it is true and
this is no marshaling provided yet for such objects?

I will appreciate your guys for any clarification :)



--
View this message in context: http://camel.465427.n5.nabble.com/XML-Support-for-BinaryPredicate-tp5722137.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message