Examples of Compartment


Examples of org.sbml.jsbml.Compartment

  public static void main(String[] args) throws IOException, XMLStreamException {
   
    SBMLDocument doc = new SBMLDocument(2, 4);
    Model model = doc.createModel("model_test");
    Compartment c1 = model.createCompartment("c1");
    Species s1 = model.createSpecies("s1", c1);
    s1.setMetaId("meta_" + s1.getId());
   
    Species s2 = model.createSpecies("s2", c1);
    s2.setMetaId("meta_" + s2.getId());
View Full Code Here

Examples of org.sbml.jsbml.Compartment

  @Before
  public void setUp() throws Exception {
    docL3 = new SBMLDocument(3, 1);
    modelL3 = docL3.createModel("test");
    modelL3.createUnitDefinition("ud1");
    Compartment c = modelL3.createCompartment("comp");
    modelL3.createSpecies("s1", c);
    modelL3.createEvent("event");
   
    docL2V4 = new SBMLDocument(2, 4);
    modelL2V4 = docL2V4.createModel("test");
View Full Code Here

Examples of org.sbml.jsbml.Compartment

  /**
   * Test method for {@link org.sbml.jsbml.Model#removeCompartment(java.lang.String)}.
   */
  @Test
  public void testRemoveCompartmentString() {
    Compartment c = modelL3.createCompartment("c2");
    assertTrue(modelL3.getCompartment(c.getId()) != null);

    modelL3.removeCompartment(c.getId());
    assertTrue(modelL3.getCompartment(c.getId()) == null);
  }
View Full Code Here

Examples of org.sbml.jsbml.Compartment

   *
   */
  @Test public void checkHashCode() throws ParseException {
    SBMLDocument doc1 = new SBMLDocument(3, 1);
    Model model = doc1.createModel("test_model");
    Compartment c = model.createCompartment("c1");
    Species s = model.createSpecies("s1", c);
    s.addCVTerm(new CVTerm(CVTerm.Qualifier.BQB_IS, "urn:miriam:kegg.compound:C00001"));
    Rule r = model.createAlgebraicRule();
    r.setMath(ASTNode.parseFormula("sin(3) + 1"));
   
View Full Code Here

Examples of org.sbml.jsbml.Compartment

          }
        }
      }
      if (model.isSetListOfCompartments()) {
        for (int i = 0; i < model.getCompartmentCount(); i++) {
          Compartment compartment = model.getCompartment(i);
          if (compartment.isSetCompartmentType()
              && !compartment.isSetCompartmentTypeInstance()) {
            log4jLogger.warn("No CompartmentType matches the compartmentTypeID of compartment.");
          }
          if (compartment.isSetOutside()
              && !compartment.isSetOutsideInstance()) {
            log4jLogger.warn("No Compartment matches the outsideID of compartment.");
          }
          if (compartment.isSetUnits()
              && !compartment.isSetUnitsInstance()) {
            log4jLogger.warn("No UnitDefinition matches the unitsID of compartment.");
          }
        }
      }
      if (model.isSetListOfEvents()) {
View Full Code Here

Examples of org.sbml.jsbml.Compartment

              return unitDefinition;
            } else if (elementName.equals("compartment")
                && list.getSBaseListType().equals(
                    ListOf.Type.listOfCompartments)) {
              Compartment compartment = (Compartment) newContextObject;
              compartment.initDefaults();
              model.addCompartment(compartment);

              return compartment;
            } else if (elementName.equals("species")
                && list.getSBaseListType().equals(
View Full Code Here

Examples of org.sbml.jsbml.Compartment

   */
  @SuppressWarnings("deprecation")
  public static void main(String args[]) throws ParseException, XMLStreamException, SBMLException {
    SBMLDocument doc = new SBMLDocument(1, 2);
    Model m = doc.createModel();
    Compartment c = m.createCompartment("c1");
    Species s1 = m.createSpecies("s1", c);
    Species s2 = m.createSpecies("s2", c);
    Reaction r = m.createReaction("r1");
    r.createReactant(null, s1);
    r.createProduct(null, s2);
View Full Code Here

Examples of org.tinyuml.draw.Compartment

  /**
   * Constructor.
   * @param aClass the UmlClass object
   */
  public ClassElement(UmlClass aClass) {
    this(aClass, new Compartment(), new Compartment(), new Compartment());
  }
View Full Code Here

Examples of org.tinyuml.draw.Compartment

  /**
   * Resizes the last visible compartment to fit within the total height.
   */
  private void resizeLastCompartmentToFit() {
    Compartment lastCompartment = getLastVisibleCompartment();
    double diffHeight = getSize().getHeight() - getCompartmentHeightSum();
    lastCompartment.setHeight(lastCompartment.getSize().getHeight() +
                              diffHeight);
  }
View Full Code Here

Examples of org.tinyuml.draw.Compartment

  /**
   * Returns the last visible compartment.
   * @return the last visible compartment
   */
  private Compartment getLastVisibleCompartment() {
    Compartment lastCompartment = mainCompartment;
    if (showAttributes) lastCompartment = attributesCompartment;
    if (showOperations) lastCompartment = operationsCompartment;
    return lastCompartment;
  }
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.