Package org.jdom

Examples of org.jdom.Element.removeChildren()


                            "identification-element-missing",
                            device));
        }
        Namespace namespace = patternElement.getNamespace();
        // remove all the existing userAgent elements
        patternElement.removeChildren(DeviceRepositorySchemaConstants.
                HEADER_PATTERN_ELEMENT_NAME,
                namespace);

        // add the new header patterns ensuring that they are added
        // before any other child elements and in the right order
View Full Code Here


                        POLICY_DEFINITION_SELECTION_ELEMENT_NAME,
                    typeElement);

        policyDefinition.removeChangeListener(odomChangeListener);
        try {
            selectionElement.removeChildren(
                        DeviceRepositorySchemaConstants.
                            POLICY_DEFINITION_KEYWORD_ELEMENT_NAME,
                        namespace);
            ODOMFactory factory = context.getODOMFactory();
            Object[] keywords = selectionValueBuilder.getItems();
View Full Code Here

            if (targetList != null) {
                Iterator it = targetList.iterator();
                while (it.hasNext()) {
                    Element target = (Element) it.next();
                    if (target != null) {
                        target.removeChildren();
                    }
                }
            }
        }
    }
View Full Code Here

      int idx = 0;
      tempElement = widget.getChild("icon", widget.getNamespace());
      if(tempElement != null){
        idx = widget.indexOf(tempElement);
        //remove original icon entries
        widget.removeChildren("icon", widget.getNamespace());
        // get the model icons
      }
      List<IIconEntity> generatedIcons = widgetModel.getIconsList();
      for(IIconEntity icon : generatedIcons){
        String parserSrc = icon.getSrc();
View Full Code Here

                   if(Log.isDebugEnabled(Geonet.Z3950_SERVER))
                       Log.debug(Geonet.Z3950_SERVER, "Search result:\n"
                                       + Xml.getString(result));

                       // remove summary
                       result.removeChildren("summary");
                       @SuppressWarnings("unchecked")
                    List<Element> list = result.getChildren();

                   if(Log.isDebugEnabled(Geonet.Z3950_SERVER))
                       Log.debug(Geonet.Z3950_SERVER, "Set name asked:" + spec);
View Full Code Here

      int idx = 0;
      tempElement = widget.getChild("icon", widget.getNamespace());
      if(tempElement != null){
        idx = widget.indexOf(tempElement);
        //remove original icon entries
        widget.removeChildren("icon", widget.getNamespace());
        // get the model icons
      }
      List<IIcon> generatedIcons = widgetModel.getIcons();
      for(IIcon icon : generatedIcons){
        String parserSrc = icon.getSrc();
View Full Code Here

                    if (value.getChildText("id").equals(valueID)) {
                        if (probeValue.toString().equals(value.getChildText("val"))) {
                            //значение не менялось
                            return;
                        }
                        value.removeChildren("val");
                        Element val = new Element("val");
                        val.setText(probeValue.toString());
                        value.addContent(val);
                        return;
                    }
View Full Code Here

        List probeList = getXmlDoc().getRootElement().getChildren("probe");
        for (int i = 0; i < probeList.size(); i++) {
            Element probe = (Element) probeList.get(i);
            if (probe.getChildTextTrim("id").equals(probeID)) {
                //пробу нашли
                probe.removeChildren("probeNum");
                //если проба нужна и номер пробы изменился то записываем значение
                if (probeNumber != null && !probeNumber.equals(probe.getChildTextTrim("probeNum"))) {
                    probe.removeChildren("probeNum");
                    Element probeNum = new Element("probeNum");
                    probeNum.setText(probeNumber);
View Full Code Here

            if (probe.getChildTextTrim("id").equals(probeID)) {
                //пробу нашли
                probe.removeChildren("probeNum");
                //если проба нужна и номер пробы изменился то записываем значение
                if (probeNumber != null && !probeNumber.equals(probe.getChildTextTrim("probeNum"))) {
                    probe.removeChildren("probeNum");
                    Element probeNum = new Element("probeNum");
                    probeNum.setText(probeNumber);
                    probe.addContent(probeNum);
                }
                if (probeNumber == null && (probe.getChild("probeNum") != null)) {
View Full Code Here

                    if (value.getChildText("id").equals(valueID)) {
                        if (probeValue.toString().equals(value.getChildText("val"))) {
                            //значение не менялось
                            return;
                        }
                        value.removeChildren("val");
                        Element val = new Element("val");
                        val.setText(probeValue.toString());
                        value.addContent(val);
                        isDirty = true;
                        fireContentStateEvent();
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.