예제 #1
0
파일: AppLife.java 프로젝트: kenwebb/Xholon
  /*
   * @see org.primordion.xholon.app.IApplication#initialize(java.lang.String)
   */
  public void initialize(String configFileName) throws XholonConfigurationException {
    super.initialize(configFileName);

    // Monitoring with plotting of the monitored data.
    if (getUseDataPlotter()) {
      // Monitor these values as the BloodPlasma and contained Erythrocyte circulate in the
      // CirculatorySystem.
      IXholon monitorContext =
          getXPath().evaluate("./descendant::Heart/LeftVentricle/BloodPlasma[2]", root);
      xhMonitored[0] = getXPath().evaluate("ExtraCellularSolution/Glucose", monitorContext);
      xhMonitored[1] = getXPath().evaluate("ExtraCellularSolution/Oxygen", monitorContext);
      xhMonitored[2] = getXPath().evaluate("ExtraCellularSolution/CarbonDioxide", monitorContext);
      xhMonitored[3] = getXPath().evaluate("Erythrocyte[1]/descendant::Glucose", monitorContext);
      xhMonitored[4] = getXPath().evaluate("Erythrocyte[1]/descendant::Oxygen", monitorContext);
      xhMonitored[5] =
          getXPath().evaluate("Erythrocyte[1]/descendant::CarbonDioxide", monitorContext);
    }

    // write an SBML level 2 file
    // if (writeSbml) {
    //	IXholon sbmlContext = xpath.evaluate("./descendant::Eye/descendant::Cone/TerminalButtons",
    // root);
    //	if (sbmlContext != null) {
    //		Cellontro2Sbml cellontro2sbml = new Cellontro2Sbml("./sbml/LifeModel.xml", "LifeModel",
    // sbmlContext);
    //		cellontro2sbml.writeAll();
    //	}
    // }
  }
예제 #2
0
 public void initialize(String configFileName) throws XholonConfigurationException {
   super.initialize(configFileName);
   if (getUseInteractions()) {
     // include complete class name on sequence diagrams, rather than truncating long names
     interaction.setMaxNameLen(100);
     interaction.setMaxDataLen(6);
     IPortInterface providedRequiredInterface = new PortInterface();
     providedRequiredInterface.setInterface(Xhmodel04.getSignalIDs());
     providedRequiredInterface.setInterfaceNames(Xhmodel04.getSignalNames());
     interaction.setProvidedRequiredInterface(providedRequiredInterface);
   }
 }