Package org.sbml.jsbml

Examples of org.sbml.jsbml.ModifierSpeciesReference


  }
*/

  @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.getNumReactants() == 0 );
    assertTrue( R.getNumProducts() == 0 );
    assertTrue( R.getNumModifiers() == 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.getNumReactants() == 0 );
    assertTrue( R.getNumProducts() == 0 );
    assertTrue( R.getNumModifiers() == 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.getNumReactions() == 2);
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

  }
*/

  @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.getNumReactants() == 0 );
    assertTrue( R.getNumProducts() == 0 );
    assertTrue( R.getNumModifiers() == 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.getNumReactants() == 0 );
    assertTrue( R.getNumProducts() == 0 );
    assertTrue( R.getNumModifiers() == 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

              }
            }
          }
          if (reaction.isSetListOfModifiers()) {
            for (int j = 0; j < reaction.getNumModifiers(); 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

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.