Package org.jdom.xpath

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


      } else if(type==Editor.JOB) {

        if(which != null && which.equalsIgnoreCase("close")) {
          onlyWarning = true;
          XPath x0 = XPath.newInstance("//job[@name='"+ name + "']");      
          Element e = (Element)x0.selectSingleNode(_dom.getDoc());
          boolean isOrder = Utils.getAttributeValue("order", e).equalsIgnoreCase("yes");

          if(!isOrder) {
            XPath x3 = XPath.newInstance("//job_chain_node[@job='"+ name + "']");        
            List listOfElement_3 = x3.selectNodes(_dom.getDoc());
View Full Code Here


          if(name.length() == 0)
            return true;

          //
          XPath x0 = XPath.newInstance("//job[@name='"+ name + "']");      
          Element e = (Element)x0.selectSingleNode(_dom.getDoc());
          boolean isOrder = Utils.getAttributeValue("order", e).equalsIgnoreCase("yes");
          if( isOrder) {           

            XPath x = XPath.newInstance("//job[@name='"+ name + "']/run_time[@let_run='yes' or @once='yes' or @single_start]");      
View Full Code Here

      ArrayList stateList = new ArrayList();
     
      try {
        String jobChainname = Utils.getAttributeValue("job_chain", getCommand());       
        XPath x3 = XPath.newInstance("//job_chain[@name='"+ jobChainname + "']");
        Element jobChain = (Element)x3.selectSingleNode(_dom.getDoc());
       
        if(jobChain == null) {
          jobChainname = Utils.getAttributeValue("job_chain_node.job_chain", getCommand());
          x3 = XPath.newInstance("//job_chain_node.job_chain[@name='"+ jobChainname + "']");
            jobChain = (Element)x3.selectSingleNode(_dom.getDoc());
View Full Code Here

        Element jobChain = (Element)x3.selectSingleNode(_dom.getDoc());
       
        if(jobChain == null) {
          jobChainname = Utils.getAttributeValue("job_chain_node.job_chain", getCommand());
          x3 = XPath.newInstance("//job_chain_node.job_chain[@name='"+ jobChainname + "']");
            jobChain = (Element)x3.selectSingleNode(_dom.getDoc());
           
        }
        if(jobChain == null)
          return retVal;
       
View Full Code Here

            System.out.println("file:" + f.getAbsolutePath());
            Document document = builder.build(f);
            System.out.println(document.getRootElement().getName());
       
            XPath xpath = XPath.newInstance("/spooler/answer");
            Element e = (Element)xpath.selectSingleNode(document);
            String timeStamp = e.getAttributeValue("time");
            System.out.println("Timestamp:" + timeStamp);

            xpath = XPath.newInstance("/spooler/answer/state");
            e = (Element)xpath.selectSingleNode(document);
View Full Code Here

            Element e = (Element)xpath.selectSingleNode(document);
            String timeStamp = e.getAttributeValue("time");
            System.out.println("Timestamp:" + timeStamp);

            xpath = XPath.newInstance("/spooler/answer/state");
            e = (Element)xpath.selectSingleNode(document);
            String pid = e.getAttributeValue("pid");
            System.out.println("pid:" + pid);
           
            SystemProcess process = processes.select(pid);
View Full Code Here

            System.out.println("pid:" + pid);
           
            SystemProcess process = processes.select(pid);

            xpath = XPath.newInstance("//spooler/answer/state/allocations");
            e = (Element)xpath.selectSingleNode(document);
            String count = e.getAttributeValue("count");
            String size = e.getAttributeValue("size");

            String reserved_virtual = "";
            String total_virtual = "";
View Full Code Here

            Document document = builder.build(f);
            System.out.println(document.getRootElement().getName() + "file:" + f.getAbsolutePath());
       
            boolean schedulerProcessFound = false;
            XPath xpath = XPath.newInstance("//Table[@name='TableWorkingSet']/Item/Data[@name='process' and . = 'scheduler']/following-sibling::node()[@name='pid']");
            Element e = (Element)xpath.selectSingleNode(document);
            if (e != null) {
                schedulerProcessFound = true;           
                String pid = e.getText();
                System.out.println("pid:" + pid);
                xpath = XPath.newInstance("//Table[@name='TableWorkingSet']/Item/Data[@name='process' and . = 'scheduler']/following-sibling::node()[@name='private']");
View Full Code Here

            if (e != null) {
                schedulerProcessFound = true;           
                String pid = e.getText();
                System.out.println("pid:" + pid);
                xpath = XPath.newInstance("//Table[@name='TableWorkingSet']/Item/Data[@name='process' and . = 'scheduler']/following-sibling::node()[@name='private']");
                e = (Element)xpath.selectSingleNode(document);
                String privateBytes = e.getText();
                System.out.println("private bytes:" + privateBytes);   
               
                xpath = XPath.newInstance("//Table[@name='collection']/Item/Data[@name='start']");
                e = (Element)xpath.selectSingleNode(document);
View Full Code Here

                e = (Element)xpath.selectSingleNode(document);
                String privateBytes = e.getText();
                System.out.println("private bytes:" + privateBytes);   
               
                xpath = XPath.newInstance("//Table[@name='collection']/Item/Data[@name='start']");
                e = (Element)xpath.selectSingleNode(document);
                String year = e.getAttributeValue("year");
                String month = e.getAttributeValue("month");
                String day = e.getAttributeValue("day");
                String hour = e.getAttributeValue("hour");
                String minute = e.getAttributeValue("minute");
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.