Package org.sbml.jsbml.xml.stax

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


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

   *            the MathML XML string.
   * @return an {@link ASTNode}
   */
  public static ASTNode readMathMLFromString(String xml) {
    try {
      return new SBMLReader().readMathML(xml);
    } catch (XMLStreamException e) {
      e.printStackTrace();
    }
   
    return null;
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

   *            the MathML XML string.
   * @return an {@link ASTNode}
   */
  public static ASTNode readMathMLFromString(String xml) {
    try {
      return new SBMLReader().readMathML(xml);
    } catch (XMLStreamException e) {
      e.printStackTrace();
    }
   
    return null;
View Full Code Here

  public void test_L3_Groups_read1() throws XMLStreamException,
  InvalidPropertiesFormatException, IOException,
  ClassNotFoundException {
    String fileName = DATA_FOLDER + "/groups/groups1.xml";

    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();

    System.out.println("Model extension objects: "
        + model.getExtension(GROUPS_NAMESPACE));
    GroupsModelPlugin extendedModel = (GroupsModelPlugin) model
View Full Code Here

  InstantiationException, IllegalAccessException,
  InvalidPropertiesFormatException, IOException,
  ClassNotFoundException, SBMLException, SAXException {
    String fileName = DATA_FOLDER + "/groups/groups1.xml";

    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);

    new SBMLWriter().write(doc, DATA_FOLDER + "/groups/groups1_write.xml");
  }
View Full Code Here

    {
      DATA_FOLDER = System.getProperty("user.dir") + "/extensions/layout/test/org/sbml/jsbml/xml/test/data";
    }
    String fileName = DATA_FOLDER + "/layout/GlycolysisLayout_small.xml";

    SBMLDocument doc = new SBMLReader().readSBMLFile(fileName);
    Model model = doc.getModel();

    System.out.println("Model extension objects: " + model.getExtension(LAYOUT_NAMESPACE));
    LayoutModelPlugin extendedModel = (LayoutModelPlugin) model.getExtension(LAYOUT_NAMESPACE);
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

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.