Package org.sbml.jsbml

Examples of org.sbml.jsbml.SBMLReader


   *
   */
  @SuppressWarnings("deprecation")
@Test public void test_read_l2v1_assignment()
  {
    SBMLReader reader = new SBMLReader();
    SBMLDocument d = null;
    Model m;
    Compartment c;
    Species s;
    Parameter gp;
    LocalParameter lp;
    AssignmentRule ar;
    Reaction r;
    SpeciesReference sr;
    KineticLaw kl;
    UnitDefinition ud;
    Reaction r1;
    ListOf<Compartment> loc;
    Compartment c1;
    ListOf<Rule> lor;
    AssignmentRule ar1;
    ListOf<Parameter> lop;
    Parameter p1;
    ListOf<Species> los;
    Species s1;
    String filename = new String( DATA_FOLDER + "/libsbml-test-data/" );
    filename += "l2v1-assignment.xml";
    try {
    d = reader.readSBML(filename);
  } catch (IOException e) {
    e.printStackTrace();
    assert(false);
  } catch (XMLStreamException e) {
    e.printStackTrace();
View Full Code Here


   * Tries to validate biomodels file with id 228.
   */
  @Test public void checkConsistency() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v4/BIOMD0000000228.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);

    int nbErrors = doc.checkConsistency();

    System.out.println("Found " + nbErrors + " errors on Biomodels 228 with the unit checking turned off.");
   
View Full Code Here

   * Tries to validate biomodels file with id 025 with all checks on.
   */
  @Test public void checkConsistencyAllChecks() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000025.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);
   
    doc.setConsistencyChecks(SBMLValidator.CHECK_CATEGORY.UNITS_CONSISTENCY, true);
   
    int nbErrors = doc.checkConsistency();

View Full Code Here

   * Tries to validate biomodels file with id 228.
   */
  @Test public void checkConsistency228() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v4/BIOMD0000000228.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);
    try {
      int nbErrors = doc.checkConsistency();

      System.out.println("Found " + nbErrors + " errors on Biomodels 228 with the unit checking turned off.");

View Full Code Here

   * Tries to validate biomodels file with id 228.
   */
  @Test public void checkConsistency025() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000025.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);
    try {
      int nbErrors = doc.checkConsistency();

      System.out.println("Found " + nbErrors + " errors on Biomodels 025 with the unit checking turned off.");

View Full Code Here

      System.out.println("Usage: java validateSBML filename");
      System.exit(1);
    }

    String filename       = args[0];
    SBMLReader reader     = new SBMLReader();
    SBMLDocument document;
    long start, stop;

    start    = System.currentTimeMillis();
    document = reader.readSBML(filename);
    stop     = System.currentTimeMillis();

    if (document.getNumErrors() > 0)
    {
      print("Encountered the following errors while reading the SBML file:\n");
View Full Code Here

      System.out.println("Usage: java validateSBML filename");
      System.exit(1);
    }

    String filename       = args[0];
    SBMLReader reader     = new SBMLReader();
    SBMLDocument document;
    long start, stop;

    start    = System.currentTimeMillis();
    document = reader.readSBML(filename);
    stop     = System.currentTimeMillis();

    if (document.getNumErrors() > 0)
    {
      print("Encountered the following errors while reading the SBML file:\n");
View Full Code Here

        fileName, jsbmlWriteFileName);

      SBMLDocument testDocument;
      long afterRead = 0;
      try {
        testDocument = new SBMLReader().readSBMLFromFile(fileName);
        System.out.printf("Reading done\n");
        System.out.println(Calendar.getInstance().getTime());
        afterRead = Calendar.getInstance().getTimeInMillis();

        FBCModelPlugin fbcModel = (FBCModelPlugin) testDocument.getModel().getExtension(FBCConstants.namespaceURI);
View Full Code Here

   * Tries to validate biomodels file with id 228.
   */
  @Test public void checkConsistency() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v4/BIOMD0000000228.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);

    int nbErrors = doc.checkConsistency();

    System.out.println("Found " + nbErrors + " errors on Biomodels 228 with the unit checking turned off.");
   
View Full Code Here

   * Tries to validate biomodels file with id 025 with all checks on.
   */
  @Test public void checkConsistencyAllChecks() throws IOException, XMLStreamException {
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000025.xml";
   
    SBMLDocument doc = new SBMLReader().readSBML(fileName);
   
    doc.setConsistencyChecks(SBMLValidator.CHECK_CATEGORY.UNITS_CONSISTENCY, true);
   
    int nbErrors = doc.checkConsistency();

View Full Code Here

TOP

Related Classes of org.sbml.jsbml.SBMLReader

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.