Examples of selectSingleElement()


Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                    buffer = new StringBuffer();
                    buffer.append("/ns:definitions/ns:types/ns:type[@name=\"")
                            .append(ref)
                            .append("\"]");
                    xpath = new XPath(buffer.toString(), namespaces);
                    policyTypeElement = xpath.selectSingleElement(rootElement);
                }
            }
        } catch (XPathException e) {
            // There was a problem retrieving the type element.
            throw new UndeclaredThrowableException(e, e.getMessage());
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                                final Element hierarchyRoot = dram.
                                        getDeviceHierarchyDocument().
                                        getRootElement();

                                // Retrieve the new device element.
                                newDeviceElement = newDeviceXPath.
                                        selectSingleElement(hierarchyRoot);
                            } catch (XPathException e) {
                                EclipseCommonPlugin.
                                        handleError(ABPlugin.getDefault(), e);
                            }
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                append(":").
                append(DeviceRepositorySchemaConstants.DEVICE_ELEMENT_NAME);

        XPath deviceXPath = new XPath(xPathString.toString(), new Namespace[]{
                namespace});
        Element device = deviceXPath.selectSingleElement(invalidElement);

        if (device == null) {
            throw new XPathException(
                    "Device element was null when selected based on element: " +
                            invalidElement.toString());
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                append(":").
                append(DeviceRepositorySchemaConstants.POLICY_ELEMENT_NAME);

        XPath policyXPath = new XPath(xpathString.toString(), new Namespace[]{
                MCSNamespace.DEVICE});
        Element policy = policyXPath.selectSingleElement(invalidElement);

        if (policy == null) {
            throw new XPathException(
                    "Selected element was null when selected based on element: " +
                            invalidElement.toString());
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                        CATEGORY_ELEMENT_NAME);
                XPath categoryXPath = new XPath(xPathBuffer.toString(),
                        new Namespace[]{MCSNamespace.DEVICE_DEFINITIONS});
                try {
                    categoryElement =
                            categoryXPath.selectSingleElement(selectedElement);
                } catch (XPathException e) {
                    EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
                }
            } else if (selectedElement.getName().
                    equals(DeviceRepositorySchemaConstants.
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

            selection = new ODOMElement[xpaths.length];

            for (int i = 0; i < xpaths.length; i++) {
                xpath = new XPath(xpaths[i], namespaces);

                selection[i] = (ODOMElement)xpath.selectSingleElement(
                        data.getDocument());
            }
        }

        ((TestDataImpl)data).setSelection(selection);
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                "action:gridFormat/" +
                "action:gridFormatRow/" +
                "action:paneFormat", namespace);

        Element grid = gridXPath.selectSingleElement(root);
        Element pane = paneXPath.selectSingleElement(root);

        assertTrue("pane and grid do not have a common layout",
                ActionSupport.haveCommonLayout(grid, pane));

        XPath otherPaneXPath = new XPath("/action:layout/" +
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

        XPath otherPaneXPath = new XPath("/action:layout/" +
                "action:canvasLayout[1]/" +
                "action:paneFormat", namespace);

        Element otherPane = otherPaneXPath.selectSingleElement(root);
        assertNotNull(otherPane);
        assertFalse("otherPane and pane do have a common layout",
                ActionSupport.haveCommonLayout(pane, otherPane));
    }
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

                "action:gridFormat/" +
                "action:gridFormatRow/" +
                "action:paneFormat", namespace);

        Element grid = gridXPath.selectSingleElement(root);
        Element pane = paneXPath.selectSingleElement(root);

        assertTrue("pane is not a descendent of grid",
                ActionSupport.isDescendent(grid, pane));

        XPath otherPaneXPath = new XPath("/action:layout/" +
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleElement()

        XPath otherPaneXPath = new XPath("/action:layout/" +
                "action:canvasLayout[1]/" +
                "action:paneFormat", namespace);

        Element otherPane = otherPaneXPath.selectSingleElement(root);
        assertNotNull(otherPane);
        assertFalse("otherPane is a descendent of grid",
                ActionSupport.isDescendent(grid, otherPane));
    }
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.