XPathFunction provides access to XPath functions.
XPathFunction
Functions are identified by QName and arity in XPath.
498499500501502503504505506507508
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);
520521522523524525526527528529530
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);
548549550551552553554555556557558
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);
721722723724725726727728729730731
} 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)
493494495496497498499500501502503
public XPathFunction getBodyFunction() { return bodyFunction; } private XPathFunction createBodyFunction() { return new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange == null) { return null; }
521522523524525526527528529530531
public XPathFunction getHeaderFunction() { return headerFunction; } private XPathFunction createHeaderFunction() { return new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
553554555556557558559560561562563
public XPathFunction getOutBodyFunction() { return outBodyFunction; } private XPathFunction createOutBodyFunction() { return new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange.get() != null && exchange.get().hasOut()) { return exchange.get().getOut().getBody(); }
581582583584585586587588589590591
public XPathFunction getOutHeaderFunction() { return outHeaderFunction; } private XPathFunction createOutHeaderFunction() { return 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) {
613614615616617618619620621622623
public XPathFunction getPropertiesFunction() { return propertiesFunction; } private XPathFunction createPropertiesFunction() { return new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {
652653654655656657658659660661662
public XPathFunction getSimpleFunction() { return simpleFunction; } private XPathFunction createSimpleFunction() { return new XPathFunction() { @SuppressWarnings("rawtypes") public Object evaluate(List list) throws XPathFunctionException { if (exchange != null && !list.isEmpty()) { Object value = list.get(0); if (value != null) {