XPathFunction provides access to XPath functions.
XPathFunction
Functions are identified by QName and arity in XPath.
516517518519520521522523524525526
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);
544545546547548549550551552553554
this.propertiesFunction = propertiesFunction; } public XPathFunction getSimpleFunction() { if (simpleFunction == null) { simpleFunction = 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);
717718719720721722723724725726727
} 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)
329330331332333334335336337338339
getNamespaceContext().setNamespaces(namespaces); } public XPathFunction getBodyFunction() { if (bodyFunction == null) { bodyFunction = new XPathFunction() { @SuppressWarnings("unchecked") public Object evaluate(List list) throws XPathFunctionException { if (exchange == null) { return null; }
348349350351352353354355356357358
this.bodyFunction = bodyFunction; } public XPathFunction getHeaderFunction() { if (headerFunction == null) { headerFunction = new XPathFunction() { @SuppressWarnings("unchecked") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
370371372373374375376377378379380
this.headerFunction = headerFunction; } public XPathFunction getOutBodyFunction() { if (outBodyFunction == null) { outBodyFunction = new XPathFunction() { @SuppressWarnings("unchecked") public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && exchange.get().hasOut()) { return exchange.get().getOut().getBody(); }
389390391392393394395396397398399
this.outBodyFunction = outBodyFunction; } public XPathFunction getOutHeaderFunction() { if (outHeaderFunction == null) { outHeaderFunction = new XPathFunction() { @SuppressWarnings("unchecked") public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
546547548549550551552553554555556
452453454455456457458459460461462
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();
470471472473474475476477478479480
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);