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 SBMLEventHandlerObserver
s 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, getSpeciesName
public SBMLNetwork(File file) throws FeatureNotSupportedException, IOException, XMLStreamException, org.sbml.jsbml.validator.ModelOverdeterminedException
file
- SBML fileFeatureNotSupportedException
IOException
XMLStreamException
org.sbml.jsbml.validator.ModelOverdeterminedException
public SBMLNetwork(File file, boolean ignoreExceptions) throws FeatureNotSupportedException, IOException, XMLStreamException, org.sbml.jsbml.validator.ModelOverdeterminedException
file
- SBML fileignoreExceptions
- wheter or not exceptions should be thrownFeatureNotSupportedException
IOException
XMLStreamException
org.sbml.jsbml.validator.ModelOverdeterminedException
public void registerEvents(Simulator sim)
SBMLEventHandlerObserver
for each event in the sbml file to the
Simulator.sim
- the simulatorpublic long getInitialAmount(int species)
Network
species
- index of the speciespublic void setInitialAmount(int species, long value)
Network
species
- 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 writtenXMLStreamException
public 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 writtenXMLStreamException
public SBMLinterpreter getSbmlInterpreter()
Copyright © 2007–2021. All rights reserved.