Package org.jdom

Examples of org.jdom.Element.detach()


        }
        List actualParams = incomingData.getChildren();
        while (actualParams.size() > 0) {
            Element element = (Element) actualParams.get(0);
            element.detach();
            if (getInputParameters().containsKey(element.getName())) {
                addData(pmgr, element);
            } else {
                throw new IllegalArgumentException("Element " + element +
                        " is not a valid input parameter of " + this);
View Full Code Here


                              null, status);

        // add data list if non-parent item
        Element data = eWIR.getChild("data").getChild(taskName) ;
        if (data != null) {
            data = (Element) data.detach() ;
            wir.setDataList(data);
        }
        return wir;
    }
View Full Code Here

            //iterate through the output vars and add them to the merged doc.
            for (int i = 0; i < children.size(); i++) {
                Object o = children.get(i);
                if (o instanceof Element) {
                    Element child = (Element) o;
                    child.detach();
                    //the input data will be removed from the merged doc and
                    //the output data will be added.
        //System.out.println(child.getName());
                    mergedDoc.getRootElement().removeChild(child.getName());
                    mergedDoc.getRootElement().addContent(child);
View Full Code Here

        Element cDefs = custom.getRootElement();

        List cChildren = cDefs.getChildren();
        while (cChildren.size() > 0) {
            Element child = (Element) cChildren.get(0);
            child.detach();
            if (!(DeviceRepositorySchemaConstants.
                    POLICY_DEFINITION_TYPES_ELEMENT_NAME.
                    equals(child.getName()))) {
                sDefs.addContent(child);
            }
View Full Code Here

                POLICIES_ELEMENT_NAME, cDevice.getNamespace());

        List cChildren = cPolicies.getChildren();
        while (cChildren.size() > 0) {
            Element cPolicy = (Element) cChildren.get(0);
            cPolicy.detach();
            sPolicies.addContent(cPolicy);
        }
    }

View Full Code Here

     * @param deviceName The name of the device to remove from the identifiers
     */
    private void removeDeviceIdentifiers(String deviceName) {
        Element identifiers = retrieveDeviceIdentificationElement(deviceName);
        if (identifiers != null) {
            identifiers.detach();
        }
    }

    /**
     * Remove the device element in the tac-identification document that
View Full Code Here

     *                   identification
     */
    private void removeDeviceTACs(String deviceName) {
        Element tacs = retrieveTACDeviceElement(deviceName);
        if (tacs != null) {
            tacs.detach();
        }
    }

    /**
     * Rename the device element in the identifiers document that contains the
View Full Code Here

     * @throws java.io.IOException    if an error occurs
     */
    public static Element createElement(String element, JDOMFactory factory)
        throws JDOMException, IOException {
        Element root = createDocument(element, factory).getRootElement();
        root.detach();
        return root;
    }

    /**
     * Converts a JDOM document to a string
View Full Code Here

        // that the {@link GridFormatComposite} knows that a row is being
        // deleted.
        grandParent.setAttribute("rows", String.valueOf(--rowCount));

        // Remove the row element.
        rowElement.detach();

        // Find the "next" appropriate row in which to select, post delete.
        if (rowPos == gridContent.size()) {
            rowPos--;
        }
View Full Code Here

                getAttributeValue(DeviceRepositorySchemaConstants.
                DEVICE_NAME_ATTRIBUTE),
                policyName);

        if (policyElement != null) {
            policyElement.detach();
        }
    }

    /**
     * Retrieve a named policy as a JDOM Element from a specified device.
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.