Package org.jdom.xpath

Examples of org.jdom.xpath.XPath.selectNodes()


      } else if(type == Editor.EVENTS) {
        //<event_group logic="or" group="1">
        XPath x3 = XPath.newInstance("//event_group[@group='"+ name + "']");   


        List listOfElement_3 = x3.selectNodes(_dom.getDoc());
        if(!listOfElement_3.isEmpty()) {         
          ActionsForm f = (ActionsForm)(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor());
          if(f == null)
            return;
          Tree tree = f.getTree();
View Full Code Here


        }
      } else if(type == Editor.ACTION_COMMANDS) {
        XPath x3 = XPath.newInstance("//command[@name='"+ name + "']");   


        List listOfElement_3 = x3.selectNodes(_dom.getDoc());
        if(!listOfElement_3.isEmpty()) {         
          ActionsForm f = (ActionsForm)(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor());
          if(f == null)
            return;
          Tree tree = f.getTree();
View Full Code Here

          x3 = XPath.newInstance("//command/"+child+"[@job_chain='"+ job + "']");           

        }


        List listOfElement_3 = x3.selectNodes(_dom.getDoc());
        if(!listOfElement_3.isEmpty()) {         
          ActionsForm f = (ActionsForm)(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor());
          if(f == null)
            return;
          Tree tree = f.getTree();
View Full Code Here

          x3 = XPath.newInstance("//commands/"+child+"[@job_chain='"+ job + "']");           

        }


        List listOfElement_3 = x3.selectNodes(_dom.getDoc());
        if(!listOfElement_3.isEmpty()) {         
          SchedulerForm f = (SchedulerForm)(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor());
          if(f == null)
            return;
          Tree tree = f.getTree();
View Full Code Here

                os1.write(csvLine.getBytes());
            }

           
            xpath = XPath.newInstance("//spooler/answer/state/allocations/allocation");
            List<Element> list = xpath.selectNodes(document);
            for (Element element : list) {
                System.out.println(
                        "count:" + element.getAttributeValue("count")
                        + " name:" + element.getAttributeValue("name")
                        + " size:" + element.getAttributeValue("size")
View Full Code Here

      final Document   doc= builder.build(filename);           
      java.util.List listOfElement = null;
      if(txtIncludeNode.getText() != null && txtIncludeNode.getText().length() > 0) {
        XPath x = XPath.newInstance(txtIncludeNode.getText());
        //Element e = (Element)x.selectSingleNode(doc);
        listOfElement = x.selectNodes(doc);                               
       
       
      }else {
        listOfElement = new java.util.ArrayList();       
        params = doc.getRootElement();
View Full Code Here

  private void getJobDocumentation() {
    if(jobname != null && jobname.length() > 0) {
      try{

        XPath x = XPath.newInstance("//job[@name='"+ jobname + "']/description/include");        
        List listOfElement = x.selectNodes(schedulerDom.getDoc());
        if(!listOfElement.isEmpty()) {
          Element include = (Element)listOfElement.get(0);
          if(include != null) {
            jobDocumentation = Utils.getAttributeValue("file", include);           
          }
View Full Code Here

          _dom.isLifeElement() || _dom.isDirectory(),
          _dom.getFilename());

      //Document d = detailListener.getDoc();
      XPath x = XPath.newInstance("//process[@state='"+ oldstate + "']");        
      List listOfElement = x.selectNodes(detailListener.getDoc());

      XPath xnew = XPath.newInstance("//process[@state='"+ newstate + "']");        
      List listOfElementnew = xnew.selectNodes(detailListener.getDoc());
      if(listOfElementnew.isEmpty()) {
        if(!listOfElement.isEmpty()) {
View Full Code Here

      //Document d = detailListener.getDoc();
      XPath x = XPath.newInstance("//process[@state='"+ oldstate + "']");        
      List listOfElement = x.selectNodes(detailListener.getDoc());

      XPath xnew = XPath.newInstance("//process[@state='"+ newstate + "']");        
      List listOfElementnew = xnew.selectNodes(detailListener.getDoc());
      if(listOfElementnew.isEmpty()) {
        if(!listOfElement.isEmpty()) {
          //System.out.println("hier �ndern");
          Element process = (Element)listOfElement.get(0);
          process.setAttribute("state", newstate);
View Full Code Here

          _dom.isLifeElement() || _dom.isDirectory(),
          _dom.getFilename());


      XPath x = XPath.newInstance("settings/job_chain[@name='"+ jobchainName +"']");        
      List listOfElement = x.selectNodes(detailListener.getDoc());
      if(!listOfElement.isEmpty()) {
          Element jobchain = (Element)listOfElement.get(0);
          jobchain.setAttribute("name", jobChainNewName);
          detailListener.save();
          //MainWindow.getContainer().getCurrentTab().setData("ftp_details_parameter_file", detailListener.getConfigurationFilename());
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.