XPathFunction provides access to XPath functions.
XPathFunction
Functions are identified by QName and arity in XPath.
521522523524525526527528529530531
this.headerFunction = headerFunction; } public XPathFunction getOutBodyFunction() { if (outBodyFunction == null) { outBodyFunction = new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && exchange.get().hasOut()) { return exchange.get().getOut().getBody(); }
540541542543544545546547548549550
this.outBodyFunction = outBodyFunction; } public XPathFunction getOutHeaderFunction() { if (outHeaderFunction == null) { outHeaderFunction = new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
563564565566567568569570571572573
this.outHeaderFunction = outHeaderFunction; } public XPathFunction getPropertiesFunction() { if (propertiesFunction == null) { propertiesFunction = new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
592593594595596597598599600601602
this.propertiesFunction = propertiesFunction; } public XPathFunction getSimpleFunction() { if (simpleFunction == null) { simpleFunction = new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
871872873874875876877878879880881
} protected XPathFunctionResolver createDefaultFunctionResolver(final XPathFunctionResolver parent) { return new XPathFunctionResolver() { public XPathFunction resolveFunction(QName qName, int argumentCount) { XPathFunction answer = null; if (parent != null) { answer = parent.resolveFunction(qName, argumentCount); } if (answer == null) { if (isMatchingNamespaceOrEmptyNamespace(qName.getNamespaceURI(), IN_NAMESPACE)
474475476477478479480481482483484
getNamespaceContext().setNamespaces(namespaces); } public XPathFunction getBodyFunction() { if (bodyFunction == null) { bodyFunction = new XPathFunction() { public Object evaluate(List list) throws XPathFunctionException { if (exchange == null) { return null; } return exchange.get().getIn().getBody();
492493494495496497498499500501502
this.bodyFunction = bodyFunction; } public XPathFunction getHeaderFunction() { if (headerFunction == null) { headerFunction = new XPathFunction() { public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) { String text = exchange.get().getContext().getTypeConverter().convertTo(String.class, value);
514515516517518519520521522523524
this.headerFunction = headerFunction; } public XPathFunction getOutBodyFunction() { if (outBodyFunction == null) { outBodyFunction = new XPathFunction() { public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && exchange.get().hasOut()) { return exchange.get().getOut().getBody(); } return null;
532533534535536537538539540541542
this.outBodyFunction = outBodyFunction; } public XPathFunction getOutHeaderFunction() { if (outHeaderFunction == null) { outHeaderFunction = new XPathFunction() { public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) { String text = exchange.get().getContext().getTypeConverter().convertTo(String.class, value);
554555556557558559560561562563564
this.outHeaderFunction = outHeaderFunction; } public XPathFunction getPropertiesFunction() { if (propertiesFunction == null) { propertiesFunction = new XPathFunction() { public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) { String text = exchange.get().getContext().getTypeConverter().convertTo(String.class, value);