setModel(sb.getModel().clone()); } else { model = null;
/** * Creates a new instance of Model from id and the level and version of this * SBMLDocument. * * @param id * @return the new {@link Model} instance. */ public Model createModel(String id) { setModel(new Model(id, getLevel(), getVersion())); return getModel(); }
/** * Creates a new Model inside this {@link SBMLDocument}, and returns a * pointer to it. * In SBML Level 2, the use of an identifier on a {@link Model} object is * optional. This method takes an optional argument, sid, for setting the * identifier. If not supplied, the identifier attribute on the Model * instance is not set. * * @return the new {@link Model} instance. */ public Model createModel() { Model oldValue = getModel(); setModel(new Model(getLevel(), getVersion())); firePropertyChange(TreeNodeChangeEvent.model, oldValue, getModel()); return getModel(); }
this.flattenedModel.unsetPlugin(CompConstants.shortLabel); document.setModel(this.flattenedModel); document.unsetExtension(CompConstants.shortLabel); document.disablePackage(CompConstants.shortLabel);
model.setVersion(sbmlDocument.getVersion()); model.initDefaults(); sbmlDocument.setModel(model);