Package org.sbml.jsbml

Examples of org.sbml.jsbml.ModifierSpeciesReference


    sr1.setName("reactant1");
    sr1.setStoichiometry(1d);
    SpeciesReference sr2 = r1.createProduct("sr2", s2);
    sr2.setName("product1");
    sr2.setStoichiometry(1d);
    ModifierSpeciesReference msr1 = r1.createModifier("msr1", s3);
    msr1.setName("modifier");
   
    Reaction r2 = m.createReaction("r2");
    r2.setName("reaction2");
    r2.setCompartment(c);
    SpeciesReference sr3 = r2.createReactant("sr3", s1);
    sr3.setName("reactant2");
    sr3.setStoichiometry(2d);
    SpeciesReference sr4 = r2.createProduct("sr4", s4);
    sr4.setName("product2");
    sr4.setStoichiometry(1d);
    ModifierSpeciesReference msr2 = r2.createModifier("msr2", s3);
    msr2.setName("modifier");
   
    SBMLWriter.write(doc, System.out, ' ', (short) 2);
    System.out.println('\n');
  }
View Full Code Here


    R = null;
  }

  @Test public void test_Reaction_addModifier()
  {
    ModifierSpeciesReference msr = new  ModifierSpeciesReference(2,4);
    msr.setSpecies( "s");
    R.addModifier(msr);
    assertTrue( R.getReactantCount() == 0 );
    assertTrue( R.getProductCount() == 0 );
    assertTrue( R.getModifierCount() == 1 );
  }
View Full Code Here

  }
*/

  @Test public void test_Reaction_getModifier()
  {
    ModifierSpeciesReference msr1 = new  ModifierSpeciesReference(2,4);
    ModifierSpeciesReference msr2 = new  ModifierSpeciesReference(2,4);
    msr1.setSpecies( "M1");
    msr2.setSpecies( "M2");
    R.addModifier(msr1);
    R.addModifier(msr2);
    msr1 = null;
    msr2 = null;
    assertTrue( R.getReactantCount() == 0 );
    assertTrue( R.getProductCount() == 0 );
    assertTrue( R.getModifierCount() == 2 );
    msr1 = R.getModifier(0);
    msr2 = R.getModifier(1);
    assertTrue(msr1.getSpecies().equals( "M1"));
    assertTrue(msr2.getSpecies().equals( "M2"));
  }
View Full Code Here

    assertTrue(msr2.getSpecies().equals( "M2"));
  }

  @Test public void test_Reaction_getModifierById()
  {
    ModifierSpeciesReference msr1 = new  ModifierSpeciesReference(2,4);
    ModifierSpeciesReference msr2 = new  ModifierSpeciesReference(2,4);
    msr1.setSpecies( "M1");
    msr2.setSpecies( "M2");
    R.addModifier(msr1);
    R.addModifier(msr2);
    assertTrue( R.getReactantCount() == 0 );
    assertTrue( R.getProductCount() == 0 );
    assertTrue( R.getModifierCount() == 2 );
View Full Code Here

    sr2 = null;
  }

  @Test public void test_Reaction_removeModifier()
  {
    ModifierSpeciesReference o1,o2,o3;
    o1 = R.createModifier();
    o2 = R.createModifier();
    o3 = R.createModifier();
    o3.setSpecies("test");
    assertTrue( R.removeModifier(0).equals(o1) );
View Full Code Here

  }

  @Test
  public void test_Model_createModifier() {
    Reaction r;
    ModifierSpeciesReference msr;
    M.createReaction();
    M.createReaction();
    msr = M.createModifier();
    assertTrue(msr != null);
    assertTrue(M.getReactionCount() == 2);
View Full Code Here

              }
            }
          }
          if (reaction.isSetListOfModifiers()) {
            for (int j = 0; j < reaction.getModifierCount(); j++) {
              ModifierSpeciesReference modifierSpeciesReference = reaction
                  .getModifier(j);

              if (modifierSpeciesReference.isSetSpecies()
                  && !modifierSpeciesReference
                      .isSetSpeciesInstance()) {
                log4jLogger.warn(String.format("No Species matches the speciesID '%s' of %s.",
                    modifierSpeciesReference.getId(), modifierSpeciesReference.getElementName()));
              }
            }
          }
          if (reaction.isSetKineticLaw()) {
            KineticLaw kineticLaw = reaction.getKineticLaw();
View Full Code Here

            } else if (elementName
                .equals("modifierSpeciesReference")
                && list.getSBaseListType().equals(
                    ListOf.Type.listOfModifiers)
                && reaction.getLevel() > 1) {
              ModifierSpeciesReference modifierSpeciesReference = (ModifierSpeciesReference) newContextObject;
              reaction.addModifier(modifierSpeciesReference);

              return modifierSpeciesReference;
            } else {
              log4jLogger.warn("The element " + elementName + " is not recognized");
View Full Code Here

              setSpeciesReferenceSpecies(speciesReference, model);
            }
          }
          if (reaction.isSetListOfModifiers()) {
            for (int j = 0; j < reaction.getModifierCount(); j++) {
              ModifierSpeciesReference modifierSpeciesReference = reaction
                  .getModifier(j);

              setSpeciesReferenceSpecies(
                  modifierSpeciesReference, model);
            }
View Full Code Here

    R = null;
  }

  @Test public void test_Reaction_addModifier()
  {
    ModifierSpeciesReference msr = new  ModifierSpeciesReference(2,4);
    msr.setSpecies( "s");
    R.addModifier(msr);
    assertTrue( R.getNumReactants() == 0 );
    assertTrue( R.getNumProducts() == 0 );
    assertTrue( R.getNumModifiers() == 1 );
  }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ModifierSpeciesReference

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.