Package sos.xml

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()


      SOSXMLXPath xpathPayload = new sos.xml.SOSXMLXPath(new java.lang.StringBuffer(xml));
      this.release = xpathPayload.selectSingleNodeValue("//release");
      this.new_release = xpathPayload.selectSingleNodeValue("//new_release");
      this.os = xpathPayload.selectSingleNodeValue("//os");
      this.os_install = xpathPayload.selectSingleNodeValue("//os_install");
      this.automatic_download = xpathPayload.selectSingleNodeValue("//automatic_download");
      this.filename = xpathPayload.selectSingleNodeValue("//filename");
      update_needed = xpathPayload.selectSingleNodeValue("//update_needed");

    }
View Full Code Here


  }

  private boolean isSubstituteSchedule(File configFile) throws Exception {

    SOSXMLXPath xp = new SOSXMLXPath(configFile.getAbsolutePath());
    String orderAtt = xp.selectSingleNodeValue("/schedule/@substitute");
    if (orderAtt != null && orderAtt.length() > 0) {
      getLogger().debug8("File " + configFile + " is substitute schedule.");
      return true;
    }
    getLogger().debug8("File " + configFile + " is ordinary schedule.");
View Full Code Here

      this.release = xpathPayload.selectSingleNodeValue("//release");
      this.new_release = xpathPayload.selectSingleNodeValue("//new_release");
      this.os = xpathPayload.selectSingleNodeValue("//os");
      this.os_install = xpathPayload.selectSingleNodeValue("//os_install");
      this.automatic_download = xpathPayload.selectSingleNodeValue("//automatic_download");
      this.filename = xpathPayload.selectSingleNodeValue("//filename");
      update_needed = xpathPayload.selectSingleNodeValue("//update_needed");

    }

    private String release = "";
View Full Code Here

      this.new_release = xpathPayload.selectSingleNodeValue("//new_release");
      this.os = xpathPayload.selectSingleNodeValue("//os");
      this.os_install = xpathPayload.selectSingleNodeValue("//os_install");
      this.automatic_download = xpathPayload.selectSingleNodeValue("//automatic_download");
      this.filename = xpathPayload.selectSingleNodeValue("//filename");
      update_needed = xpathPayload.selectSingleNodeValue("//update_needed");

    }

    private String release = "";
    private String new_release = "";
View Full Code Here

    String xml = getLiveXml();
    spooler_log.debug3("liveExport: " + xml);

    SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(xml));
    String jobChainName = xpath.selectSingleNodeValue("//order/@job_chain");
    File currentRoot = liveFolder.getParentFile();
    getLogger().debug7("current root folder: " + currentRoot.getAbsolutePath());

    if (jobChainName != null && jobChainName.length() > 0) {
      xml = xml.replaceFirst(" job_chain=\"" + jobChainName + "\"", "");
View Full Code Here

      }else{
        spooler_log.info("No supervisor configured, submitting event to this Job Scheduler.");
        answer = spooler.execute_xml(xml);
      }
      SOSXMLXPath xAnswer = new SOSXMLXPath(new StringBuffer(answer));
        String errorText = xAnswer.selectSingleNodeValue("//ERROR/@text");
        if (errorText != null && errorText.length() > 0) {
          throw new Exception("supervisor returned error: " + errorText );
       
    } catch(Exception e){
      throw new Exception("Failed to submit event: "+e,e);
View Full Code Here

          }
          if(start){
              String command = "";
              if (what.equals("order")){
                String job_chain = xpath.selectSingleNodeValue("//add_order/@job_chain");
                String id = xpath_answer.selectSingleNodeValue("//spooler/answer/ok/order/@id");
                 
                command = "<modify_order at=\"now\" job_chain=\"" + job_chain + "\"  order=\"" + id + "\"/>";
               
              }
              if (what.equals("job")){
View Full Code Here

     
      SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));

   
      String errorMsg = "";
      if (xpath.selectSingleNodeValue("//spooler/answer/ERROR") != null) {
         String errorCode = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@code");
         String errorText = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@text");
         errorMsg = errorCode + ":"  + errorText;
      }
     
View Full Code Here

      SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));

   
      String errorMsg = "";
      if (xpath.selectSingleNodeValue("//spooler/answer/ERROR") != null) {
         String errorCode = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@code");
         String errorText = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@text");
         errorMsg = errorCode + ":"  + errorText;
      }
     
      if (!errorMsg.equals("")){
View Full Code Here

   
      String errorMsg = "";
      if (xpath.selectSingleNodeValue("//spooler/answer/ERROR") != null) {
         String errorCode = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@code");
         String errorText = xpath.selectSingleNodeValue("//spooler/answer/ERROR/@text");
         errorMsg = errorCode + ":"  + errorText;
      }
     
      if (!errorMsg.equals("")){
        throw new Exception ("Scheduler answer ERROR:" + errorMsg);
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.