Package org.jdom

Examples of org.jdom.Element.clone()


            int timeout = jobBean.getTimeout();
            log.debug(origStart.getTime() + " Materializing action for time=" + effStart.getTime()
                    + ", lastactionnumber=" + lastActionNumber);
            Date actualTime = new Date();
            action = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(),
                    effStart.getTime(), actualTime, lastActionNumber, conf, actionBean);
            int catchUpTOMultiplier = 1; // This value might be could be changed in future
            if (actionBean.getNominalTimestamp().before(jobBean.getCreatedTimestamp())) {
                // Catchup action
                timeout = catchUpTOMultiplier * timeout;
 
View Full Code Here


            throw new CommandException(ErrorCode.E1005, ioe);
        }
        String jobXml = coordJob.getJobXml();
        Element eJob = XmlUtils.parseXml(jobXml);
        Date actualTime = new Date();
        String actionXml = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(), coordAction
                .getNominalTime(), actualTime, coordAction.getActionNumber(), jobConf, coordAction);
        LOG.debug("Refresh Action actionId=" + coordAction.getId() + ", actionXml="
                + XmlUtils.prettyPrint(actionXml).toString());
        coordAction.setActionXml(actionXml);
    }
View Full Code Here

            throw new CommandException(ErrorCode.E1005, ioe);
        }
        String jobXml = coordJob.getJobXml();
        Element eJob = XmlUtils.parseXml(jobXml);
        Date actualTime = new Date();
        String actionXml = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(), coordAction
                .getNominalTime(), actualTime, coordAction.getActionNumber(), jobConf, coordAction);
        log.debug("Refresh Action actionId=" + coordAction.getId() + ", actionXml="
                + XmlUtils.prettyPrint(actionXml).toString());
        coordAction.setActionXml(actionXml);
    }
View Full Code Here

            int timeout = coordJob.getTimeout();
            LOG.debug("Materializing action for time=" + effStart.getTime() + ", lastactionnumber=" + lastActionNumber
                    + " timeout=" + timeout + " minutes");
            Date actualTime = new Date();
            action = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(),
                    effStart.getTime(), actualTime, lastActionNumber, jobConf, actionBean);
            actionBean.setTimeOut(timeout);

            if (!dryrun) {
                storeToDB(actionBean, action); // Storing to table
View Full Code Here

            int timeout = jobBean.getTimeout();
            log.debug(origStart.getTime() + " Materializing action for time=" + effStart.getTime()
                    + ", lastactionnumber=" + lastActionNumber);
            Date actualTime = new Date();
            action = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(),
                    effStart.getTime(), actualTime, lastActionNumber, conf, actionBean);
            int catchUpTOMultiplier = 1; // This value might be could be changed in future
            if (actionBean.getNominalTimestamp().before(jobBean.getCreatedTimestamp())) {
                // Catchup action
                timeout = catchUpTOMultiplier * timeout;
 
View Full Code Here

            throw new CommandException(ErrorCode.E1005, ioe);
        }
        String jobXml = coordJob.getJobXml();
        Element eJob = XmlUtils.parseXml(jobXml);
        Date actualTime = new Date();
        String actionXml = CoordCommandUtils.materializeOneInstance(jobId, dryrun, (Element) eJob.clone(), coordAction
                .getNominalTime(), actualTime, coordAction.getActionNumber(), jobConf, coordAction);
        LOG.debug("Refresh Action actionId=" + coordAction.getId() + ", actionXml="
                + XmlUtils.prettyPrint(actionXml).toString());
        coordAction.setActionXml(actionXml);
    }
View Full Code Here

    Element newDocumentsElement = null;
   
    try {
      Document document = builder.build(sr);
      newDocumentsElement = document.getRootElement();
      element.addContent((Content)newDocumentsElement.clone());
      Format prettyFormat = Format.getPrettyFormat();
      XMLOutputter outputer= new XMLOutputter(prettyFormat);
      String newDocumentContent = outputer.outputString(element.getDocument());
     
      ByteArrayInputStream str = new ByteArrayInputStream(newDocumentContent.getBytes());
View Full Code Here

            Element child = (Element) i.next();

            if ( !allowedTags.contains( child.getName() ) )
            {
                // not yet merged, copy over
                element.addContent( (Content) child.clone() );
            }
        }

    }
View Full Code Here

               // and elem was not handled by a module
               && null == ext.getModule(elem.getNamespaceURI())) {

               // save it as foreign markup,
               // but we can't detach it while we're iterating
               foreignMarkup.add(elem.clone());
            }
        }
        // Now we can detach the foreign markup elements
        Iterator fm = foreignMarkup.iterator();
        while (fm.hasNext()) {
View Full Code Here

               // and elem was not handled by a module
               && null == ext.getModule(elem.getNamespaceURI())) {

               // save it as foreign markup,
               // but we can't detach it while we're iterating
               foreignMarkup.add(elem.clone());
            }
        }
        // Now we can detach the foreign markup elements
        Iterator fm = foreignMarkup.iterator();
        while (fm.hasNext()) {
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.