Package org.sbml.jsbml

Examples of org.sbml.jsbml.Model.addExtension()


      if (model == null){
        System.err.println("Model missing in SBMLDocument.");
        return null;
      }
      layoutModel = new LayoutModelPlugin(model);
      model.addExtension(LAYOUT_NS, layoutModel);
    }
    return layoutModel;
  }
 
 
View Full Code Here


      if (model.getExtension(namespaceURI) != null) {
        compModel = (CompModelPlugin) model.getExtension(namespaceURI);
      } else {
        compModel = new CompModelPlugin(model);
        model.addExtension(namespaceURI, compModel);
      }

      if (elementName.equals(CompConstants.listOfSubmodels))
      {
        return compModel.getListOfSubmodels();
View Full Code Here

      if (model.getExtension(SpatialConstants.namespaceURI) != null) {
        spatialModel = (SpatialModelPlugin) model.getExtension(SpatialConstants.namespaceURI);
      } else {
        spatialModel = new SpatialModelPlugin(model);
        model.addExtension(SpatialConstants.namespaceURI, spatialModel);
      }
      if (elementName.equals(SpatialConstants.geometry)) {
        Geometry geometry = new Geometry();
        spatialModel.setGeometry(geometry);
        return geometry;
View Full Code Here

    Model model = d.createModel("testLayoutWriting");

    LayoutModelPlugin lModel = new LayoutModelPlugin(model);
    Layout layout = lModel.createLayout("layout");

    model.addExtension(LayoutConstants.namespaceURI, lModel);

    ReactionGlyph rg = new ReactionGlyph("react_r1", model.getLevel(), model.getVersion());

    SpeciesReferenceGlyph srg1 = rg.createSpeciesReferenceGlyph("srg_r1_s1", "SPG1");
    SpeciesReferenceGlyph srg2 = rg.createSpeciesReferenceGlyph("srg_r1_s2", "SPG2");
View Full Code Here

    model.getHistory().addModifiedDate(Calendar.getInstance().getTime());
    model.getAnnotation().addCVTerm(new CVTerm(CVTerm.Qualifier.BQB_IS, "urn:miriam:obo.go:GO%3A1234567"));

    QualitativeModel qModel = new QualitativeModel(model);

    model.addExtension(QUAL_NS_PREFIX, qModel);

    if (model.getExtension(QUAL_NS) == null) {
      System.out.println("!!!!!!! getting a plugin object using a namespace does not work");
    }
   
View Full Code Here

      Model model = (Model) contextObject;

      if (elementName.equals("listOfGroups")) {

        GroupsModelPlugin groupModelPlugin = new GroupsModelPlugin(model);
        model.addExtension(GroupsConstants.namespaceURI, groupModelPlugin);

        return groupModelPlugin.getListOfGroups();
      }
    } else if (contextObject instanceof Group) {
      Group group = (Group) contextObject;
View Full Code Here

      if (model.getExtension(FBCConstants.namespaceURI) != null) {
        fbcModel = (FBCModelPlugin) model.getExtension(FBCConstants.namespaceURI);
      } else {
        fbcModel = new FBCModelPlugin(model);
        model.addExtension(FBCConstants.namespaceURI, fbcModel);
      }

      if (elementName.equals(FBCList.listOfFluxBounds.name())) {

        ListOf<FluxBound> listOfFluxBounds = fbcModel.getListOfFluxBounds();
View Full Code Here

      Model model = (Model) contextObject;

      if (elementName.equals(listOfLayouts)) {

        LayoutModelPlugin layoutModel = new LayoutModelPlugin(model);
        model.addExtension(getNamespaceURI(), layoutModel);

        return layoutModel.getListOfLayouts();
      }
    }
    else if (contextObject instanceof Layout) {
View Full Code Here

      if (model.getExtension(namespaceURI) != null) {
        multiModel = (MultiModel) model.getExtension(namespaceURI);
      } else {
        multiModel = new MultiModel(model);
        model.addExtension(namespaceURI, multiModel);
      }

      if (elementName.equals(listOfSpeciesTypes))
      {
        return multiModel.getListOfSpeciesTypes();
View Full Code Here

   */
  public static void main(String[] args) throws SBMLException, XMLStreamException {
    SBMLDocument doc = new SBMLDocument(3, 1);
    Model m = doc.createModel("m1");
    LayoutModelPlugin elm = new LayoutModelPlugin(m);
    m.addExtension(LayoutConstants.getNamespaceURI(m.getLevel(), m.getVersion()), elm);
    Layout l1 = elm.createLayout("l1");
    l1.createCompartmentGlyph("test");
    RenderLayoutPlugin rlp = new RenderLayoutPlugin(l1);
    rlp.createLocalRenderInformation("info1");
    l1.addExtension(RenderConstants.namespaceURI, rlp);
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.