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 tokenize(token, regex, false); 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 skipFirst whether to skip the first element 500 * @return the builder to continue processing the DSL 501 */ 502 public T tokenize(String token, boolean regex, boolean skipFirst) { 503 return delegate.tokenize(token, null, regex, skipFirst); 504 } 505 506 /** 507 * Evaluates a token expression on the message body 508 * 509 * @param token the token 510 * @param regex whether the token is a regular expression or not 511 * @param group to group by the given number 512 * @return the builder to continue processing the DSL 513 */ 514 public T tokenize(String token, boolean regex, int group) { 515 return tokenize(token, regex, group, false); 516 } 517 518 /** 519 * Evaluates a token expression on the message body 520 * 521 * @param token the token 522 * @param regex whether the token is a regular expression or not 523 * @param group to group by the given number 524 * @param skipFirst whether to skip the first element 525 * @return the builder to continue processing the DSL 526 */ 527 public T tokenize(String token, boolean regex, int group, boolean skipFirst) { 528 return delegate.tokenize(token, null, regex, group, skipFirst); 529 } 530 531 /** 532 * Evaluates a token expression on the message body 533 * 534 * @param token the token 535 * @param group to group by the given number 536 * @return the builder to continue processing the DSL 537 */ 538 public T tokenize(String token, int group) { 539 return delegate.tokenize(token, group); 540 } 541 542 /** 543 * Evaluates a token expression on the message body 544 * 545 * @param token the token 546 * @param group to group by the given number 547 * @param skipFirst whether to skip the first element 548 * @return the builder to continue processing the DSL 549 */ 550 public T tokenize(String token, int group, boolean skipFirst) { 551 return delegate.tokenize(token, group, skipFirst); 552 } 553 554 /** 555 * Evaluates a token expression on the given header 556 * 557 * @param token the token 558 * @param headerName name of header to tokenize 559 * @return the builder to continue processing the DSL 560 */ 561 public T tokenize(String token, String headerName) { 562 return delegate.tokenize(token, headerName); 563 } 564 565 /** 566 * Evaluates a token expression on the given header 567 * 568 * @param token the token 569 * @param headerName name of header to tokenize 570 * @param regex whether the token is a regular expression or not 571 * @return the builder to continue processing the DSL 572 */ 573 public T tokenize(String token, String headerName, boolean regex) { 574 return delegate.tokenize(token, headerName, regex); 575 } 576 577 /** 578 * Evaluates a token pair expression on the message body. 579 * <p/> 580 * Tokens is not included. 581 * 582 * @param startToken the start token 583 * @param endToken the end token 584 * @return the builder to continue processing the DSL 585 */ 586 public T tokenizePair(String startToken, String endToken) { 587 return tokenizePair(startToken, endToken, false); 588 } 589 590 /** 591 * Evaluates a token pair expression on the message body 592 * 593 * @param startToken the start token 594 * @param endToken the end token 595 * @param includeTokens whether to include tokens 596 * @return the builder to continue processing the DSL 597 */ 598 public T tokenizePair(String startToken, String endToken, boolean includeTokens) { 599 return delegate.tokenizePair(startToken, endToken, includeTokens); 600 } 601 602 /** 603 * Evaluates a XML token expression on the message body with XML content 604 * 605 * @param tagName the the tag name of the child nodes to tokenize 606 * @return the builder to continue processing the DSL 607 */ 608 public T tokenizeXML(String tagName) { 609 return tokenizeXML(tagName, null); 610 } 611 612 /** 613 * Evaluates a XML token expression on the message body with XML content 614 * 615 * @param tagName the the tag name of the child nodes to tokenize 616 * @param group to group by the given number 617 * @return the builder to continue processing the DSL 618 */ 619 public T tokenizeXML(String tagName, int group) { 620 return tokenizeXML(tagName, null, group); 621 } 622 623 /** 624 * Evaluates a token pair expression on the message body with XML content 625 * 626 * @param tagName the the tag name of the child nodes to tokenize 627 * @param inheritNamespaceTagName parent or root tag name that contains namespace(s) to inherit 628 * @return the builder to continue processing the DSL 629 */ 630 public T tokenizeXML(String tagName, String inheritNamespaceTagName) { 631 return tokenizeXML(tagName, inheritNamespaceTagName, 0); 632 } 633 634 /** 635 * Evaluates a token pair expression on the message body with XML content 636 * 637 * @param tagName the the tag name of the child nodes to tokenize 638 * @param inheritNamespaceTagName parent or root tag name that contains namespace(s) to inherit 639 * @param group to group by the given number 640 * @return the builder to continue processing the DSL 641 */ 642 public T tokenizeXML(String tagName, String inheritNamespaceTagName, int group) { 643 return delegate.tokenizeXMLPair(tagName, inheritNamespaceTagName, group); 644 } 645 646 public T xtokenize(String path, Namespaces namespaces) { 647 return xtokenize(path, 'i', namespaces); 648 } 649 650 public T xtokenize(String path, char mode, Namespaces namespaces) { 651 return xtokenize(path, mode, namespaces, 0); 652 } 653 654 public T xtokenize(String path, char mode, Namespaces namespaces, int group) { 655 return delegate.xtokenize(path, mode, namespaces, group); 656 } 657 658 /** 659 * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath 660 * expression using the VTD-XML library</a> 661 * 662 * @param text the expression to be evaluated 663 * @return the builder to continue processing the DSL 664 */ 665 public T vtdxml(String text) { 666 return delegate.vtdxml(text); 667 } 668 669 /** 670 * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath 671 * expression using the VTD-XML library</a> 672 * with the specified set of namespace prefixes and URIs 673 * 674 * @param text the expression to be evaluated 675 * @param namespaces the namespace prefix and URIs to use 676 * @return the builder to continue processing the DSL 677 */ 678 public T vtdxml(String text, Namespaces namespaces) { 679 return delegate.vtdxml(text, namespaces); 680 } 681 682 /** 683 * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath 684 * expression using the VTD-XML library</a> 685 * with the specified set of namespace prefixes and URIs 686 * 687 * @param text the expression to be evaluated 688 * @param namespaces the namespace prefix and URIs to use 689 * @return the builder to continue processing the DSL 690 */ 691 public T vtdxml(String text, Map<String, String> namespaces) { 692 return delegate.vtdxml(text, namespaces); 693 } 694 695 /** 696 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 697 * expression</a> 698 * 699 * @param text the expression to be evaluated 700 * @return the builder to continue processing the DSL 701 */ 702 public T xpath(String text) { 703 return delegate.xpath(text); 704 } 705 706 707 /** 708 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 709 * expression</a> on the supplied header name's contents 710 * 711 * @param text the expression to be evaluated 712 * @param headerName the name of the header to apply the expression to 713 * @return the builder to continue processing the DSL 714 */ 715 public T xpath(String text, String headerName) { 716 return delegate.xpath(text, headerName); 717 } 718 719 /** 720 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 721 * expression</a> with the specified result type 722 * 723 * @param text the expression to be evaluated 724 * @param resultType the return type expected by the expression 725 * @return the builder to continue processing the DSL 726 */ 727 public T xpath(String text, Class<?> resultType) { 728 return delegate.xpath(text, resultType); 729 } 730 731 /** 732 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 733 * expression</a> with the specified result type on the supplied 734 * header name's contents 735 * 736 * @param text the expression to be evaluated 737 * @param resultType the return type expected by the expression 738 * @param headerName the name of the header to apply the expression to 739 * @return the builder to continue processing the DSL 740 */ 741 public T xpath(String text, Class<?> resultType, String headerName) { 742 return delegate.xpath(text, resultType, headerName); 743 } 744 745 /** 746 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 747 * expression</a> with the specified result type and set of namespace 748 * prefixes and URIs 749 * 750 * @param text the expression to be evaluated 751 * @param resultType the return type expected by the expression 752 * @param namespaces the namespace prefix and URIs to use 753 * @return the builder to continue processing the DSL 754 */ 755 public T xpath(String text, Class<?> resultType, Namespaces namespaces) { 756 return delegate.xpath(text, resultType, namespaces); 757 } 758 759 /** 760 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 761 * expression</a> with the specified result type and set of namespace 762 * prefixes and URIs on the supplied header name's contents 763 * 764 * @param text the expression to be evaluated 765 * @param resultType the return type expected by the expression 766 * @param headerName the name of the header to apply the expression to 767 * @param namespaces the namespace prefix and URIs to use 768 * 769 * @return the builder to continue processing the DSL 770 */ 771 public T xpath(String text, Class<?> resultType, Namespaces namespaces, String headerName) { 772 return delegate.xpath(text, resultType, namespaces, headerName); 773 } 774 775 /** 776 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 777 * expression</a> with the specified result type and set of namespace 778 * prefixes and URIs 779 * 780 * @param text the expression to be evaluated 781 * @param resultType the return type expected by the expression 782 * @param namespaces the namespace prefix and URIs to use 783 * @return the builder to continue processing the DSL 784 */ 785 public T xpath(String text, Class<?> resultType, Map<String, String> namespaces) { 786 return delegate.xpath(text, resultType, namespaces); 787 } 788 789 /** 790 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 791 * expression</a> with the specified set of namespace prefixes and URIs 792 * 793 * @param text the expression to be evaluated 794 * @param namespaces the namespace prefix and URIs to use 795 * @return the builder to continue processing the DSL 796 */ 797 public T xpath(String text, Namespaces namespaces) { 798 return delegate.xpath(text, namespaces); 799 } 800 801 /** 802 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 803 * expression</a> with the specified set of namespace prefixes and URIs 804 * 805 * @param text the expression to be evaluated 806 * @param namespaces the namespace prefix and URIs to use 807 * @return the builder to continue processing the DSL 808 */ 809 public T xpath(String text, Map<String, String> namespaces) { 810 return delegate.xpath(text, namespaces); 811 } 812 813 /** 814 * Evaluates an <a 815 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 816 * 817 * @param text the expression to be evaluated 818 * @return the builder to continue processing the DSL 819 */ 820 public T xquery(String text) { 821 return delegate.xquery(text); 822 } 823 824 /** 825 * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath 826 * expression</a> on the supplied header name's contents 827 * 828 * @param text the expression to be evaluated 829 * @param headerName the name of the header to apply the expression to 830 * @return the builder to continue processing the DSL 831 */ 832 public T xquery(String text, String headerName) { 833 return delegate.xquery(text, headerName); 834 } 835 836 837 /** 838 * Evaluates an <a 839 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 840 * with the specified result type 841 * 842 * @param text the expression to be evaluated 843 * @param resultType the return type expected by the expression 844 * @return the builder to continue processing the DSL 845 */ 846 public T xquery(String text, Class<?> resultType) { 847 return delegate.xquery(text, resultType); 848 } 849 850 /** 851 * Evaluates an <a 852 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 853 * with the specified result type 854 * 855 * @param text the expression to be evaluated 856 * @param resultType the return type expected by the expression 857 * @param headerName the name of the header to apply the expression to 858 * @return the builder to continue processing the DSL 859 */ 860 public T xquery(String text, Class<?> resultType, String headerName) { 861 return delegate.xquery(text, resultType, headerName); 862 } 863 864 /** 865 * Evaluates an <a 866 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 867 * with the specified result type and set of namespace prefixes and URIs 868 * 869 * @param text the expression to be evaluated 870 * @param resultType the return type expected by the expression 871 * @param namespaces the namespace prefix and URIs to use 872 * @return the builder to continue processing the DSL 873 */ 874 public T xquery(String text, Class<?> resultType, Namespaces namespaces) { 875 return delegate.xquery(text, resultType, namespaces); 876 } 877 878 /** 879 * Evaluates an <a 880 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 881 * with the specified result type 882 * 883 * @param text the expression to be evaluated 884 * @param resultType the return type expected by the expression 885 * @param headerName the name of the header to apply the expression to 886 * @param namespaces the namespace prefix and URIs to use 887 * 888 * @return the builder to continue processing the DSL 889 */ 890 public T xquery(String text, Class<?> resultType, Namespaces namespaces, String headerName) { 891 return delegate.xquery(text, resultType, namespaces, headerName); 892 } 893 /** 894 * Evaluates an <a 895 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 896 * with the specified result type and set of namespace prefixes and URIs 897 * 898 * @param text the expression to be evaluated 899 * @param resultType the return type expected by the expression 900 * @param namespaces the namespace prefix and URIs to use 901 * @return the builder to continue processing the DSL 902 */ 903 public T xquery(String text, Class<?> resultType, Map<String, String> namespaces) { 904 return delegate.xquery(text, resultType, namespaces); 905 } 906 907 /** 908 * Evaluates an <a 909 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 910 * with the specified set of namespace prefixes and URIs 911 * 912 * @param text the expression to be evaluated 913 * @param namespaces the namespace prefix and URIs to use 914 * @return the builder to continue processing the DSL 915 */ 916 public T xquery(String text, Namespaces namespaces) { 917 return delegate.xquery(text, namespaces); 918 } 919 920 /** 921 * Evaluates an <a 922 * href="http://camel.apache.org/xquery.html">XQuery expression</a> 923 * with the specified set of namespace prefixes and URIs 924 * 925 * @param text the expression to be evaluated 926 * @param namespaces the namespace prefix and URIs to use 927 * @return the builder to continue processing the DSL 928 */ 929 public T xquery(String text, Map<String, String> namespaces) { 930 return delegate.xquery(text, namespaces); 931 } 932 933 /** 934 * Evaluates a given language name with the expression text 935 * 936 * @param language the name of the language 937 * @param expression the expression in the given language 938 * @return the builder to continue processing the DSL 939 */ 940 public T language(String language, String expression) { 941 return delegate.language(language, expression); 942 } 943 944 // Properties 945 // ------------------------------------------------------------------------- 946 947 @Override 948 public Expression getExpressionValue() { 949 return delegate.getExpressionValue(); 950 } 951 952 @Override 953 protected void setExpressionValue(Expression expressionValue) { 954 delegate.setExpressionValue(expressionValue); 955 } 956 957 @Override 958 public ExpressionDefinition getExpressionType() { 959 return delegate.getExpressionType(); 960 } 961 962 @Override 963 protected void setExpressionType(ExpressionDefinition expressionType) { 964 delegate.setExpressionType(expressionType); 965 } 966}