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 suppressExceptions whether to suppress exceptions such as PathNotFoundException
308     * @return the builder to continue processing the DSL
309     */
310    public T jsonpath(String text, boolean suppressExceptions) {
311        return delegate.jsonpath(text, suppressExceptions);
312    }
313
314    /**
315     * Evaluates a <a
316     * href="http://camel.apache.org/jsonpath.html">Json Path
317     * expression</a>
318     *
319     * @param text the expression to be evaluated
320     * @param resultType the return type expected by the expression
321     * @return the builder to continue processing the DSL
322     */
323    public T jsonpath(String text, Class<?> resultType) {
324        return delegate.jsonpath(text, resultType);
325    }
326
327    /**
328     * Evaluates a <a
329     * href="http://camel.apache.org/jsonpath.html">Json Path
330     * expression</a>
331     *
332     * @param text the expression to be evaluated
333     * @param suppressExceptions whether to suppress exceptions such as PathNotFoundException
334     * @param resultType the return type expected by the expression
335     * @return the builder to continue processing the DSL
336     */
337    public T jsonpath(String text, boolean suppressExceptions, Class<?> resultType) {
338        return delegate.jsonpath(text, suppressExceptions, resultType);
339    }
340
341    /**
342     * Evaluates a <a href="http://commons.apache.org/jxpath/">JXPath expression</a>
343     * 
344     * @param text the expression to be evaluated
345     * @return the builder to continue processing the DSL
346     */
347    public T jxpath(String text) {
348        return delegate.jxpath(text);
349    }
350
351    /**
352     * Evaluates a <a href="http://commons.apache.org/jxpath/">JXPath expression</a>
353     *
354     * @param text the expression to be evaluated
355     * @param lenient to configure whether lenient is in use or not
356     * @return the builder to continue processing the DSL
357     */
358    public T jxpath(String text, boolean lenient) {
359        return delegate.jxpath(text, lenient);
360    }
361
362    /**
363     * Evaluates an <a href="http://camel.apache.org/ognl.html">OGNL
364     * expression</a>
365     * 
366     * @param text the expression to be evaluated
367     * @return the builder to continue processing the DSL
368     */
369    public T ognl(String text) {
370        return delegate.ognl(text);
371    }
372
373    /**
374     * Evaluates a <a href="http://camel.apache.org/mvel.html">MVEL
375     * expression</a>
376     *
377     * @param text the expression to be evaluated
378     * @return the builder to continue processing the DSL
379     */
380    public T mvel(String text) {
381        return delegate.mvel(text);
382    }
383
384    /**
385     * Evaluates a <a href="http://camel.apache.org/php.html">PHP
386     * expression</a>
387     * 
388     * @param text the expression to be evaluated
389     * @return the builder to continue processing the DSL
390     */
391    public T php(String text) {
392        return delegate.php(text);
393    }
394
395    /**
396     * Evaluates a <a href="http://camel.apache.org/python.html">Python
397     * expression</a>
398     * 
399     * @param text the expression to be evaluated
400     * @return the builder to continue processing the DSL
401     */
402    public T python(String text) {
403        return delegate.python(text);
404    }
405
406    /**
407     * Evaluates a <a href="http://camel.apache.org/ref-language.html">Ref
408     * expression</a>
409     * 
410     * @param ref refers to the expression to be evaluated
411     * @return the builder to continue processing the DSL
412     */
413    public T ref(String ref) {
414        return delegate.ref(ref);
415    }
416
417    /**
418     * Evaluates a <a href="http://camel.apache.org/ruby.html">Ruby
419     * expression</a>
420     *
421     * @param text the expression to be evaluated
422     * @return the builder to continue processing the DSL
423     */
424    public T ruby(String text) {
425        return delegate.ruby(text);
426    }
427
428    /**
429     * Evaluates an <a href="http://camel.apache.org/sql.html">SQL
430     * expression</a>
431     * 
432     * @param text the expression to be evaluated
433     * @return the builder to continue processing the DSL
434     */
435    public T sql(String text) {
436        return delegate.sql(text);
437    }
438
439    /**
440     * Evaluates a <a href="http://camel.apache.org/spel.html">SpEL
441     * expression</a>
442     * 
443     * @param text the expression to be evaluated
444     * @return the builder to continue processing the DSL
445     */
446    public T spel(String text) {
447        return delegate.spel(text);
448    }
449    
450    /**
451     * Evaluates a <a href="http://camel.apache.org/simple.html">Simple
452     * expression</a>
453     * 
454     * @param text the expression to be evaluated
455     * @return the builder to continue processing the DSL
456     */
457    public T simple(String text) {
458        return delegate.simple(text);
459    }
460
461    /**
462     * Evaluates a <a href="http://camel.apache.org/simple.html">Simple
463     * expression</a>
464     *
465     * @param text the expression to be evaluated
466     * @param resultType the result type
467     * @return the builder to continue processing the DSL
468     */
469    public T simple(String text, Class<?> resultType) {
470        return delegate.simple(text, resultType);
471    }
472
473    /**
474     * Evaluates a token expression on the message body
475     *
476     * @param token the token
477     * @return the builder to continue processing the DSL
478     */
479    public T tokenize(String token) {
480        return delegate.tokenize(token);
481    }
482
483    /**
484     * Evaluates a token expression on the message body
485     *
486     * @param token the token
487     * @param regex whether the token is a regular expression or not
488     * @return the builder to continue processing the DSL
489     */
490    public T tokenize(String token, boolean regex) {
491        return delegate.tokenize(token, regex);
492    }
493
494    /**
495     * Evaluates a token expression on the message body
496     *
497     * @param token the token
498     * @param regex whether the token is a regular expression or not
499     * @param group to group by the given number
500     * @return the builder to continue processing the DSL
501     */
502    public T tokenize(String token, boolean regex, int group) {
503        return delegate.tokenize(token, regex, group);
504    }
505
506    /**
507     * Evaluates a token expression on the message body
508     *
509     * @param token the token
510     * @param group to group by the given number
511     * @return the builder to continue processing the DSL
512     */
513    public T tokenize(String token, int group) {
514        return delegate.tokenize(token, group);
515    }
516
517    /**
518     * Evaluates a token expression on the given header
519     *
520     * @param token the token
521     * @param headerName name of header to tokenize
522     * @return the builder to continue processing the DSL
523     */
524    public T tokenize(String token, String headerName) {
525        return delegate.tokenize(token, headerName);
526    }
527
528    /**
529     * Evaluates a token expression on the given header
530     *
531     * @param token the token
532     * @param headerName name of header to tokenize
533     * @param regex whether the token is a regular expression or not
534     * @return the builder to continue processing the DSL
535     */
536    public T tokenize(String token, String headerName, boolean regex) {
537        return delegate.tokenize(token, headerName, regex);
538    }
539
540    /**
541     * Evaluates a token pair expression on the message body.
542     * <p/>
543     * Tokens is not included.
544     *
545     * @param startToken the start token
546     * @param endToken   the end token
547     * @return the builder to continue processing the DSL
548     */
549    public T tokenizePair(String startToken, String endToken) {
550        return tokenizePair(startToken, endToken, false);
551    }
552
553    /**
554     * Evaluates a token pair expression on the message body
555     *
556     * @param startToken the start token
557     * @param endToken   the end token
558     * @param includeTokens whether to include tokens
559     * @return the builder to continue processing the DSL
560     */
561    public T tokenizePair(String startToken, String endToken, boolean includeTokens) {
562        return delegate.tokenizePair(startToken, endToken, includeTokens);
563    }
564
565    /**
566     * Evaluates a XML token expression on the message body with XML content
567     *
568     * @param tagName the the tag name of the child nodes to tokenize
569     * @return the builder to continue processing the DSL
570     */
571    public T tokenizeXML(String tagName) {
572        return tokenizeXML(tagName, null);
573    }
574
575    /**
576     * Evaluates a XML token expression on the message body with XML content
577     *
578     * @param tagName the the tag name of the child nodes to tokenize
579     * @param group to group by the given number
580     * @return the builder to continue processing the DSL
581     */
582    public T tokenizeXML(String tagName, int group) {
583        return tokenizeXML(tagName, null, group);
584    }
585
586    /**
587     * Evaluates a token pair expression on the message body with XML content
588     *
589     * @param tagName the the tag name of the child nodes to tokenize
590     * @param inheritNamespaceTagName  parent or root tag name that contains namespace(s) to inherit
591     * @return the builder to continue processing the DSL
592     */
593    public T tokenizeXML(String tagName, String inheritNamespaceTagName) {
594        return tokenizeXML(tagName, inheritNamespaceTagName, 0);
595    }
596
597    /**
598     * Evaluates a token pair expression on the message body with XML content
599     *
600     * @param tagName the the tag name of the child nodes to tokenize
601     * @param inheritNamespaceTagName  parent or root tag name that contains namespace(s) to inherit
602     * @param group to group by the given number
603     * @return the builder to continue processing the DSL
604     */
605    public T tokenizeXML(String tagName, String inheritNamespaceTagName, int group) {
606        return delegate.tokenizeXMLPair(tagName, inheritNamespaceTagName, group);
607    }
608
609    public T xtokenize(String path, Namespaces namespaces) {
610        return xtokenize(path, 'i', namespaces);
611    }
612
613    public T xtokenize(String path, char mode, Namespaces namespaces) {
614        return xtokenize(path, mode, namespaces, 0);
615    }
616
617    public T xtokenize(String path, char mode, Namespaces namespaces, int group) {
618        return delegate.xtokenize(path, mode, namespaces, group);
619    }
620
621    /**
622     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
623     * expression using the VTD-XML library</a>
624     *
625     * @param text the expression to be evaluated
626     * @return the builder to continue processing the DSL
627     */
628    public T vtdxml(String text) {
629        return delegate.vtdxml(text);
630    }
631
632    /**
633     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
634     * expression using the VTD-XML library</a>
635     * with the specified set of namespace prefixes and URIs
636     *
637     * @param text the expression to be evaluated
638     * @param namespaces the namespace prefix and URIs to use
639     * @return the builder to continue processing the DSL
640     */
641    public T vtdxml(String text, Namespaces namespaces) {
642        return delegate.vtdxml(text, namespaces);
643    }
644
645    /**
646     * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath
647     * expression using the VTD-XML library</a>
648     * with the specified set of namespace prefixes and URIs
649     *
650     * @param text the expression to be evaluated
651     * @param namespaces the namespace prefix and URIs to use
652     * @return the builder to continue processing the DSL
653     */
654    public T vtdxml(String text, Map<String, String> namespaces) {
655        return delegate.vtdxml(text, namespaces);
656    }
657
658    /**
659     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
660     * expression</a>
661     * 
662     * @param text the expression to be evaluated
663     * @return the builder to continue processing the DSL
664     */
665    public T xpath(String text) {
666        return delegate.xpath(text);
667    }
668    
669
670    /**
671     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
672     * expression</a> on the supplied header name's contents
673     * 
674     * @param text the expression to be evaluated
675     * @param headerName the name of the header to apply the expression to
676     * @return the builder to continue processing the DSL
677     */
678    public T xpath(String text, String headerName) {
679        return delegate.xpath(text, headerName);
680    }
681
682    /**
683     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
684     * expression</a> with the specified result type
685     * 
686     * @param text the expression to be evaluated
687     * @param resultType the return type expected by the expression
688     * @return the builder to continue processing the DSL
689     */
690    public T xpath(String text, Class<?> resultType) {
691        return delegate.xpath(text, resultType);
692    }
693    
694    /**
695     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
696     * expression</a> with the specified result type on the supplied
697     * header name's contents
698     * 
699     * @param text the expression to be evaluated
700     * @param resultType the return type expected by the expression
701     * @param headerName the name of the header to apply the expression to
702     * @return the builder to continue processing the DSL
703     */
704    public T xpath(String text, Class<?> resultType, String headerName) {
705        return delegate.xpath(text, resultType, headerName);
706    }
707    
708    /**
709     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
710     * expression</a> with the specified result type and set of namespace
711     * prefixes and URIs
712     * 
713     * @param text the expression to be evaluated
714     * @param resultType the return type expected by the expression
715     * @param namespaces the namespace prefix and URIs to use
716     * @return the builder to continue processing the DSL
717     */
718    public T xpath(String text, Class<?> resultType, Namespaces namespaces) {
719        return delegate.xpath(text, resultType, namespaces);
720    }
721
722    /**
723     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
724     * expression</a> with the specified result type and set of namespace
725     * prefixes and URIs on the supplied header name's contents
726     * 
727     * @param text the expression to be evaluated
728     * @param resultType the return type expected by the expression
729     * @param headerName the name of the header to apply the expression to
730     * @param namespaces the namespace prefix and URIs to use
731     * 
732     * @return the builder to continue processing the DSL
733     */
734    public T xpath(String text, Class<?> resultType, Namespaces namespaces, String headerName) {
735        return delegate.xpath(text, resultType, namespaces, headerName);
736    }
737    
738    /**
739     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
740     * expression</a> with the specified result type and set of namespace
741     * prefixes and URIs
742     * 
743     * @param text the expression to be evaluated
744     * @param resultType the return type expected by the expression
745     * @param namespaces the namespace prefix and URIs to use
746     * @return the builder to continue processing the DSL
747     */
748    public T xpath(String text, Class<?> resultType, Map<String, String> namespaces) {
749        return delegate.xpath(text, resultType, namespaces);
750    }
751
752    /**
753     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
754     * expression</a> with the specified set of namespace prefixes and URIs
755     * 
756     * @param text the expression to be evaluated
757     * @param namespaces the namespace prefix and URIs to use
758     * @return the builder to continue processing the DSL
759     */
760    public T xpath(String text, Namespaces namespaces) {
761        return delegate.xpath(text, namespaces);
762    }
763
764    /**
765     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
766     * expression</a> with the specified set of namespace prefixes and URIs
767     * 
768     * @param text the expression to be evaluated
769     * @param namespaces the namespace prefix and URIs to use
770     * @return the builder to continue processing the DSL
771     */
772    public T xpath(String text, Map<String, String> namespaces) {
773        return delegate.xpath(text, namespaces);
774    }
775
776    /**
777     * Evaluates an <a
778     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
779     * 
780     * @param text the expression to be evaluated
781     * @return the builder to continue processing the DSL
782     */
783    public T xquery(String text) {
784        return delegate.xquery(text);
785    }
786    
787    /**
788     * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath
789     * expression</a> on the supplied header name's contents
790     * 
791     * @param text the expression to be evaluated
792     * @param headerName the name of the header to apply the expression to
793     * @return the builder to continue processing the DSL
794     */
795    public T xquery(String text, String headerName) {
796        return delegate.xquery(text, headerName);
797    }
798
799
800    /**
801     * Evaluates an <a
802     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
803     * with the specified result type
804     * 
805     * @param text the expression to be evaluated
806     * @param resultType the return type expected by the expression
807     * @return the builder to continue processing the DSL
808     */
809    public T xquery(String text, Class<?> resultType) {
810        return delegate.xquery(text, resultType);
811    }
812    
813    /**
814     * Evaluates an <a
815     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
816     * with the specified result type
817     * 
818     * @param text the expression to be evaluated
819     * @param resultType the return type expected by the expression
820     * @param headerName the name of the header to apply the expression to
821     * @return the builder to continue processing the DSL
822     */
823    public T xquery(String text, Class<?> resultType, String headerName) {
824        return delegate.xquery(text, resultType, headerName);
825    }
826    
827    /**
828     * Evaluates an <a
829     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
830     * with the specified result type and set of namespace prefixes and URIs
831     * 
832     * @param text the expression to be evaluated
833     * @param resultType the return type expected by the expression
834     * @param namespaces the namespace prefix and URIs to use
835     * @return the builder to continue processing the DSL
836     */
837    public T xquery(String text, Class<?> resultType, Namespaces namespaces) {
838        return delegate.xquery(text, resultType, namespaces);
839    }
840    
841    /**
842     * Evaluates an <a
843     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
844     * with the specified result type
845     * 
846     * @param text the expression to be evaluated
847     * @param resultType the return type expected by the expression
848     * @param headerName the name of the header to apply the expression to
849     * @param namespaces the namespace prefix and URIs to use
850     * 
851     * @return the builder to continue processing the DSL
852     */
853    public T xquery(String text, Class<?> resultType, Namespaces namespaces, String headerName) {
854        return delegate.xquery(text, resultType, namespaces, headerName);
855    }
856    /**
857     * Evaluates an <a
858     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
859     * with the specified result type and set of namespace prefixes and URIs
860     * 
861     * @param text the expression to be evaluated
862     * @param resultType the return type expected by the expression
863     * @param namespaces the namespace prefix and URIs to use
864     * @return the builder to continue processing the DSL
865     */
866    public T xquery(String text, Class<?> resultType, Map<String, String> namespaces) {
867        return delegate.xquery(text, resultType, namespaces);
868    }
869
870    /**
871     * Evaluates an <a
872     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
873     * with the specified set of namespace prefixes and URIs
874     * 
875     * @param text the expression to be evaluated
876     * @param namespaces the namespace prefix and URIs to use
877     * @return the builder to continue processing the DSL
878     */
879    public T xquery(String text, Namespaces namespaces) {
880        return delegate.xquery(text, namespaces);
881    }
882
883    /**
884     * Evaluates an <a
885     * href="http://camel.apache.org/xquery.html">XQuery expression</a>
886     * with the specified set of namespace prefixes and URIs
887     * 
888     * @param text the expression to be evaluated
889     * @param namespaces the namespace prefix and URIs to use
890     * @return the builder to continue processing the DSL
891     */
892    public T xquery(String text, Map<String, String> namespaces) {
893        return delegate.xquery(text, namespaces);
894    }
895
896    /**
897     * Evaluates a given language name with the expression text
898     * 
899     * @param language the name of the language
900     * @param expression the expression in the given language
901     * @return the builder to continue processing the DSL
902     */
903    public T language(String language, String expression) {
904        return delegate.language(language, expression);
905    }
906
907    // Properties
908    // -------------------------------------------------------------------------
909
910    @Override
911    public Expression getExpressionValue() {
912        return delegate.getExpressionValue();
913    }
914
915    @Override
916    protected void setExpressionValue(Expression expressionValue) {
917        delegate.setExpressionValue(expressionValue);
918    }
919
920    @Override
921    public ExpressionDefinition getExpressionType() {
922        return delegate.getExpressionType();
923    }
924
925    @Override
926    protected void setExpressionType(ExpressionDefinition expressionType) {
927        delegate.setExpressionType(expressionType);
928    }
929}