Examples of SBMLReader


Examples of org.sbml.jsbml.SBMLReader

   * 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

Examples of org.sbml.jsbml.SBMLReader

   * 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

Examples of org.sbml.jsbml.SBMLReader

  }
 
  /** @param args Expects a valid path to an SBML file. */
  public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    new JSBMLvisualizer((new SBMLReader()).readSBML(args[0]));
  }
View Full Code Here

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

  @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

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

   * @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

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

   * @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

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

   * @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

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

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

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

   * @throws SAXException
   */
  @Test public void write1() throws XMLStreamException, InstantiationException, IllegalAccessException, InvalidPropertiesFormatException, IOException, ClassNotFoundException, SBMLException, SAXException{
    String fileName = DATA_FOLDER + "/l2v1/BIOMD0000000025.xml";
 
    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
   
    String resultFileName = "biomd-025.xml";
   
    new SBMLWriter().write(doc, resultFileName);
  }
View Full Code Here

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

   *            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
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.