Package org.jdom

Examples of org.jdom.Element.clone()


                            children.addAll(chChilds);
                        }
                    }
                }
                else {
                    children.add(mdCh.clone());
                }
            }
            else {
                children.add(obj);
            }
View Full Code Here


               
                result = view.exec(result, context);

                for (Object e : tmp.getChildren()) {
                    Element el = (Element) e;
                    result.addContent((Element) el.clone());
                }
            } else {
                result = params;
            }
           
View Full Code Here

      String sBuildSummary = params.getChildText(Geonet.SearchResult.BUILD_SUMMARY);
            if(sBuildSummary != null && sBuildSummary.equals("false") && ! "0".equals(summaryOnly)) {
        elData.getChild(Geonet.SearchResult.BUILD_SUMMARY).setText("true");
            }
     
      session.setProperty(Geonet.Session.SEARCH_REQUEST, elData.clone());
      searcher.search(context, elData, _config);
 
      if (!"0".equals(summaryOnly)) {
        return searcher.getSummary();
      } else {
View Full Code Here

        // search ids and add to the result set
        List<String> schemas = getSchemasThatCanConvertTo(prefix);
        for (String schema : schemas) {
          params.removeChild("_schema");
          params.addContent(new Element("_schema").setText(schema));
          result.addIds(Lib.search(context, (Element)params.clone()));
        }
        if (schemas.size() == 0) result.setIds(new ArrayList<Integer>());
      }

      if (result.getIds().size() == 0)
View Full Code Here

            if (!currContext.contains("/")) {
              currContext = findNamespace(currContext, scm, schema);
            }
           
            if ((context != null && context.equals(currContext)) || (isoType != null && isoType.equals(currContext))) {
              return (Element) currElem.clone();
            }
          } else if (!requireContextMatch){
            return (Element) currElem.clone();
          }
        }
View Full Code Here

           
            if ((context != null && context.equals(currContext)) || (isoType != null && isoType.equals(currContext))) {
              return (Element) currElem.clone();
            }
          } else if (!requireContextMatch){
            return (Element) currElem.clone();
          }
        }

        return null; // no match found
View Full Code Here

        if (idSearch != null) {
            String xpath = "*//*[@id='" + idSearch + "']";
            try {
                res = Xml.selectElement(remoteFragment, xpath);
                if (res != null) {
                    res = (Element)res.clone();
                    res.removeAttribute("id");
                }
            } catch (Exception e) {
                Log.warning(Log.XLINK_PROCESSOR,"Failed to search for remote fragment using " + xpath + ", error" + e.getMessage());
                return null;
View Full Code Here

                } catch (Exception e) {
                    e.printStackTrace();
                    Log.error(Log.XLINK_PROCESSOR, "Failed to look up localxlink "+idSearch+": "+e.getMessage());
                }
                if (localFragment != null) {
                    localFragment = (Element)localFragment.clone();
                    localFragment.removeAttribute("id");
                    // replace children of this element with the fragment
                    element.removeContent();
                    element.addContent(localFragment);
                }
View Full Code Here

                        for (Element match : elementsInContextMatching) {
                            Element parent = match.getParentElement();
                            while(parent != null) {
                                parent.removeContent();
                                parent.addContent((Element)match.clone());
                                match = (Element)parent.clone();
                                parent = parent.getParentElement();
                            }
                            elementsInContextMatching.add(match);
                        }
                        elementsMatching = elementsInContextMatching;
View Full Code Here

            actionBean.setTimeOut(jobBean.getTimeout());

            log.debug(origStart.getTime() + " Materializing action for time=" + effStart.getTime()
                    + ", lastactionnumber=" + lastActionNumber);
            action = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(),
                    effStart.getTime(), lastActionNumber, conf, actionBean);
            if (actionBean.getNominalTimestamp().before(jobBean.getCreatedTimestamp())) {
                actionBean.setTimeOut(Services.get().getConf().getInt(CONF_DEFAULT_TIMEOUT_CATCHUP, -1));
                log.info("Catchup timeout is :" + actionBean.getTimeOut());
            }
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.