Package jmt.framework.xml

Examples of jmt.framework.xml.XMLUtils$ErrorCatcher


 
  private JSimLogger logger = JSimLogger.getLogger(SolverClient.class);

  public SolverClient(Frame owner) {
    solver = new SolverDispatcher();
    xmlUtils = new XMLUtils();
    this.owner = owner;
  }
View Full Code Here


  private ExactModel model;
 
  public boolean loadModel(File xmlFile) throws SolverException {
    model = new ExactModel();
    try {
      XMLUtils xmlUtils = new XMLUtils();
      if (!model.loadDocument(xmlUtils.loadXML(xmlFile))) {
        fail("Error loading model from tempfile", null);
      }
      return true;
    } catch (SAXException e) {
      fail("XML parse error in tempfile", e);
View Full Code Here

  private XMLUtils xmlUtils;
  /** Used to notify when a computation ends */
  private SolverListener listener;

  public SolverDispatcher() {
    xmlUtils = new XMLUtils();
  }
View Full Code Here

    /*********************SIM DEFINITION MODEL*********************/

    //Loads ExactModel and transforms it to CommonModel
    ExactModel exact = new ExactModel();
    XMLUtils xmlUtils = new XMLUtils();
    Document inputDoc;
    try {
      inputDoc = xmlUtils.loadXML(input);
      exact.loadDocument(inputDoc);
    } catch (SAXException e1) {
      logger.error("Cannot parse correctly input JMVA model: " + e1.getMessage());
      return null;
    } catch (IOException e1) {
View Full Code Here

        modelDefinition.delete();
      }

      // Put in place all measures from classes with null service demands and adjusts throughputs
      Document outDocument;
      XMLUtils xmlUtils = new XMLUtils();
      try {
        outDocument = xmlUtils.loadXML(temp);
        addNullMeasuresCorrectThroughputs(inputModel, outDocument);
      } catch (SAXException e2) {
        logger.error("Cannot parse correctly output JMVA model: " + e2.getMessage());
        return false;
      } catch (IOException e1) {
        logger.error("I/O error opening output JMVA model: " + e1.getMessage());
        return false;
      }
      logger.debug("Added null measures to final results");

      try {
        xmlUtils.saveXML(outDocument, modelDefinition);
      } catch (Exception e3) {
        logger.error("could not copy results into model " + modelDefinitionPath);
        return false;
      }
View Full Code Here

   * WARNING: This method should be called before solving the system.
   * @return true if sufficient capacity exists for the given workload, false otherwise
   */
  public boolean checkProcessingCapacity() {
    ExactModel exact = new ExactModel();
    XMLUtils xmlUtils = new XMLUtils();
    Document inputDoc;
    try {
      inputDoc = xmlUtils.loadXML(modelDefinition);
      exact.loadDocument(inputDoc);
    } catch (SAXException e1) {
      logger.error("Cannot parse correctly input JMVA model: " + e1.getMessage());
      return false;
    } catch (IOException e1) {
View Full Code Here

TOP

Related Classes of jmt.framework.xml.XMLUtils$ErrorCatcher

Copyright © 2018 www.massapicom. 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.