Package org.sbml.jsbml.xml.stax

Examples of org.sbml.jsbml.xml.stax.SBMLReader


   */
  @Test public void readL1V1Rules() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {

    String fileName = DATA_FOLDER + "/libsbml-test-data/l1v1-rules.xml";
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 1 && doc.getVersion() == 1);
   
    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
View Full Code Here


   *            The path to an SBML file.
   */
  public JTreeOfSBML(String fileName) {
    super();
    try {
      SBMLDocument doc = new SBMLReader().readSBML(fileName);
      showGUI(doc);
    } catch (Exception exc) {
      exc.printStackTrace();
      JOptionPane.showMessageDialog(this, exc.getMessage(), exc
          .getClass().getSimpleName(), JOptionPane.ERROR_MESSAGE);
View Full Code Here

   */
  @SuppressWarnings("deprecation")
  @Test public void readL1V2Branch() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    String fileName = DATA_FOLDER + "/libsbml-test-data/l1v2-branch.xml";
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 1 && doc.getVersion() == 2);
   
    assertTrue(model.getLevel() == 1 && model.getVersion() == 2);
View Full Code Here

   * @throws InvalidPropertiesFormatException
   */
  @Test public void readL1V1Units() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    String fileName = DATA_FOLDER + "/libsbml-test-data/l1v1-units.xml";
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 1 && doc.getVersion() == 1);
   
    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
View Full Code Here

   */
  @Test public void readL1V1Rules() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {

    String fileName = DATA_FOLDER + "/libsbml-test-data/l1v1-rules.xml";
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 1 && doc.getVersion() == 1);
   
    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
View Full Code Here

    Reaction r;
    Species s;
    SpeciesReference sr;
    UnitDefinition ud;
    String filename = DATA_FOLDER + "/libsbml-test-data/l1v1-branch.xml";
    d = new SBMLReader().readSBML(filename);
    if (d == null)
      ;
    {
    }
    assertTrue(d.getLevel() == 1);
View Full Code Here

  @SuppressWarnings("deprecation")
  @Test public void read1() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    // URL fileUrl = this.getClass().getResource("./data/BIOMD0000000025.xml");
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000025.xml";
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 2 && doc.getVersion() == 1);
   
    // TODO : assertTrue(model.getLevel() == 2 && model.getVersion() == 1);
View Full Code Here

   * @throws InvalidPropertiesFormatException
   */
  @Test public void read2() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000227.xml";
   
    new SBMLReader().readSBMLFile(fileName);
  }
View Full Code Here

   * @throws InvalidPropertiesFormatException
   */
  @Test public void read3() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    String fileName = DATA_FOLDER + "/l2v4/BIOMD0000000228.xml"; // l2v4
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 2 && doc.getVersion() == 4);
   
    assertTrue(model.getId().equals(""));
View Full Code Here

   * @throws InvalidPropertiesFormatException
   */
  @Test public void read4() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
    String fileName = DATA_FOLDER + "/l2v4/BIOMD0000000229.xml"; // l2v4
   
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();
   
    assertTrue(doc.getLevel() == 2 && doc.getVersion() == 4);
   
    assertTrue(model.getId().equals("Ma2002_cAMP_oscillations"));
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.xml.stax.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.