Examples of JAXPStringXPathExpression


Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Content content = (Content) annotation;
            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        } else if (annotation instanceof XPath) {
            XPath xpathAnnotation = (XPath) annotation;
            return new JAXPStringXPathExpression(xpathAnnotation.xpath());
        }
        return null;
    }
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Correlation cor = beanType.getAnnotation(Correlation.class);
            if (cor != null) {
                if (cor.property() != null) {
                    correlationExpression = new PropertyExpression(cor.property());
                } else if (cor.xpath() != null) {
                    correlationExpression = new JAXPStringXPathExpression(cor.xpath());
                }
            }
            if (correlationExpression == null) {
                correlationExpression = new org.apache.servicemix.expression.Expression() {
                    public Object evaluate(MessageExchange exchange, NormalizedMessage message)
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

        Boolean b = (Boolean) expression.evaluate(null, message);
        return b.booleanValue();
    }
   
    public String valueOf(String xpath) throws Exception {
        JAXPStringXPathExpression expression = new JAXPStringXPathExpression(xpath);
        if (this.namespaceContext != null) {
            expression.setNamespaceContext(this.namespaceContext);
        }
        return (String)expression.evaluate(null, message);
    }
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            test = true;
        } catch (ClassNotFoundException doNothing) {
        }

        if (test) {
            assertExpression(new JAXPStringXPathExpression("/foo/bar/@xyz"), "cheese", "<foo><bar xyz='cheese'/></foo>");
            assertExpression(new JAXPStringXPathExpression("$name"), "James", "<foo><bar xyz='cheese'/></foo>");
        }
    }
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Correlation cor = beanType.getAnnotation(Correlation.class);
            if (cor != null) {
                if (cor.property() != null) {
                    correlationExpression = new PropertyExpression(cor.property());
                } else if (cor.xpath() != null) {
                    correlationExpression = new JAXPStringXPathExpression(cor.xpath());
                }
            }
            if (correlationExpression == null) {
                correlationExpression = new org.apache.servicemix.expression.Expression() {
                    public Object evaluate(MessageExchange exchange, NormalizedMessage message)
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Content content = (Content) annotation;
            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        } else if (annotation instanceof XPath) {
            XPath xpathAnnotation = (XPath) annotation;
            JAXPStringXPathExpression expr = new JAXPStringXPathExpression(xpathAnnotation.xpath());
            if (!xpathAnnotation.prefix().equals("") && !xpathAnnotation.uri().equals("")) {
                DefaultNamespaceContext ctx = new DefaultNamespaceContext();
                ctx.add(xpathAnnotation.prefix(), xpathAnnotation.uri());
                expr.setNamespaceContext(ctx);
            }
            return expr;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Correlation cor = beanType.getAnnotation(Correlation.class);
            if (cor != null) {
                if (cor.property() != null) {
                    correlationExpression = new PropertyExpression(cor.property());
                } else if (cor.xpath() != null) {
                    correlationExpression = new JAXPStringXPathExpression(cor.xpath());
                }
            }
            if (correlationExpression == null) {
                correlationExpression = new org.apache.servicemix.expression.Expression() {
                    public Object evaluate(MessageExchange exchange, NormalizedMessage message)
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        }
        else if (annotation instanceof XPath) {
            XPath xpathAnnotation = (XPath) annotation;
            return new JAXPStringXPathExpression(xpathAnnotation.xpath());
        }
        return null;
    }
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            Correlation cor = beanType.getAnnotation(Correlation.class);
            if (cor != null) {
                if (cor.property() != null) {
                    correlationExpression = new PropertyExpression(cor.property());
                } else if (cor.xpath() != null) {
                    correlationExpression = new JAXPStringXPathExpression(cor.xpath());
                }
            }
            if (correlationExpression == null) {
                correlationExpression = new org.apache.servicemix.expression.Expression() {
                    public Object evaluate(MessageExchange exchange, NormalizedMessage message) throws MessagingException {
View Full Code Here

Examples of org.apache.servicemix.expression.JAXPStringXPathExpression

            test = true;
        } catch (ClassNotFoundException doNothing) {
        }

        if (test) {
            assertExpression(new JAXPStringXPathExpression("/foo/bar/@xyz"), "cheese", "<foo><bar xyz='cheese'/></foo>");
            assertExpression(new JAXPStringXPathExpression("$name"), "James", "<foo><bar xyz='cheese'/></foo>");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.