Examples of Namespaces


Examples of org.apache.camel.builder.xml.Namespaces

        }
    }

    protected void injectNamespaces(Element element, Binder<Node> binder) {
        NodeList list = element.getChildNodes();
        Namespaces namespaces = null;
        int size = list.getLength();
        for (int i = 0; i < size; i++) {
            Node child = list.item(i);
            if (child instanceof Element) {
                Element childElement = (Element)child;
                Object object = binder.getJAXBNode(child);
                if (object instanceof NamespaceAware) {
                    NamespaceAware namespaceAware = (NamespaceAware)object;
                    if (namespaces == null) {
                        namespaces = new Namespaces(element);
                    }
                    namespaces.configure(namespaceAware);
                }
                injectNamespaces(childElement, binder);
            }
        }
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

        }
    }

    protected void injectNamespaces(Element element) {
        NodeList list = element.getChildNodes();
        Namespaces namespaces = null;
        int size = list.getLength();
        for (int i = 0; i < size; i++) {
            Node child = list.item(i);
            if (child instanceof Element) {
                Element childElement = (Element)child;
                Object object = binder.getJAXBNode(child);
                if (object instanceof NamespaceAware) {
                    NamespaceAware namespaceAware = (NamespaceAware)object;
                    if (namespaces == null) {
                        namespaces = new Namespaces(element);
                    }
                    namespaces.configure(namespaceAware);
                }
                injectNamespaces(childElement);
            }
        }
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

        return ctx;
    }

    protected void injectNamespaces(Element element, Binder<Node> binder) {
        NodeList list = element.getChildNodes();
        Namespaces namespaces = null;
        int size = list.getLength();
        for (int i = 0; i < size; i++) {
            Node child = list.item(i);
            if (child instanceof Element) {
                Element childElement = (Element) child;
                Object object = binder.getJAXBNode(child);
                if (object instanceof NamespaceAware) {
                    NamespaceAware namespaceAware = (NamespaceAware) object;
                    if (namespaces == null) {
                        namespaces = new Namespaces(element);
                    }
                    namespaces.configure(namespaceAware);
                }
                injectNamespaces(childElement, binder);
            }
        }
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

    }

    protected void injectNamespaces(Element element, Binder<Node> binder) {
        NodeList list = element.getChildNodes();
        Namespaces namespaces = null;
        int size = list.getLength();
        for (int i = 0; i < size; i++) {
            Node child = list.item(i);
            if (child instanceof Element) {
                Element childElement = (Element)child;
                Object object = binder.getJAXBNode(child);
                if (object instanceof NamespaceAware) {
                    NamespaceAware namespaceAware = (NamespaceAware)object;
                    if (namespaces == null) {
                        namespaces = new Namespaces(element);
                    }
                    namespaces.configure(namespaceAware);
                }
                injectNamespaces(childElement, binder);
            }
        }
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                Namespaces ns = new Namespaces("atom", "http://www.w3.org/2005/Atom");
                from("rss:http://www.plosone.org/article/feed")
                        .marshal().rss()
                        .setHeader(Exchange.HTTP_URI).xpath("//atom:entry/atom:link[@type=\"application/pdf\"]/@href", ns)
                        .to("http://dummy")
                        .to("mock:end");
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                // START SNIPPET: example
                // lets define the namespaces we'll need in our filters
                Namespaces ns = new Namespaces("c", "http://acme.com/cheese")
                        .add("xsd", "http://www.w3.org/2001/XMLSchema");

                // now lets create an xpath based Message Filter
                from("direct:start").
                        filter(ns.xpath("/c:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                // START SNIPPET: example
                // lets define the namespaces we'll need in our filters
                Namespaces ns = new Namespaces("c", "http://acme.com/cheese")
                        .add("xsd", "http://www.w3.org/2001/XMLSchema");

                // now lets create an xpath based Message Filter
                from("direct:start").
                        filter(ns.xpath("/c:person[@name='James']", String.class)).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.cocoon.components.serializers.util.Namespaces

    /**
     * Reset this <code>EncodingSerializer</code>.
     */
    public void recycle() {
        if (processing) throw new IllegalStateException();
        this.namespaces = new Namespaces();
        this.locator = null;
        this.out = null;
        this.prolog = true;
    }
View Full Code Here

Examples of org.apache.garbage.serializer.util.Namespaces

        this.locator = null;
        this.out = null;
        this.prolog = true;
        this.encoding = null;
        this.charset = null;
        this.namespaces = new Namespaces();
    }
View Full Code Here

Examples of org.apache.struts2.convention.annotation.Namespaces

            namespaces.add(namespaceAnnotation.value());
        }

        //multiple annotations
        Namespaces namespacesAnnotation = AnnotationUtils.findAnnotation(actionClass, Namespaces.class);
        if (namespacesAnnotation != null) {
            if (LOG.isTraceEnabled()) {
                StringBuilder sb = new StringBuilder();
                for (Namespace namespace : namespacesAnnotation.value())
                    sb.append(namespace.value()).append(",");
                sb.deleteCharAt(sb.length() - 1);
                LOG.trace("Using non-default action namespaces from Namespaces annotation of [#0]", sb.toString());
            }

            for (Namespace namespace : namespacesAnnotation.value())
                namespaces.add(namespace.value());
        }

        //don't use default if there are annotations
        if (!namespaces.isEmpty())
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.