001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.builder;
018
019import java.util.Map;
020
021import org.apache.camel.Expression;
022import org.apache.camel.builder.xml.Namespaces;
023import org.apache.camel.model.ExpressionNode;
024import org.apache.camel.model.language.ExpressionDefinition;
025
026/**
027 * Represents an expression clause within the DSL which when the expression is
028 * complete the clause continues to another part of the DSL
029 * 
030 * @version 
031 */
032public class ExpressionClause<T> extends ExpressionDefinition {
033    private ExpressionClauseSupport<T> delegate;
034
035    public ExpressionClause(T result) {
036        this.delegate = new ExpressionClauseSupport<T>(result);
037    }
038
039    public static <T extends ExpressionNode> ExpressionClause<T> createAndSetExpression(T result) {
040        ExpressionClause<T> clause = new ExpressionClause<T>(result);
041        result.setExpression(clause);
042        return clause;
043    }
044
045    // Helper expressions
046    // -------------------------------------------------------------------------
047
048    /**
049     * Specify an {@link Expression} instance
050     */
051    public T expression(Expression expression) {
052        return delegate.expression(expression);
053    }
054
055    /**
056     * Specify the constant expression value
057     */
058    public T constant(Object value) {
059        return delegate.constant(value);
060    }
061
062    /**
063     * An expression of the exchange
064     */
065    public T exchange() {
066        return delegate.exchange();
067    }
068
069    /**
070     * An expression of an inbound message
071     */
072    public T inMessage() {
073        return delegate.inMessage();
074    }
075
076    /**
077     * An expression of an inbound message
078     */
079    public T outMessage() {
080        return delegate.outMessage();
081    }
082
083    /**
084     * An expression of an inbound message body
085     */
086    public T body() {
087        return delegate.body();
088    }
089
090    /**
091     * An expression of an inbound message body converted to the expected type
092     */
093    public T body(Class<?> expectedType) {
094        return delegate.body(expectedType);
095    }
096
097    /**
098     * An expression of an outbound message body
099     */
100    public T outBody() {
101        return delegate.outBody();
102    }
103
104    /**
105     * An expression of an outbound message body converted to the expected type
106     */
107    public T outBody(Class<?> expectedType) {
108        return delegate.outBody(expectedType);
109    }
110
111    /**
112     * An expression of an inbound message header of the given name
113     */
114    public T header(String name) {
115        return delegate.header(name);
116    }
117
118    /**
119     * An expression of the inbound headers
120     */
121    public T headers() {
122        return delegate.headers();
123    }
124
125    /**
126     * An expression of an outbound message header of the given name
127     */
128    public T outHeader(String name) {
129        return delegate.outHeader(name);
130    }
131
132    /**
133     * An expression of the outbound headers
134     */
135    public T outHeaders() {
136        return delegate.outHeaders();
137    }
138
139    /**
140     * An expression of the inbound message attachments
141     */
142    public T attachments() {
143        return delegate.attachments();
144    }
145
146    /**
147     * An expression of an exchange property of the given name
148     *
149     * @deprecated use {@link #exchangeProperty(String)} instead
150     */
151    @Deprecated
152    public T property(String name) {
153        return exchangeProperty(name);
154    }
155
156    /**
157     * An expression of an exchange property of the given name
158     */
159    public T exchangeProperty(String name) {
160        return delegate.exchangeProperty(name);
161    }
162
163    /**
164     * An expression of the exchange properties
165     */
166    public T properties() {
167        return delegate.properties();
168    }
169
170    // Languages
171    // -------------------------------------------------------------------------
172
173    /**
174     * Evaluates an expression using the <a
175     * href="http://camel.apache.org/bean-language.html">bean language</a>
176     * which basically means the bean is invoked to determine the expression
177     * value.
178     * 
179     * @param bean the name of the bean looked up the registry
180     * @return the builder to continue processing the DSL
181     */
182    public T method(String bean) {
183        return delegate.method(bean);
184    }
185    
186    /**
187     * Evaluates an expression using the <a
188     * href="http://camel.apache.org/bean-language.html">bean language</a>
189     * which basically means the bean is invoked to determine the expression
190     * value.
191     *
192     * @param instance the instance of the bean
193     * @return the builder to continue processing the DSL
194     */
195    public T method(Object instance) {
196        return delegate.method(instance);
197    }
198
199    /**
200     * Evaluates an expression using the <a
201     * href="http://camel.apache.org/bean-language.html">bean language</a>
202     * which basically means the bean is invoked to determine the expression
203     * value.
204     * 
205     * @param beanType the Class of the bean which we want to invoke
206     * @return the builder to continue processing the DSL
207     */
208    public T method(Class<?> beanType) {
209        return delegate.method(beanType);
210    }
211
212    /**
213     * Evaluates an expression using the <a
214     * href="http://camel.apache.org/bean-language.html">bean language</a>
215     * which basically means the bean is invoked to determine the expression
216     * value.
217     * 
218     * @param bean the name of the bean looked up the registry
219     * @param method the name of the method to invoke on the bean
220     * @return the builder to continue processing the DSL
221     */
222    public T method(String bean, String method) {
223        return delegate.method(bean, method);
224    }
225    
226    /**
227     * Evaluates an expression using the <a
228     * href="http://camel.apache.org/bean-language.html">bean language</a>
229     * which basically means the bean is invoked to determine the expression
230     * value.
231     *
232     * @param instance the instance of the bean
233     * @param method the name of the method to invoke on the bean
234     * @return the builder to continue processing the DSL
235     */
236    public T method(Object instance, String method) {
237        return delegate.method(instance, method);
238    }
239
240    /**
241     * Evaluates an expression using the <a
242     * href="http://camel.apache.org/bean-language.html">bean language</a>
243     * which basically means the bean is invoked to determine the expression
244     * value.
245     * 
246     * @param beanType the Class of the bean which we want to invoke
247     * @param method the name of the method to invoke on the bean
248     * @return the builder to continue processing the DSL
249     */
250    public T method(Class<?> beanType, String method) {
251        return delegate.method(beanType, method);
252    }
253
254    /**
255     * Evaluates the <a href="http://camel.apache.org/el.html">EL
256     * Language from JSP and JSF</a> using the <a
257     * href="http://camel.apache.org/juel.html">JUEL library</a>
258     * 
259     * @param text the expression to be evaluated
260     * @return the builder to continue processing the DSL
261     */
262    public T el(String text) {
263        return delegate.el(text);
264    }
265
266    /**
267     * Evaluates a <a href="http://camel.apache.org/groovy.html">Groovy
268     * expression</a>
269     * 
270     * @param text the expression to be evaluated
271     * @return the builder to continue processing the DSL
272     */
273    public T groovy(String text) {
274        return delegate.groovy(text);
275    }
276
277    /**
278     * Evaluates a <a
279     * href="http://camel.apache.org/java-script.html">JavaScript
280     * expression</a>
281     * 
282     * @param text the expression to be evaluated
283     * @return the builder to continue processing the DSL
284     */
285    public T javaScript(String text) {
286        return delegate.javaScript(text);
287    }
288
289    /**
290     * Evaluates a <a
291     * href="http://camel.apache.org/jsonpath.html">Json Path
292     * expression</a>
293     *
294     * @param text the expression to be evaluated
295     * @return the builder to continue processing the DSL
296     */
297    public T jsonpath(String text) {
298        return delegate.jsonpath(text);
299    }
300
301    /**
302     * Evaluates a <a
303     * href="http://camel.apache.org/jsonpath.html">Json Path
304     * expression</a>
305     *
306     * @param text the expression to be evaluated
307     * @param resultType the return type expected by the expression
308     * @return the builder to continue processing the DSL
309     */
310    public T jsonpath(String text, Class<?> resultType) {
311        return delegate.jsonpath(text, resultType);
312    }
313
314    /**
315     * Evaluates a <a href="http://commons.apache.org/jxpath/">JXPath expression</a>
316     * 
317     * @param text the expression to be evaluated
318     * @return the builder to continue processing the DSL
319     */
320    public T jxpath(String text) {
321        return delegate.jxpath(text);
322    }
323
324    /**
325     * Evaluates a <a href="http://commons.apache.org/jxpath/">JXPath expression</a>
326     *
327     * @param text the expression to be evaluated
328     * @param lenient to configure whether lenient is in use or not
329     * @return the builder to continue processing the DSL
330     */
331    public T jxpath(String text, boolean lenient) {
332        return delegate.jxpath(text, lenient);
333    }
334
335    /**
336     * Evaluates an <a href="http://camel.apache.org/ognl.html">OGNL
337     * expression</a>
338     * 
339     * @param text the expression to be evaluated
340     * @return the builder to continue processing the DSL
341     */
342    public T ognl(String text) {
343        return delegate.ognl(text);
344    }
345
346    /**
347     * Evaluates a <a href="http://camel.apache.org/mvel.html">MVEL
348     * expression</a>
349     *
350     * @param text the expression to be evaluated
351     * @return the builder to continue processing the DSL
352     */
353    public T mvel(String text) {
354        return delegate.mvel(text);
355    }
356
357    /**
358     * Evaluates a <a href="http://camel.apache.org/php.html">PHP
359     * expression</a>
360     * 
361     * @param text the expression to be evaluated
362     * @return the builder to continue processing the DSL
363     */
364    public T php(String text) {
365        return delegate.php(text);
366    }
367
368    /**
369     * Evaluates a <a href="http://camel.apache.org/python.html">Python
370     * expression</a>
371     * 
372     * @param text the expression to be evaluated
373     * @return the builder to continue processing the DSL
374     */
375    public T python(String text) {
376        return delegate.python(text);
377    }
378
379    /**
380     * Evaluates a <a href="http://camel.apache.org/ref-language.html">Ref
381     * expression</a>
382     * 
383     * @param ref refers to the expression to be evaluated
384     * @return the builder to continue processing the DSL
385     */
386    public T ref(String ref) {
387        return delegate.ref(ref);
388    }
389
390    /**
391     * Evaluates a <a href="http://camel.apache.org/ruby.html">Ruby
392     * expression</a>
393     *
394     * @param text the expression to be evaluated
395     * @return the builder to continue processing the DSL
396     */
397    public T ruby(String text) {
398        return delegate.ruby(text);
399    }
400
401    /**
402     * Evaluates an <a href="http://camel.apache.org/sql.html">SQL
403     * expression</a>
404     * 
405     * @param text the expression to be evaluated
406     * @return the builder to continue processing the DSL
407     */
408    public T sql(String text) {
409        return delegate.sql(text);
410    }
411
412    /**
413     * Evaluates a <a href="http://camel.apache.org/spel.html">SpEL
414     * expression</a>
415     * 
416     * @param text the expression to be evaluated
417     * @return the builder to continue processing the DSL
418     */
419    public T spel(String text) {
420        return delegate.spel(text);
421    }
422    
423    /**
424     * Evaluates a <a href="http://camel.apache.org/simple.html">Simple
425     * expression</a>
426     * 
427     * @param text the expression to be evaluated
428     * @return the builder to continue processing the DSL
429     */
430    public T simple(String text) {
431        return delegate.simple(text);
432    }
433
434    /**
435     * Evaluates a <a href="http://camel.apache.org/simple.html">Simple
436     * expression</a>
437     *
438     * @param text the expression to be evaluated
439     * @param resultType the result type
440     * @return the builder to continue processing the DSL
441     */
442    public T simple(String text, Class<?> resultType) {
443        return delegate.simple(text, resultType);
444    }
445
446    /**
447     * Evaluates a token expression on the message body
448     *
449     * @param token the token
450     * @return the builder to continue processing the DSL
451     */
452    public T tokenize(String token) {
453        return delegate.tokenize(token);
454    }
455
456    /**
457     * Evaluates a token expression on the message body
458     *
459     * @param token the token
460     * @param regex whether the token is a regular expression or not
461     * @return the builder to continue processing the DSL
462     */
463    public T tokenize(String token, boolean regex) {
464        return delegate.tokenize(token, regex);
465    }
466
467    /**
468     * Evaluates a token expression on the message body
469     *
470     * @param token the token
471     * @param regex whether the token is a regular expression or not
472     * @param group to group by the given number
473     * @return the builder to continue processing the DSL
474     */
475    public T tokenize(String token, boolean regex, int group) {
476        return delegate.tokenize(token, regex);
477    }
478
479    /**
480     * Evaluates a token expression on the message body
481     *
482     * @param token the token
483     * @param group to group by the given number
484     * @return the builder to continue processing the DSL
485     */
486    public T tokenize(String token, int group) {
487        return delegate.tokenize(token, group);
488    }
489
490    /**
491     * Evaluates a token expression on the given header
492     *
493     * @param token the token
494     * @param headerName name of header to tokenize
495     * @return the builder to continue processing the DSL
496     */
497    public T tokenize(String token, String headerName) {
498        return delegate.tokenize(token, headerName);
499    }
500
501    /**
502     * Evaluates a token expression on the given header
503     *
504     * @param token the token
505     * @param headerName name of header to tokenize
506     * @param regex whether the token is a regular expression or not
507     * @return the builder to continue processing the DSL
508     */
509    public T tokenize(String token, String headerName, boolean regex) {
510        return delegate.tokenize(token, headerName, regex);
511    }
512
513    /**
514     * Evaluates a token pair expression on the message body.
515     * <p/>
516     * Tokens is not included.
517     *
518     * @param startToken the start token
519     * @param endToken   the end token
520     * @return the builder to continue processing the DSL
521     */
522    public T tokenizePair(String startToken, String endToken) {
523        return tokenizePair(startToken, endToken, false);
524    }
525
526    /**
527     * Evaluates a token pair expression on the message body
528     *
529     * @param startToken the start token
530     * @param endToken   the end token
531     * @param includeTokens whether to include tokens
532     * @return the builder to continue processing the DSL
533     */
534    public T tokenizePair(String startToken, String endToken, boolean includeTokens) {
535        return delegate.tokenizePair(startToken, endToken, includeTokens);
536    }
537
538    /**
539     * Evaluates a XML token expression on the message body with XML content
540     *
541     * @param tagName the the tag name of the child nodes to tokenize
542     * @return the builder to continue processing the DSL
543     */
544    public T tokenizeXML(String tagName) {
545        return tokenizeXML(tagName, null);
546    }
547
548    /**
549     * Evaluates a XML token expression on the message body with XML content
550     *
551     * @param tagName the the tag name of the child nodes to tokenize
552     * @param group to group by the given number
553     * @return the builder to continue processing the DSL
554     */
555    public T tokenizeXML(String tagName, int group) {
556        return tokenizeXML(tagName, null, group);
557    }
558
559    /**
560     * Evaluates a token pair expression on the message body with XML content
561     *
562     * @param tagName the the tag name of the child nodes to tokenize
563     * @param inheritNamespaceTagName  parent or root tag name that contains namespace(s) to inherit
564     * @return the builder to continue processing the DSL
565     */
566    public T tokenizeXML(String tagName, String inheritNamespaceTagName) {
567        return tokenizeXML(tagName, inheritNamespaceTagName, 0);
568    }
569
570    /**
571     * Evaluates a token pair expression on the message body with XML content
572     *
573     * @param tagName the the tag name of the child nodes to tokenize
574     * @param inheritNamespaceTagName  parent or root tag name that contains namespace(s) to inherit
575     * @param group to group by the given number
576     * @return the builder to continue processing the DSL
577     */
578    public T tokenizeXML(String tagName, String inheritNamespaceTagName, int group) {
579        return delegate.tokenizeXMLPair(tagName, inheritNamespaceTagName, group);
580    }
581
582    public T xtokenize(String path, Namespaces namespaces) {
583        return xtokenize(path, 'i', namespaces);
584    }
585
586    public T xtokenize(String path, char mode, Namespaces namespaces) {
587        return xtokenize(path, mode, namespaces, 0);
588    }
589
590    public T xtokenize(String path, char mode, Namespaces namespaces, int group) {
591        return delegate.xtokenize(path, mode, namespaces, group);
592    }
593
594    /**
595     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
596     * expression using the VTD-XML library</a>
597     *
598     * @param text the expression to be evaluated
599     * @return the builder to continue processing the DSL
600     */
601    public T vtdxml(String text) {
602        return delegate.vtdxml(text);
603    }
604
605    /**
606     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
607     * expression using the VTD-XML library</a>
608     * with the specified set of namespace prefixes and URIs
609     *
610     * @param text the expression to be evaluated
611     * @param namespaces the namespace prefix and URIs to use
612     * @return the builder to continue processing the DSL
613     */
614    public T vtdxml(String text, Namespaces namespaces) {
615        return delegate.vtdxml(text, namespaces);
616    }
617
618    /**
619     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
620     * expression using the VTD-XML library</a>
621     * with the specified set of namespace prefixes and URIs
622     *
623     * @param text the expression to be evaluated
624     * @param namespaces the namespace prefix and URIs to use
625     * @return the builder to continue processing the DSL
626     */
627    public T vtdxml(String text, Map<String, String> namespaces) {
628        return delegate.vtdxml(text, namespaces);
629    }
630
631    /**
632     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
633     * expression</a>
634     * 
635     * @param text the expression to be evaluated
636     * @return the builder to continue processing the DSL
637     */
638    public T xpath(String text) {
639        return delegate.xpath(text);
640    }
641    
642
643    /**
644     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
645     * expression</a> on the supplied header name's contents
646     * 
647     * @param text the expression to be evaluated
648     * @param headerName the name of the header to apply the expression to
649     * @return the builder to continue processing the DSL
650     */
651    public T xpath(String text, String headerName) {
652        return delegate.xpath(text, headerName);
653    }
654
655    /**
656     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
657     * expression</a> with the specified result type
658     * 
659     * @param text the expression to be evaluated
660     * @param resultType the return type expected by the expression
661     * @return the builder to continue processing the DSL
662     */
663    public T xpath(String text, Class<?> resultType) {
664        return delegate.xpath(text, resultType);
665    }
666    
667    /**
668     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
669     * expression</a> with the specified result type on the supplied
670     * header name's contents
671     * 
672     * @param text the expression to be evaluated
673     * @param resultType the return type expected by the expression
674     * @param headerName the name of the header to apply the expression to
675     * @return the builder to continue processing the DSL
676     */
677    public T xpath(String text, Class<?> resultType, String headerName) {
678        return delegate.xpath(text, resultType, headerName);
679    }
680    
681    /**
682     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
683     * expression</a> with the specified result type and set of namespace
684     * prefixes and URIs
685     * 
686     * @param text the expression to be evaluated
687     * @param resultType the return type expected by the expression
688     * @param namespaces the namespace prefix and URIs to use
689     * @return the builder to continue processing the DSL
690     */
691    public T xpath(String text, Class<?> resultType, Namespaces namespaces) {
692        return delegate.xpath(text, resultType, namespaces);
693    }
694
695    /**
696     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
697     * expression</a> with the specified result type and set of namespace
698     * prefixes and URIs on the supplied header name's contents
699     * 
700     * @param text the expression to be evaluated
701     * @param resultType the return type expected by the expression
702     * @param headerName the name of the header to apply the expression to
703     * @param namespaces the namespace prefix and URIs to use
704     * 
705     * @return the builder to continue processing the DSL
706     */
707    public T xpath(String text, Class<?> resultType, Namespaces namespaces, String headerName) {
708        return delegate.xpath(text, resultType, namespaces, headerName);
709    }
710    
711    /**
712     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
713     * expression</a> with the specified result type and set of namespace
714     * prefixes and URIs
715     * 
716     * @param text the expression to be evaluated
717     * @param resultType the return type expected by the expression
718     * @param namespaces the namespace prefix and URIs to use
719     * @return the builder to continue processing the DSL
720     */
721    public T xpath(String text, Class<?> resultType, Map<String, String> namespaces) {
722        return delegate.xpath(text, resultType, namespaces);
723    }
724
725    /**
726     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
727     * expression</a> with the specified set of namespace prefixes and URIs
728     * 
729     * @param text the expression to be evaluated
730     * @param namespaces the namespace prefix and URIs to use
731     * @return the builder to continue processing the DSL
732     */
733    public T xpath(String text, Namespaces namespaces) {
734        return delegate.xpath(text, namespaces);
735    }
736
737    /**
738     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
739     * expression</a> with the specified set of namespace prefixes and URIs
740     * 
741     * @param text the expression to be evaluated
742     * @param namespaces the namespace prefix and URIs to use
743     * @return the builder to continue processing the DSL
744     */
745    public T xpath(String text, Map<String, String> namespaces) {
746        return delegate.xpath(text, namespaces);
747    }
748
749    /**
750     * Evaluates an <a
751     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
752     * 
753     * @param text the expression to be evaluated
754     * @return the builder to continue processing the DSL
755     */
756    public T xquery(String text) {
757        return delegate.xquery(text);
758    }
759    
760    /**
761     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
762     * expression</a> on the supplied header name's contents
763     * 
764     * @param text the expression to be evaluated
765     * @param headerName the name of the header to apply the expression to
766     * @return the builder to continue processing the DSL
767     */
768    public T xquery(String text, String headerName) {
769        return delegate.xquery(text, headerName);
770    }
771
772
773    /**
774     * Evaluates an <a
775     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
776     * with the specified result type
777     * 
778     * @param text the expression to be evaluated
779     * @param resultType the return type expected by the expression
780     * @return the builder to continue processing the DSL
781     */
782    public T xquery(String text, Class<?> resultType) {
783        return delegate.xquery(text, resultType);
784    }
785    
786    /**
787     * Evaluates an <a
788     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
789     * with the specified result type
790     * 
791     * @param text the expression to be evaluated
792     * @param resultType the return type expected by the expression
793     * @param headerName the name of the header to apply the expression to
794     * @return the builder to continue processing the DSL
795     */
796    public T xquery(String text, Class<?> resultType, String headerName) {
797        return delegate.xquery(text, resultType, headerName);
798    }
799    
800    /**
801     * Evaluates an <a
802     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
803     * with the specified result type and set of namespace prefixes and URIs
804     * 
805     * @param text the expression to be evaluated
806     * @param resultType the return type expected by the expression
807     * @param namespaces the namespace prefix and URIs to use
808     * @return the builder to continue processing the DSL
809     */
810    public T xquery(String text, Class<?> resultType, Namespaces namespaces) {
811        return delegate.xquery(text, resultType, namespaces);
812    }
813    
814    /**
815     * Evaluates an <a
816     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
817     * with the specified result type
818     * 
819     * @param text the expression to be evaluated
820     * @param resultType the return type expected by the expression
821     * @param headerName the name of the header to apply the expression to
822     * @param namespaces the namespace prefix and URIs to use
823     * 
824     * @return the builder to continue processing the DSL
825     */
826    public T xquery(String text, Class<?> resultType, Namespaces namespaces, String headerName) {
827        return delegate.xquery(text, resultType, namespaces, headerName);
828    }
829    /**
830     * Evaluates an <a
831     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
832     * with the specified result type and set of namespace prefixes and URIs
833     * 
834     * @param text the expression to be evaluated
835     * @param resultType the return type expected by the expression
836     * @param namespaces the namespace prefix and URIs to use
837     * @return the builder to continue processing the DSL
838     */
839    public T xquery(String text, Class<?> resultType, Map<String, String> namespaces) {
840        return delegate.xquery(text, resultType, namespaces);
841    }
842
843    /**
844     * Evaluates an <a
845     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
846     * with the specified set of namespace prefixes and URIs
847     * 
848     * @param text the expression to be evaluated
849     * @param namespaces the namespace prefix and URIs to use
850     * @return the builder to continue processing the DSL
851     */
852    public T xquery(String text, Namespaces namespaces) {
853        return delegate.xquery(text, namespaces);
854    }
855
856    /**
857     * Evaluates an <a
858     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
859     * with the specified set of namespace prefixes and URIs
860     * 
861     * @param text the expression to be evaluated
862     * @param namespaces the namespace prefix and URIs to use
863     * @return the builder to continue processing the DSL
864     */
865    public T xquery(String text, Map<String, String> namespaces) {
866        return delegate.xquery(text, namespaces);
867    }
868
869    /**
870     * Evaluates a given language name with the expression text
871     * 
872     * @param language the name of the language
873     * @param expression the expression in the given language
874     * @return the builder to continue processing the DSL
875     */
876    public T language(String language, String expression) {
877        return delegate.language(language, expression);
878    }
879
880    // Properties
881    // -------------------------------------------------------------------------
882
883    @Override
884    public Expression getExpressionValue() {
885        return delegate.getExpressionValue();
886    }
887
888    @Override
889    protected void setExpressionValue(Expression expressionValue) {
890        delegate.setExpressionValue(expressionValue);
891    }
892
893    @Override
894    public ExpressionDefinition getExpressionType() {
895        return delegate.getExpressionType();
896    }
897
898    @Override
899    protected void setExpressionType(ExpressionDefinition expressionType) {
900        delegate.setExpressionType(expressionType);
901    }
902}