public class SBMLNetwork extends AbstractNetworkImpl
When you want to use a sbml model with events included, you have to call
registerEvents, since the event handling is treated by SBMLEventHandlerObservers which need to be attached to the Simulator.
| Constructor and Description |
|---|
SBMLNetwork(File file)
Creates a network from a sbmlfile.
|
SBMLNetwork(File file,
boolean ignoreExceptions)
Creates a network from a sbml file.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getInitialAmount(int species)
Gets the initial amount of the specified molecule species.
|
SBMLinterpreter |
getSbmlInterpreter() |
org.sbml.jsbml.Model |
getSBMLModel()
Gets the SBML model.
|
void |
registerEvents(Simulator sim)
Registers the
SBMLEventHandlerObserver for each event in the sbml file to the
Simulator. |
void |
saveToFile(File file)
Saves the current
SBMLNetwork to a file. |
void |
saveToFile(File file,
int level,
int version)
Saves the current
SBMLNetwork to a sbml file with given level and version. |
void |
setInitialAmount(int species,
long value)
Sets the initial amount of the specified molecule species.
|
getAmountManager, getAnnotationManager, getName, getNumReactions, getNumSpecies, getProducts, getPropensityCalculator, getReactants, getReactionName, getSpeciesByName, getSpeciesMapping, getSpeciesNamepublic SBMLNetwork(File file) throws FeatureNotSupportedException, IOException, XMLStreamException, org.sbml.jsbml.validator.ModelOverdeterminedException
file - SBML fileFeatureNotSupportedExceptionIOExceptionXMLStreamExceptionorg.sbml.jsbml.validator.ModelOverdeterminedExceptionpublic SBMLNetwork(File file, boolean ignoreExceptions) throws FeatureNotSupportedException, IOException, XMLStreamException, org.sbml.jsbml.validator.ModelOverdeterminedException
file - SBML fileignoreExceptions - wheter or not exceptions should be thrownFeatureNotSupportedExceptionIOExceptionXMLStreamExceptionorg.sbml.jsbml.validator.ModelOverdeterminedExceptionpublic void registerEvents(Simulator sim)
SBMLEventHandlerObserver for each event in the sbml file to the
Simulator.sim - the simulatorpublic long getInitialAmount(int species)
Networkspecies - index of the speciespublic void setInitialAmount(int species,
long value)
Networkspecies - index of the speciesvalue - initial amount of the speciespublic org.sbml.jsbml.Model getSBMLModel()
public void saveToFile(File file) throws IOException, XMLStreamException
SBMLNetwork to a file.file - the file to save the network inIOException - if the file cannot be writtenXMLStreamExceptionpublic void saveToFile(File file, int level, int version) throws IOException, XMLStreamException
SBMLNetwork to a sbml file with given level and version.file - the file to save the network inlevel - sbml levelversion - sbml versionIOException - if the file cannot be writtenXMLStreamExceptionpublic SBMLinterpreter getSbmlInterpreter()
Copyright © 2007–2021. All rights reserved.