Package org.jdom

Examples of org.jdom.Namespace


                Collections.enumeration(Arrays.asList(rs1URL))).anyTimes();
        EasyMock.replay(b);
       
        List<Element> rsElements = OsgiUtils.getAllDescriptionElements(b);
        assertEquals(2, rsElements.size());
        Namespace ns = Namespace.getNamespace("http://www.osgi.org/xmlns/sd/v1.0.0");
        assertEquals("SomeService", rsElements.get(0).getChild("provide", ns).getAttributeValue("interface"));
        assertEquals("SomeOtherService", rsElements.get(1).getChild("provide", ns).getAttributeValue("interface"));
    }
View Full Code Here


                Collections.enumeration(Arrays.asList(rs1URL, rs2URL))).anyTimes();
        EasyMock.replay(b);
       
        List<Element> rsElements = OsgiUtils.getAllDescriptionElements(b);
        assertEquals(3, rsElements.size());
        Namespace ns = Namespace.getNamespace("http://www.osgi.org/xmlns/sd/v1.0.0");
        assertEquals("SomeService", rsElements.get(0).getChild("provide", ns).getAttributeValue("interface"));
        assertEquals("SomeOtherService", rsElements.get(1).getChild("provide", ns).getAttributeValue("interface"));
        assertEquals("org.example.Service", rsElements.get(2).getChild("provide", ns).getAttributeValue("interface"));
    }
View Full Code Here

                Collections.enumeration(Arrays.asList(rs1URL))).anyTimes();
        EasyMock.replay(b);
       
        List<Element> rsElements = OsgiUtils.getAllDescriptionElements(b);
        assertEquals(2, rsElements.size());
        Namespace ns = Namespace.getNamespace("http://www.osgi.org/xmlns/sd/v1.0.0");
        assertEquals("SomeService", rsElements.get(0).getChild("provide", ns).getAttributeValue("interface"));
        assertEquals("SomeOtherService", rsElements.get(1).getChild("provide", ns).getAttributeValue("interface"));
    }
View Full Code Here

        }
    }
   
    @SuppressWarnings("unchecked")
    void addDecorations(Bundle bundle) {
        Namespace ns = Namespace.getNamespace("http://cxf.apache.org/xmlns/service-decoration/1.0.0");
        for (Element decoration : getDecorationElements(bundle)) {
            for (Element match : (List<Element>) decoration.getChildren("match", ns)) {
                InterfaceRule m = new InterfaceRule(bundle, match.getAttributeValue("interface"));
                for (Element propMatch : (List<Element>) match.getChildren("match-property", ns)) {
                    m.addPropMatch(propMatch.getAttributeValue("name"), propMatch.getAttributeValue("value"));
View Full Code Here

        List<Element> elements = new ArrayList<Element>();
        while (entries.hasMoreElements()) {
            URL resourceURL = (URL) entries.nextElement();
            try {
                Document d = new SAXBuilder().build(resourceURL.openStream());
                Namespace ns = Namespace.getNamespace("http://cxf.apache.org/xmlns/service-decoration/1.0.0");
                elements.addAll(d.getRootElement().getChildren("service-decoration", ns));
            } catch (Exception ex) {
                LOG.log(Level.WARNING, "Problem parsing: " + resourceURL, ex);
            }
        }
View Full Code Here

        List<Element> elements = new ArrayList<Element>();
        while (urls.hasMoreElements()) {
            URL resourceURL = (URL)urls.nextElement();
            try {
                Document d = new SAXBuilder().build(resourceURL.openStream());
                Namespace ns = Namespace.getNamespace(REMOTE_SERVICES_NS);
                elements.addAll(d.getRootElement().getChildren(SERVICE_DESCRIPTION_ELEMENT, ns));
            } catch (Exception ex) {
                LOG.log(Level.WARNING, "Problem parsing: " + resourceURL, ex);
            }
        }
View Full Code Here

        Iterator props = retriever.getAllPropertyNames(PrincipalImpl.getInstance())
            .getRequestedProperties();
        while (props.hasNext()) {
            RequestedProperty p = (RequestedProperty)props.next();
            Element principalSearchPropertyElm = new Element(E_PRINCIPAL_SEARCH_PROPERTY, DNSP);
            Namespace nsp = DNSP.getURI().equals(p.getNamespace())
                ? DNSP
                : Namespace.getNamespace(p.getNamespace());
            principalSearchPropertyElm.addContent(new Element(p.getName(), DNSP));
            principalSearchPropertySetElm.addContent(principalSearchPropertyElm);
        }
View Full Code Here

        Element propElm = new Element(E_PROP, DNSP);
        selectElm.addContent(propElm);
        Iterator props = requestedProperties.getRequestedProperties();
        while (props.hasNext()) {
            RequestedProperty p = (RequestedProperty)props.next();
            Namespace nsp = (DNSP.getURI().equals(p.getNamespace()))
                ? DNSP
                : Namespace.getNamespace(p.getNamespace());
            propElm.addContent(new Element(p.getName(), nsp));
        }
        // from
View Full Code Here

        Element propElm = new Element(E_PROP, DNSP);
        selectElm.addContent(propElm);
        Iterator props = requestedProperties.getRequestedProperties();
        while (props.hasNext()) {
            RequestedProperty p = (RequestedProperty)props.next();
            Namespace nsp = (DNSP.getURI().equals(p.getNamespace()))
                ? DNSP
                : Namespace.getNamespace(p.getNamespace());
            propElm.addContent(new Element(p.getName(), nsp));
        }
        // from
View Full Code Here

     *
     * @param orderByElement  the JDOM element containing the
     *        orderBy expression
     */
    public void init (Element orderByElement) throws InvalidQueryException {
        Namespace nameSpace = orderByElement.getNamespace ();
        Iterator it =
            orderByElement.getChildren (Literals.ORDER, nameSpace).iterator();

        while (it.hasNext()) {
            Element order = (Element) it.next();
View Full Code Here

TOP

Related Classes of org.jdom.Namespace

Copyright © 2018 www.massapicom. 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.