java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, NamedSBase
, SBase
, UniqueNamedSBase
, UniqueSId
, IdManager
, TreeNodeWithChangeSupport
ModelDefinition
public class Model extends AbstractNamedSBase implements UniqueNamedSBase, IdManager
JSBML implementation of SBML's Model
construct.
In an SBML model definition, a single object of class Model
serves as
the overall container for the lists of the various model components. All of
the lists are optional, but if a given list container is present within the
model, the list must not be empty; that is, it must have length one or more.
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
Model() |
Creates a Model instance.
|
Model(int level,
int version) |
Creates a Model instance.
|
Model(java.lang.String id) |
Creates a Model instance from an id.
|
Model(java.lang.String id,
int level,
int version) |
Creates a Model instance from an id, level and version.
|
Model(Model model) |
Creates a Model instance from a Model.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
accept(SBase sbase) |
|
boolean |
addCompartment(Compartment compartment) |
Adds a Compartment instance to the listOfCompartments of this Model.
|
boolean |
addCompartmentType(CompartmentType compartmentType) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
addConstraint(Constraint constraint) |
Adds a
Constraint instance to the listOfConstraints of this
Model . |
boolean |
addEvent(Event event) |
Adds an
Event instance to the listOfEvents of this Model. |
boolean |
addFunctionDefinition(FunctionDefinition functionDefinition) |
Adds a
FunctionDefinition instance to the listOfFunctionDefinitions
of this Model . |
boolean |
addInitialAssignment(InitialAssignment initialAssignment) |
Adds an InitialAssignment instance to the listOfInitialAssignments of this
Model.
|
boolean |
addParameter(Parameter parameter) |
Adds a Parameter instance to the listOfParameters of this Model.
|
boolean |
addReaction(Reaction reaction) |
Adds a Reaction instance to the listOfReactions of this Model.
|
boolean |
addRule(Rule rule) |
Adds a Rule instance to the listOfRules of this Model.
|
boolean |
addSpecies(Species spec) |
Adds a Species instance to the listOfSpecies of this Model.
|
boolean |
addSpeciesType(SpeciesType speciesType) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
addUnitDefinition(UnitDefinition unitDefinition) |
|
java.lang.String |
addUnitDefinitionOrReturnIdenticalUnit(UnitDefinition units) |
Checks whether an identical
UnitDefinition like the given
UnitDefinition is already in this Model 's
listOfUnitDefinitions . |
Model |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
containsCompartment(java.lang.String id) |
Returns
true if this model contains a reference to a
Compartment
with the given identifier. |
boolean |
containsFunctionDefinition(java.lang.String id) |
Returns
true if this model contains a reference to a
FunctionDefinition with the given identifier. |
boolean |
containsParameter(java.lang.String id) |
Returns
true if this model contains a reference to a
Parameter with
the given identifier. |
boolean |
containsQuantity(Quantity quantity) |
|
boolean |
containsReaction(java.lang.String id) |
|
boolean |
containsSpecies(java.lang.String id) |
|
boolean |
containsUniqueNamedSBase(java.lang.String id) |
|
boolean |
containsUnitDefinition(java.lang.String units) |
|
AlgebraicRule |
createAlgebraicRule() |
Creates a new
AlgebraicRule inside this Model and returns
it. |
AssignmentRule |
createAssignmentRule() |
Creates a new
AssignmentRule inside this Model and returns
it. |
Compartment |
createCompartment() |
Creates a new
Compartment inside this Model and returns it. |
Compartment |
createCompartment(java.lang.String id) |
Creates a new
Compartment inside this Model and returns it. |
CompartmentType |
createCompartmentType() |
Deprecated.
CompartmentType s should no longer be used, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4. |
CompartmentType |
createCompartmentType(java.lang.String id) |
Deprecated.
CompartmentType s should no longer be used, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4. |
Constraint |
createConstraint() |
Creates a new
Constraint inside this Model and returns it. |
Delay |
createDelay() |
|
Event |
createEvent() |
|
Event |
createEvent(java.lang.String id) |
|
EventAssignment |
createEventAssignment() |
Creates a new
EventAssignment inside the last Event object
created in this Model , and returns a pointer to it. |
FunctionDefinition |
createFunctionDefinition() |
Creates a new
FunctionDefinition inside this Model and
returns it. |
FunctionDefinition |
createFunctionDefinition(java.lang.String id) |
Creates a new
FunctionDefinition inside this Model and
returns it. |
InitialAssignment |
createInitialAssignment() |
Creates a new
InitialAssignment inside this Model and
returns it. |
KineticLaw |
createKineticLaw() |
Creates a new
KineticLaw inside the last Reaction object
created in this Model , and returns a pointer to it. |
LocalParameter |
createKineticLawParameter() |
Creates a new local
LocalParameter inside the KineticLaw
object of the last Reaction created inside this Model , and
returns a pointer to it. |
LocalParameter |
createKineticParameter(java.lang.String id) |
Creates a new local
LocalParameter inside the KineticLaw
object of the last Reaction created inside this Model , and
returns a pointer to it. |
ModifierSpeciesReference |
createModifier() |
Creates a new
ModifierSpeciesReference object for a modifier
species inside the last Reaction object in this Model , and
returns a pointer to it. |
ModifierSpeciesReference |
createModifier(java.lang.String id) |
Creates a new
ModifierSpeciesReference with the specified 'id'. |
Parameter |
createParameter() |
|
Parameter |
createParameter(java.lang.String id) |
Creates a new
Parameter . |
SpeciesReference |
createProduct() |
Creates a new
SpeciesReference object for a product inside the last
Reaction object in this Model , and returns a pointer to it. |
SpeciesReference |
createProduct(java.lang.String id) |
Creates an instance of
SpeciesReference and adds it to the last
Reaction element that has been added to this Model . |
RateRule |
createRateRule() |
|
SpeciesReference |
createReactant() |
Creates a new
SpeciesReference object for a reactant inside the
last Reaction object in this Model , and returns a pointer
to it. |
SpeciesReference |
createReactant(java.lang.String id) |
Creates a new
SpeciesReference object, with the specified 'id', for
a reactant inside the last Reaction object in this Model ,
and returns a pointer to it. |
Reaction |
createReaction() |
|
Reaction |
createReaction(java.lang.String id) |
|
Species |
createSpecies() |
|
Species |
createSpecies(java.lang.String id) |
|
Species |
createSpecies(java.lang.String id,
java.lang.String name,
Compartment c) |
|
Species |
createSpecies(java.lang.String id,
Compartment c) |
|
SpeciesType |
createSpeciesType() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
SpeciesType |
createSpeciesType(java.lang.String id) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
Trigger |
createTrigger() |
|
Unit |
createUnit() |
Creates a new
Unit object within the last UnitDefinition
object created in this model and returns a pointer to it. |
Unit |
createUnit(Unit.Kind kind) |
Creates a new
Unit object within the last UnitDefinition
object created in this model and returns a pointer to it. |
UnitDefinition |
createUnitDefinition() |
Creates a new
UnitDefinition inside this Model and returns
it. |
UnitDefinition |
createUnitDefinition(java.lang.String id) |
Creates a new
UnitDefinition inside this Model and returns
it. |
boolean |
equals(java.lang.Object object) |
|
CallableSBase |
findCallableSBase(java.lang.String id) |
Returns a
CallableSBase element of the Model that has the
given 'id' as identifier or null if no element is found. |
UnitDefinition |
findIdentical(UnitDefinition unitDefinition) |
Searches the first
UnitDefinition within this Model 's
listOfUnitDefinitions that
is identical to the given UnitDefinition . |
java.util.List<LocalParameter> |
findLocalParameters(java.lang.String id) |
|
ModifierSpeciesReference |
findModifierSpeciesReference(java.lang.String id) |
|
NamedSBase |
findNamedSBase(java.lang.String id) |
Returns a
NamedSBase element of the model that has the given 'id'
as id or null if no element is found. |
NamedSBaseWithDerivedUnit |
findNamedSBaseWithDerivedUnit(java.lang.String id) |
Returns a
NamedSBaseWithDerivedUnit element of the Model
that has the given 'id' as id or null if no element is found. |
Quantity |
findQuantity(java.lang.String id) |
|
QuantityWithUnit |
findQuantityWithUnit(java.lang.String id) |
Searches for an instance of
QuantityWithUnit within all of this
Model 's components that has the given identifier (or name attribute for SBML level 1)
and returns it. |
java.util.SortedSet<java.lang.String> |
findReactionsForLocalParameter(java.lang.String id) |
Returns a
SortedSet of identifiers of all Reaction elements
within
this Model whose KineticLaw s contain a
LocalParameter that has the given 'id' or null if no
element cannot be found. |
SimpleSpeciesReference |
findSimpleSpeciesReference(java.lang.String id) |
|
SpeciesReference |
findSpeciesReference(java.lang.String id) |
|
Symbol |
findSymbol(java.lang.String id) |
Searches in the list of
Compartment s, Species , and
Parameter s for the element with the given identifier. |
UniqueNamedSBase |
findUniqueNamedSBase(java.lang.String id) |
Returns a
UniqueNamedSBase element that has the given 'id' within
this Model or null if no such element can be found. |
SBase |
findUniqueSBase(java.lang.String id) |
|
UnitDefinition |
findUnitDefinition(java.lang.String id) |
Returns a
UnitDefinition element that has the given 'id' within
this Model or null if no such element can be found. |
Variable |
findVariable(java.lang.String id) |
Searches the
Variable with the given identifier in this model. |
boolean |
getAllowsChildren() |
|
java.lang.String |
getAreaUnits() |
Returns the area units ID of this
Model . |
UnitDefinition |
getAreaUnitsInstance() |
|
AssignmentRule |
getAssignmentRuleByVariable(java.lang.String variable) |
Searches for the first instance of
AssignmentRule within this
Model 's listOfRules , whose variable attribute is set to
the value passed to this method. |
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
Compartment |
getCompartment(int n) |
Gets the nth
Compartment instance of the
listOfCompartments. |
Compartment |
getCompartment(java.lang.String id) |
Gets the
Compartment of the listOfCompartments which has 'id' as
id. |
int |
getCompartmentCount() |
Returns the number of
Compartment s of this Model . |
CompartmentType |
getCompartmentType(int n) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
CompartmentType |
getCompartmentType(java.lang.String id) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
int |
getCompartmentTypeCount() |
Deprecated.
using
CompartmentType is not recommended, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4. |
Constraint |
getConstraint(int n) |
Gets the nth Constraint object in this Model.
|
int |
getConstraintCount() |
Returns the number of
Constraint s of this Model . |
java.lang.String |
getConversionFactor() |
Returns the conversionFactor ID of this
Model . |
Parameter |
getConversionFactorInstance() |
Returns the Parameter instance which has the conversionFactorID of this
Model as id.
|
int |
getDelayCount() |
|
SBase |
getElementBySId(java.lang.String id) |
Returns an
SBase element of the model that has the given 'id'
as id or null if no element is found. |
Event |
getEvent(int n) |
Gets the nth Event object in this Model.
|
Event |
getEvent(java.lang.String id) |
Gets the
Event which as the given id as id. |
int |
getEventAssignmentCount() |
Returns the number of
EventAssignment s of this Model . |
int |
getEventCount() |
|
java.lang.String |
getExtentUnits() |
Returns the extent units ID of this
Model . |
UnitDefinition |
getExtentUnitsInstance() |
Returns the
UnitDefinition instance which has the extent units ID
of this Model as id. |
FunctionDefinition |
getFunctionDefinition(int n) |
Gets the nth
FunctionDefinition instance of the
listOfFunctionDefinitions. |
FunctionDefinition |
getFunctionDefinition(java.lang.String id) |
Returns the
FunctionDefinition of the
listOfFunctionDefinitions
which has 'id' as id. |
int |
getFunctionDefinitionCount() |
Returns the number of
FunctionDefinition s of this Model . |
InitialAssignment |
getInitialAssignment(int n) |
Gets the nth
InitialAssignment object in this
Model . |
InitialAssignment |
getInitialAssignment(java.lang.String symbol) |
Deprecated.
Since L3V2, every
SBase can have an id. Use either getInitialAssignmentById(String)
or getInitialAssignmentBySymbol(String) |
InitialAssignment |
getInitialAssignmentById(java.lang.String id) |
Returns the
InitialAssignment of the
listOfInitialAssignments whose id attribute,
has the given id as identifier. |
InitialAssignment |
getInitialAssignmentBySymbol(java.lang.String variable) |
Returns the
InitialAssignment of the
listOfInitialAssignments whose symbol attribute,
i.e., whose Variable has the given variable as
identifier. |
int |
getInitialAssignmentCount() |
Returns the number of
InitialAssignment s of this Model . |
int |
getKineticLawCount() |
Returns the number of
KineticLaw s of this Model . |
java.lang.String |
getLengthUnits() |
Returns the length units ID of this
Model . |
UnitDefinition |
getLengthUnitsInstance() |
Returns the length units of this
Model as a UnitDefinition . |
ListOf<Compartment> |
getListOfCompartments() |
Returns the listOfCompartments of this
Model . |
ListOf<CompartmentType> |
getListOfCompartmentTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
ListOf<Constraint> |
getListOfConstraints() |
Returns the listOfConstraints of this
Model . |
int |
getListOfCount() |
|
ListOf<Event> |
getListOfEvents() |
Returns the listOfEvents of this
Model . |
ListOf<FunctionDefinition> |
getListOfFunctionDefinitions() |
Returns the listOfFunctionDefinitions of this
Model . |
ListOf<InitialAssignment> |
getListOfInitialAssignments() |
Returns the listOfInitialAssignments of this
Model . |
ListOf<Parameter> |
getListOfParameters() |
Returns the
listOfParameters of this Model . |
java.util.List<UnitDefinition> |
getListOfPredefinedUnitDefinitions() |
Returns the list of predefined
UnitDefinition . |
ListOf<Reaction> |
getListOfReactions() |
Returns the listOfReactions of this
Model . |
ListOf<Rule> |
getListOfRules() |
Returns the listOfRules of this
Model . |
ListOf<Species> |
getListOfSpecies() |
Returns the
listOfSpecies of this Model . |
ListOf<SpeciesType> |
getListOfSpeciesTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
ListOf<UnitDefinition> |
getListOfUnitDefinitions() |
Returns the listOfUnitDefinitions of this
Model . |
int |
getLocalParameterCount() |
Returns the number of parameters that are contained within kineticLaws in
the reactions of this model.
|
int |
getMathContainerCount() |
Returns the number of elements that can contain math in the
Model . |
History |
getModelHistory() |
Deprecated.
|
int |
getModifierSpeciesReferenceCount() |
Returns the number of
ModifierSpeciesReference s in the
Model . |
java.util.Set<ModifierSpeciesReference> |
getModifierSpeciesReferences() |
Returns all
ModifierSpeciesReference s, registered in
any Reaction . |
int |
getNamedSBaseCount() |
Returns the number of
NamedSBase s in the Model , so elements
that can have a name in SBML L3V1 or below. |
int |
getNamedSBaseWithDerivedUnitCount() |
Returns the number of
NamedSBaseWithDerivedUnit s in the Model , so elements
that can have a name and a derived unit in SBML L3V1 or below. |
int |
getNumCompartments() |
Returns the number of
Compartment s of this Model . |
int |
getNumCompartmentTypes() |
Deprecated.
|
int |
getNumConstraints() |
Returns the number of
Constraint s of this Model . |
int |
getNumDelays() |
|
int |
getNumEventAssignments() |
Returns the number of
EventAssignment s of this Model . |
int |
getNumEvents() |
|
int |
getNumFunctionDefinitions() |
Returns the number of
FunctionDefinition s of this Model . |
int |
getNumInitialAssignments() |
Returns the number of
InitialAssignment s of this Model . |
int |
getNumKineticLaws() |
Returns the number of
KineticLaw s of this Model . |
int |
getNumListsOf() |
|
int |
getNumLocalParameters() |
Returns the number of parameters that are contained within kineticLaws in
the reactions of this model.
|
int |
getNumMathContainers() |
Returns the number of elements that can contain math in the
Model . |
int |
getNumModifierSpeciesReferences() |
Returns the number of
ModifierSpeciesReference s in the
Model . |
int |
getNumNamedSBases() |
Returns the number of
NamedSBase s in the Model , so elements
that can have a name. |
int |
getNumNamedSBasesWithDerivedUnit() |
Returns the number of
NamedSBaseWithDerivedUnit s in the
Model , so elements that can have a name and a unit that can be
derived. |
int |
getNumParameters() |
|
int |
getNumQuantities() |
|
int |
getNumQuantitiesWithUnit() |
Returns the number of
QuantityWithUnit s of this Model . |
int |
getNumReactions() |
|
int |
getNumRules() |
|
int |
getNumSBases() |
|
int |
getNumSBasesWithDerivedUnit() |
Returns the number of
SBaseWithDerivedUnit s of this Model . |
int |
getNumSpecies() |
|
int |
getNumSpeciesReferences() |
Returns the number of
SpeciesReference s of this Model . |
int |
getNumSpeciesTypes() |
Deprecated.
|
int |
getNumSpeciesWithBoundaryCondition() |
Returns the number of
Species whose boundary condition is set to
true . |
int |
getNumStoichiometryMath() |
Deprecated.
since SBML L3V1.
|
int |
getNumSymbols() |
Returns the number of all instances of
Symbol referenced within the
model. |
int |
getNumTriggers() |
|
int |
getNumUnitDefinitions() |
Returns the number of
UnitDefinition s of this Model . |
int |
getNumUnits() |
|
int |
getNumVariables() |
|
Parameter |
getParameter(int n) |
|
Parameter |
getParameter(java.lang.String id) |
Returns the
Parameter of the listOfParameters which has
'id' as id |
int |
getParameterCount() |
|
UnitDefinition |
getPredefinedUnitDefinition(java.lang.String unitKind) |
Returns a
UnitDefinition representing one of the predefined units
of SBML,
returns null if the given unit kind is not a valid one for the SBML
level
and version of this Model . |
int |
getQuantityCount() |
|
int |
getQuantityWithUnitCount() |
Returns the number of
QuantityWithUnit s of this Model . |
RateRule |
getRateRuleByVariable(java.lang.String variable) |
Searches for the first instance of
RateRule within this
Model 's listOfRules , whose variable attribute is set to
the value passed to this method. |
Reaction |
getReaction(int n) |
Gets the n-th
Reaction object in this Model. |
Reaction |
getReaction(java.lang.String id) |
Returns the
Reaction of the listOfReactions which has 'id'
as id. |
int |
getReactionCount() |
|
Rule |
getRule(int n) |
Gets the nth
Rule of the listOfRules. |
ExplicitRule |
getRule(java.lang.String variable) |
Deprecated.
Since L3V2 every
SBase can have an id. Use either getRuleById(String) or getRuleByVariable(String) . |
Rule |
getRuleById(java.lang.String id) |
Searches for the first instance of
Rule within this
Model 's listOfRules , whose id attribute is set to
the value passed to this method. |
ExplicitRule |
getRuleByVariable(java.lang.String variable) |
Searches for the first instance of
ExplicitRule within this
Model 's listOfRules , whose variable attribute is set to
the value passed to this method. |
int |
getRuleCount() |
|
SBase |
getSBaseById(java.lang.String id) |
Returns an
SBase element of the model that has the given 'id'
as id or null if no element is found. |
int |
getSBaseCount() |
|
int |
getSBaseWithDerivedUnitCount() |
Returns the number of
SBaseWithDerivedUnit s of this Model . |
Species |
getSpecies(int n) |
Gets the n-th
Species object in this Model. |
Species |
getSpecies(java.lang.String id) |
Gets the
Species of the listOfSpecies which has 'id' as
id. |
int |
getSpeciesCount() |
|
int |
getSpeciesReferenceCount() |
Returns the number of
SpeciesReference s of this Model . |
SpeciesType |
getSpeciesType(int n) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
SpeciesType |
getSpeciesType(java.lang.String id) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
int |
getSpeciesTypeCount() |
Deprecated.
the use of
SpeciesType is not recommended, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4. |
int |
getSpeciesWithBoundaryConditionCount() |
Returns the number of
Species whose boundary condition is set to
true . |
int |
getStoichiometryMathCount() |
Deprecated.
since SBML L3V1
|
java.lang.String |
getSubstanceUnits() |
Returns the substance units ID of this model.
|
UnitDefinition |
getSubstanceUnitsInstance() |
|
int |
getSymbolCount() |
Returns the number of all instances of
Symbol referenced within the
model. |
java.lang.String |
getTimeUnits() |
Returns the time units ID of this
Model . |
UnitDefinition |
getTimeUnitsInstance() |
Gets the
UnitDefinition representing the time units of this
Model . |
int |
getTriggerCount() |
|
int |
getUnitCount() |
|
UnitDefinition |
getUnitDefinition(int n) |
Gets the nth
UnitDefinition object in this Model
. |
UnitDefinition |
getUnitDefinition(java.lang.String id) |
Returns the
UnitDefinition of the listOfUnitDefinitions
which has 'id' as id. |
UnitDefinition |
getUnitDefinitionById(java.lang.String id) |
Returns a
UnitDefinition element that has the given 'id' within
this Model or null if no such element can be found. |
int |
getUnitDefinitionCount() |
Returns the number of
UnitDefinition s of this Model . |
int |
getVariableCount() |
|
java.lang.String |
getVolumeUnits() |
Returns the volume units ID of this
Model . |
UnitDefinition |
getVolumeUnitsInstance() |
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
boolean |
hasUnit(java.lang.String id) |
Returns
true if this model has a reference to the UnitDefinition with the
given identifier. |
void |
initDefaults() |
Initializes the default values using the current Level/Version
configuration.
|
void |
initDefaults(int level,
int version) |
Initializes the default values of the attributes of the
Model |
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
boolean |
isListOfCompartmentsEmpty() |
Checks if the listOfCompartments is
! |
boolean |
isListOfCompartmentTypesEmpty() |
Checks if the listOfCompartmentTypes is
! |
boolean |
isListOfConstraintsEmpty() |
Checks if the listOfConstraints is
! |
boolean |
isListOfEventsEmpty() |
Checks if the listOfEvents is
! |
boolean |
isListOfFunctionDefinitionsEmpty() |
Checks if the listOfFunctionDefinitions is
! |
boolean |
isListOfInitialAssignmentsEmpty() |
Checks if the listOfInitialAssignments is
! |
boolean |
isListOfParametersEmpty() |
Checks if the listOfParameters is
! |
boolean |
isListOfReactionsEmpty() |
Checks if the listOfReactions is
! |
boolean |
isListOfRulesEmpty() |
Checks if the listOfRules is
! |
boolean |
isListOfSpeciesEmpty() |
Checks if the listOfSpecies is
! |
boolean |
isListOfSpeciesTypesEmpty() |
Checks if the listOfSpeciesTypes is
! |
boolean |
isListOfUnitDefinitionEmpty() |
Checks if the listOfUnitDefinitions is
! |
boolean |
isSetAreaUnits() |
|
boolean |
isSetAreaUnitsInstance() |
|
boolean |
isSetConversionFactor() |
|
boolean |
isSetConversionFactorInstance() |
Returns
true if the Parameter which has the conversionFactorID of
this
Model as id is not null . |
boolean |
isSetExtentUnits() |
Returns
true if the extentUnitsID of this Model is not null
. |
boolean |
isSetExtentUnitsInstance() |
Returns
true if the UnitDefinition which has the extentUnitsID of
this
Model as id is not null . |
boolean |
isSetLengthUnits() |
Returns
true if the lengthUnitsID of this Model is not null
. |
boolean |
isSetLengthUnitsInstance() |
Returns
true if the UnitDefinition which has the lengthUnitsID of
this
Model as id is not null . |
boolean |
isSetListOfCompartments() |
Returns
true if the listOfCompartments of this Model is not
null and not
empty. |
boolean |
isSetListOfCompartmentTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
isSetListOfConstraints() |
Returns
true if the listOfConstraints of this Model is not
null and not
empty. |
boolean |
isSetListOfEvents() |
Returns
true if the listOfEvents of this Model is not null
and not empty. |
boolean |
isSetListOfFunctionDefinitions() |
Returns
true if the listOfFunctionDefinitions of this Model is not
null and
not empty. |
boolean |
isSetListOfInitialAssignments() |
Returns
true if the listOfInitialAssignments of this Model is not
null and
not empty. |
boolean |
isSetListOfParameters() |
Returns
true if the listOfParameters of this Model is not
null and not
empty. |
boolean |
isSetListOfReactions() |
Returns
true if the listOfReactions of this Model is not
null and not
empty. |
boolean |
isSetListOfRules() |
Returns
true if the listOfRules of this Model is not null
and not empty. |
boolean |
isSetListOfSpecies() |
Returns
true if the listOfSpecies of this Model is not null
and not empty. |
boolean |
isSetListOfSpeciesTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
isSetListOfUnitDefinitions() |
Returns
true if the listOfUnitDefinitions of this Model is not
null and not
empty. |
boolean |
isSetModelHistory() |
Deprecated.
|
boolean |
isSetSubstanceUnits() |
Returns
true if the substanceUnitsID of this Model is not
null . |
boolean |
isSetSubstanceUnitsInstance() |
Returns
true if the UnitDefinition which has the substanceUnitsID
of this
Model as id is not null . |
boolean |
isSetTimeUnits() |
|
boolean |
isSetTimeUnitsInstance() |
Returns
true if the UnitsDefinition which has the timeUnistID of
this Model
as id is not null . |
boolean |
isSetVolumeUnits() |
Returns
true if the volumeUnitsID of this Model is not null
. |
boolean |
isSetVolumeUnitsInstance() |
Returns
true if the UnitDefinition which has the volumeUnitsID of
this
Model as id is not null . |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
boolean |
register(SBase sbase) |
|
<T extends SBase> |
remove(java.lang.String id) |
Removes any
UniqueNamedSBase with the given identifier from this
Model and returns the removed element if the operation was
successful. |
Compartment |
removeCompartment(int i) |
Removes the i-th
Compartment of the Model . |
Compartment |
removeCompartment(java.lang.String id) |
Removes the
Compartment of the Model with 'id' as id. |
CompartmentType |
removeCompartmentType(int n) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
CompartmentType |
removeCompartmentType(java.lang.String id) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
Constraint |
removeConstraint(int n) |
Removes the n-th
Constraint of the Model . |
Event |
removeEvent(int n) |
|
Event |
removeEvent(java.lang.String id) |
|
FunctionDefinition |
removeFunctionDefinition(int n) |
Removes the n-th
FunctionDefinition of the Model . |
FunctionDefinition |
removeFunctionDefinition(java.lang.String id) |
Removes the
FunctionDefinition of the Model with 'id' as
id. |
InitialAssignment |
removeInitialAssignment(int n) |
Removes the n-th
InitialAssignment of the Model . |
Parameter |
removeParameter(int n) |
|
Parameter |
removeParameter(java.lang.String id) |
|
boolean |
removeParameter(Parameter parameter) |
Removes the Parameter 'parameter' from this Model.
|
Reaction |
removeReaction(int n) |
|
Reaction |
removeReaction(java.lang.String id) |
|
boolean |
removeReaction(Reaction reac) |
Removes a reaction from the model.
|
Rule |
removeRule(int i) |
|
Rule |
removeRule(java.lang.String variableId) |
|
boolean |
removeRule(Rule rule) |
|
Species |
removeSpecies(int i) |
|
Species |
removeSpecies(java.lang.String id) |
|
boolean |
removeSpecies(Species spec) |
Removes a species from the model.
|
SpeciesType |
removeSpeciesType(int n) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
SpeciesType |
removeSpeciesType(java.lang.String id) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
UnitDefinition |
removeUnitDefinition(int n) |
Removes the n-th
UnitDefinition of the Model . |
UnitDefinition |
removeUnitDefinition(java.lang.String id) |
Removes the
UnitDefinition of the Model with 'id' as id. |
boolean |
removeUnitDefinition(UnitDefinition unitDefininition) |
Removes a
UnitDefinition of the Model . |
void |
setAreaUnits(java.lang.String areaUnitsID) |
Sets the areaUnitsID of this
Model to 'areaUnitsID' |
void |
setAreaUnits(Unit.Kind kind) |
|
void |
setAreaUnits(UnitDefinition areaUnits) |
Sets the areaUnitsID of this
Model to the id of the
UnitDefinition 'areaUnits'. |
void |
setConversionFactor(java.lang.String conversionFactorID) |
Sets the conversionFactorID of this
Model to
'conversionFactorID'. |
void |
setConversionFactor(Parameter conversionFactor) |
|
void |
setExtentUnits(java.lang.String extentUnitsID) |
Sets the extendUnitsID of this
Model to 'extentUnitsID'. |
void |
setExtentUnits(Unit.Kind kind) |
|
void |
setExtentUnits(UnitDefinition extentUnits) |
Sets the extentUnitsID of this
Model to the id of the
UnitDefinition 'extentUnits'. |
void |
setLengthUnits(java.lang.String lengthUnitsID) |
Sets the lengthUnitsID of this
Model to 'lengthUnitsID'. |
void |
setLengthUnits(Unit.Kind kind) |
|
void |
setLengthUnits(UnitDefinition lengthUnits) |
Sets the lengthUnitsID of this
Model to the id of the
UnitDefinition 'lengthUnits'. |
void |
setListOfCompartments(ListOf<Compartment> listOfCompartments) |
Sets the listOfCompartments of this
Model to 'listOfCompartments'. |
void |
setListOfCompartmentTypes(ListOf<CompartmentType> listOfCompartmentTypes) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
void |
setListOfConstraints(ListOf<Constraint> listOfConstraints) |
Sets the listOfConstraints of this
Model to 'listOfConstraints'. |
void |
setListOfEvents(ListOf<Event> listOfEvents) |
Sets the listOfEvents of this
Model to 'listOfEvents'. |
void |
setListOfFunctionDefinitions(ListOf<FunctionDefinition> listOfFunctionDefinitions) |
Sets the listOfFunctionDefinitions of this
Model to
'listOfFunctionDefinitions'. |
void |
setListOfInitialAssignments(ListOf<InitialAssignment> listOfInitialAssignments) |
Sets the
listOfInitialAssignments of this Model to
'listOfInitialAssignments'. |
void |
setListOfParameters(ListOf<Parameter> listOfParameters) |
Sets the
listOfParameters of this Model to
'listOfParameters'. |
void |
setListOfReactions(ListOf<Reaction> listOfReactions) |
Sets the
listOfReactions of this Model to
'listOfReactions'. |
void |
setListOfRules(ListOf<Rule> listOfRules) |
Sets the
listOfRules of this Model to 'listOfRules'. |
void |
setListOfSpecies(ListOf<Species> listOfSpecies) |
Sets the listOfSpecies of this
Model to 'listOfSpecies'. |
void |
setListOfSpeciesTypes(ListOf<SpeciesType> listOfSpeciesTypes) |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
void |
setListOfUnitDefinitions(ListOf<UnitDefinition> listOfUnitDefinitions) |
Sets the listOfUnitDefinitions of this
Model to
'listOfUnitDefinitions'. |
void |
setModelHistory(History history) |
Deprecated.
|
void |
setSubstanceUnits(java.lang.String substanceUnitsID) |
Sets the
substanceUnitsID of this Model to
'substanceUnitsID' |
void |
setSubstanceUnits(Unit.Kind kind) |
|
void |
setSubstanceUnits(UnitDefinition substanceUnits) |
Sets the substanceUnitsID of this
Model to the id of
'substanceUnits'. |
void |
setTimeUnits(java.lang.String timeUnitsID) |
Sets the timeUnits of this
Model to 'timeUnistID' |
void |
setTimeUnits(Unit.Kind kind) |
Sets the
timeUnitsID of this Model to the given unit
kind. |
void |
setTimeUnits(UnitDefinition timeUnits) |
Sets the timeUnitsID of this
Model to the id of the
UnitDefinition 'timeUnits'. |
void |
setVolumeUnits(java.lang.String volumeUnitsID) |
Sets the volumeUnitsID of this
Model to 'volumeUnitsID' |
void |
setVolumeUnits(Unit.Kind kind) |
|
void |
setVolumeUnits(UnitDefinition volumeUnits) |
Sets the volumeUnitsID of this
Model to the id of the
UnitDefinition 'volumeUnits'. |
boolean |
unregister(SBase sbase) |
|
void |
unsetAreaUnits() |
|
void |
unsetConversionFactor() |
|
void |
unsetExtentUnits() |
|
void |
unsetLengthUnits() |
|
boolean |
unsetListOfCompartments() |
Removes the
listOfCompartments from this Model and
notifies all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfCompartmentTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
unsetListOfConstraints() |
Removes the
listOfConstraints from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfEvents() |
Removes the
listOfEvents from this Model and notifies all
registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfFunctionDefinitions() |
Removes the
listOfFunctionDefinitions from this Model and
notifies all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfInitialAssignments() |
Removes the
listOfInitialAssignments from this Model and
notifies all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfParameters() |
Removes the
listOfParameters from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfReactions() |
Removes the
listOfReactions from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfRules() |
Removes the
listOfRules from this Model and notifies all
registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfSpecies() |
Removes the
listOfSpecies from this Model and notifies all
registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfSpeciesTypes() |
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
boolean |
unsetListOfUnitDefinitions() |
Removes the
listOfUnitDefinitions from this Model and
notifies all registered instances of TreeNodeChangeListener . |
void |
unsetModelHistory() |
Deprecated.
|
void |
unsetSubstanceUnits() |
|
void |
unsetTimeUnits() |
Sets the timeUnitsID of this
Model to null . |
void |
unsetVolumeUnits() |
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
isValidId
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public Model()
null
.public Model(int level, int version)
level
- version
- public Model(Model model)
model
- public Model(java.lang.String id)
id
- public Model(java.lang.String id, int level, int version)
null
.id
- level
- version
- public boolean addCompartment(Compartment compartment)
compartment
- true
if the listOfCompartments
was changed as
a result of this call.@Deprecated public boolean addCompartmentType(CompartmentType compartmentType)
compartmentType
- true
if the listOfCompartmentTypes
was
changed as a result of this call.public boolean addConstraint(Constraint constraint)
Constraint
instance to the listOfConstraints of this
Model
.constraint
- true
if the listOfConstraints
was changed as
a result of this call.public boolean addEvent(Event event)
Event
instance to the listOfEvents of this Model.event
- true
if the listOfEvents
was changed as a
result of this call.PropertyNotAvailableException
- for inappropriate Level/Version combinations.public boolean addFunctionDefinition(FunctionDefinition functionDefinition)
FunctionDefinition
instance to the listOfFunctionDefinitions
of this Model
.functionDefinition
- true
if the listOfFunctionDefinitions
was
changed as a result of this call.public boolean addInitialAssignment(InitialAssignment initialAssignment)
initialAssignment
- true
if the listOfInitialAssignments
was
changed as a result of this call.public boolean addParameter(Parameter parameter)
parameter
- true
if the listOfParameters
was changed as a
result of this call.public boolean addReaction(Reaction reaction)
reaction
- true
if the listOfReactions
was changed as a
result of this call.public boolean addRule(Rule rule)
rule
- true
if the listOfRules
was changed as a
result of this call.public boolean addSpecies(Species spec)
spec
- true
if the listOfSpecies
was changed as a
result of this call.@Deprecated public boolean addSpeciesType(SpeciesType speciesType)
speciesType
- true
if the listOfSpeciesTypes
was changed as
a result of this call.public boolean addUnitDefinition(UnitDefinition unitDefinition)
unitDefinition
- true
if the listOfUnitDefinitions
was changed
as a result of this call.public java.lang.String addUnitDefinitionOrReturnIdenticalUnit(UnitDefinition units)
UnitDefinition
like the given
UnitDefinition
is already in this Model
's
listOfUnitDefinitions
. If yes, the identifier of the identical
UnitDefinition
will be returned. Otherwise, the given unit is added
to the listOfUnitDefinitions
and its identifier will be returned.
In any case, this method returns the identifier of a UnitDefinition
that is part of this Model
at least after calling this method.units
- The unit to be checked and added if no identical
UnitDefinition
can be found.public Model clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public boolean containsCompartment(java.lang.String id)
true
if this model contains a reference to a
Compartment
with the given identifier.id
- the id to search fortrue
if this model contains a reference to a
Compartment
with the given identifier.public boolean containsFunctionDefinition(java.lang.String id)
true
if this model contains a reference to a
FunctionDefinition
with the given identifier.id
- the id to search fortrue
if this model contains a reference to a
FunctionDefinition
with the given identifier.public boolean containsParameter(java.lang.String id)
true
if this model contains a reference to a
Parameter
with
the given identifier.id
- the id to search fortrue
if this model contains a reference to a
Parameter
with
the given identifier.public boolean containsQuantity(Quantity quantity)
public boolean containsReaction(java.lang.String id)
public boolean containsSpecies(java.lang.String id)
public boolean containsUniqueNamedSBase(java.lang.String id)
id
- the id to search fortrue
if this Model
contains a reference to the
given
UniqueNamedSBase
.public boolean containsUnitDefinition(java.lang.String units)
units
- true
if this Model
contains a reference to the
given
UnitDefinition
.public AlgebraicRule createAlgebraicRule()
AlgebraicRule
inside this Model
and returns
it.
AlgebraicRule
object created
addRule(Rule r)
public AssignmentRule createAssignmentRule()
AssignmentRule
inside this Model
and returns
it.
AssignmentRule
object created
addRule(Rule r)
public Compartment createCompartment()
Compartment
inside this Model
and returns it.
Compartment
object created
addCompartment(Compartment c)
public Compartment createCompartment(java.lang.String id)
Compartment
inside this Model
and returns it.id
- the id of the new element to createCompartment
object created@Deprecated public CompartmentType createCompartmentType()
CompartmentType
s should no longer be used, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4.CompartmentType
inside this Model
and returns
it.
CompartmentType
object created
addCompartmentType(CompartmentType ct)
@Deprecated public CompartmentType createCompartmentType(java.lang.String id)
CompartmentType
s should no longer be used, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4.CompartmentType
inside this Model
and returns
it.id
- the id of the new element to createCompartmentType
object createdpublic Constraint createConstraint()
Constraint
inside this Model
and returns it.
Constraint
object created
addConstraint(Constraint c)
public Delay createDelay()
Delay
inside the last Event
object created in
this Model
, and returns a pointer to it.
The mechanism by which the last Event
object in this model was
created is not significant. It could have been created in a variety of
ways, for example by using createEvent(). If no Event
object exists
in this Model
object, a new Delay
is not created
and null
is returned instead.
Delay
object createdpublic Event createEvent(java.lang.String id)
id
- the id of the new element to createEvent
object createdpublic EventAssignment createEventAssignment()
EventAssignment
inside the last Event
object
created in this Model
, and returns a pointer to it.
The mechanism by which the last Event
object in this model was
created is not significant. It could have been created in a variety of
ways, for example by using createEvent(). If no Event
object exists
in this Model
object, a new EventAssignment
is not
created and null
is returned instead.
EventAssignment
object createdpublic FunctionDefinition createFunctionDefinition()
FunctionDefinition
inside this Model
and
returns it.
FunctionDefinition
object created
addFunctionDefinition(FunctionDefinition fd)
public FunctionDefinition createFunctionDefinition(java.lang.String id)
FunctionDefinition
inside this Model
and
returns it.id
- the id of the new element to createFunctionDefinition
object createdpublic InitialAssignment createInitialAssignment()
InitialAssignment
inside this Model
and
returns it.
InitialAssignment
object created
addInitialAssignment(InitialAssignment ia)
public KineticLaw createKineticLaw()
KineticLaw
inside the last Reaction
object
created in this Model
, and returns a pointer to it.
The mechanism by which the last Reaction
object was created and
added to this Model
is not significant. It could have been created
in a variety of ways, for example using createReaction(). If a
Reaction
does not exist for this model, or a Reaction
exists but already has a KineticLaw
, a new KineticLaw
is
not created and null
is returned instead.
KineticLaw
object createdpublic LocalParameter createKineticLawParameter()
LocalParameter
inside the KineticLaw
object of the last Reaction
created inside this Model
, and
returns a pointer to it.
The last KineticLaw
object in this Model
could have been
created in a variety of ways. For example, it could have been added using
createKineticLaw(), or it could be the result of using
Reaction.createKineticLaw() on the Reaction
object created by a
createReaction(). If a Reaction
does not exist for this model, or
the last Reaction
does not contain a KineticLaw
object, a
new LocalParameter
is not created and null
is
returned
instead.
LocalParameter
object createdpublic LocalParameter createKineticParameter(java.lang.String id)
LocalParameter
inside the KineticLaw
object of the last Reaction
created inside this Model
, and
returns a pointer to it.id
- the id of the new element to createLocalParameter
object createdpublic ModifierSpeciesReference createModifier()
ModifierSpeciesReference
object for a modifier
species inside the last Reaction
object in this Model
, and
returns a pointer to it.
The mechanism by which the last Reaction
object was created and
added to this Model
is not significant. It could have been created
in a variety of ways, for example using createReaction(). If a
Reaction
does not exist for this model, a new
ModifierSpeciesReference
is not created and null
is
returned instead.
SpeciesReference
object createdpublic ModifierSpeciesReference createModifier(java.lang.String id)
ModifierSpeciesReference
with the specified 'id'.id
- the id of the new element to createSpeciesReference
object createdpublic Parameter createParameter()
Parameter
object created
addParameter(Parameter p)
public Parameter createParameter(java.lang.String id)
Parameter
.id
- the id of the new element to createParameter
object createdpublic SpeciesReference createProduct()
SpeciesReference
object for a product inside the last
Reaction
object in this Model
, and returns a pointer to it.
The mechanism by which the last Reaction
object was created and
added to this Model
is not significant. It could have been created
in a variety of ways, for example using createReaction(). If a
Reaction
does not exist for this model, a new
SpeciesReference
is not created and null
is
returned
instead.
SpeciesReference
object createdpublic SpeciesReference createProduct(java.lang.String id)
SpeciesReference
and adds it to the last
Reaction
element that has been added to this Model
.id
- the product idSpeciesReference
public RateRule createRateRule()
RateRule
object created
addRule(Rule r)
public SpeciesReference createReactant()
SpeciesReference
object for a reactant inside the
last Reaction
object in this Model
, and returns a pointer
to it.
The mechanism by which the last Reaction
object was created and
added to this Model
is not significant. It could have been created
in a variety of ways, for example using createReaction(). If a
Reaction
does not exist for this model, a new
SpeciesReference
is not created and null
is
returned
instead.
SpeciesReference
object createdpublic SpeciesReference createReactant(java.lang.String id)
SpeciesReference
object, with the specified 'id', for
a reactant inside the last Reaction
object in this Model
,
and returns a pointer to it.id
- the id of the new element to createSpeciesReference
object created.public Reaction createReaction()
Reaction
object created
addReaction(Reaction r)
public Reaction createReaction(java.lang.String id)
id
- the id of the new element to createReaction
object createdpublic Species createSpecies()
Species
object created
addSpecies(Species s)
public Species createSpecies(java.lang.String id)
id
- the id of the new element to createSpecies
object createdpublic Species createSpecies(java.lang.String id, Compartment c)
public Species createSpecies(java.lang.String id, java.lang.String name, Compartment c)
@Deprecated public SpeciesType createSpeciesType()
SpeciesType
inside this Model
and returns it.
SpeciesType
object created
addSpeciesType(SpeciesType st)
@Deprecated public SpeciesType createSpeciesType(java.lang.String id)
SpeciesType
inside this Model
and returns it.id
- the id of the new element to createSpeciesType
object createdpublic Trigger createTrigger()
Trigger
inside the last Event
object created
in this Model
, and returns a pointer to it.
The mechanism by which the last Event
object in this model was
created is not significant. It could have been created in a variety of
ways, for example by using createEvent(). If no Event
object exists
in this Model
object, a new Trigger
is not created
and null
is returned instead.
Trigger
object createdpublic Unit createUnit()
Unit
object within the last UnitDefinition
object created in this model and returns a pointer to it.
The mechanism by which the UnitDefinition
was created is not
significant. If a UnitDefinition
object does not exist in this
model, a new Unit
is not created and null
is
returned
instead.
Unit
object created
addUnitDefinition(UnitDefinition ud)
public Unit createUnit(Unit.Kind kind)
Unit
object within the last UnitDefinition
object created in this model and returns a pointer to it.kind
- the kind of the new unit.Unit
object createdpublic UnitDefinition createUnitDefinition()
UnitDefinition
inside this Model
and returns
it.
UnitDefinition
object created
addUnitDefinition(UnitDefinition ud)
public UnitDefinition createUnitDefinition(java.lang.String id)
UnitDefinition
inside this Model
and returns
it.id
- the id of the new element to createUnitDefinition
object createdpublic boolean equals(java.lang.Object object)
SBase
public CallableSBase findCallableSBase(java.lang.String id)
CallableSBase
element of the Model
that has the
given 'id' as identifier or null
if no element is found.id
- an identifier indicating an element of the Model
.CallableSBase
element of the Model
that has the
given 'id' as id or null
if no element is found.public UnitDefinition findIdentical(UnitDefinition unitDefinition)
UnitDefinition
within this Model
's
listOfUnitDefinitions
that
is identical to the given UnitDefinition
. If no element can be
found that satisfies the method
UnitDefinition.areIdentical(UnitDefinition, UnitDefinition)
,
null
will be returned.unitDefinition
- a UnitDefinition
UnitDefinition
object that is already part of this
Model
's listOfUnitDefinitions
and satisfies the
condition of
UnitDefinition.areIdentical(UnitDefinition, UnitDefinition)
in comparison to the given UnitDefinition
, or
null
if no such element can be found.public java.util.List<LocalParameter> findLocalParameters(java.lang.String id)
id
- an id indicating a LocalParameter
element of the Model
.List
of all LocalParameter
instances with the
given name or identifier. This List
can be empty, but never
null
.public ModifierSpeciesReference findModifierSpeciesReference(java.lang.String id)
id
- the identifier of the ModifierSpeciesReference
of interest.
Note that this is not the identifier of the Species
instance
referred to by the ModifierSpeciesReference
.ModifierSpeciesReference
out of all Reaction
s
which has 'id' as id (or name depending on level and version).
null
if it doesn't exist.public NamedSBase findNamedSBase(java.lang.String id)
NamedSBase
element of the model that has the given 'id'
as id or null
if no element is found. This method will return
only elements that had an id before SBML L3V2.id
- an id indicating an element of the model.NamedSBase
element of the model that has the given 'id'
as id or null
if no element is found.getSBaseById(String)
public NamedSBaseWithDerivedUnit findNamedSBaseWithDerivedUnit(java.lang.String id)
NamedSBaseWithDerivedUnit
element of the Model
that has the given 'id' as id or null
if no element is found. It
first
tries to find a CallableSBase
with the given identifier and, if
this is not successful, it searches for an instance of Event
with
the given id.id
- an id indicating an element of the Model
.NamedSBaseWithDerivedUnit
element of the Model
that has the given 'id' as id or null
if no element is
found.findCallableSBase(String)
public Quantity findQuantity(java.lang.String id)
Quantity
within all of this
Model
's components that has the given identifier (or name attribute for SBML level 1)
and returns it. There might be multiple instances of LocalParameter
with the same identifier or name, each located in different
Reaction
s. In this case, the first match will be returned. Note
that also global Parameter
instances have a higher priority and are
returned first.id
- an id indicating an Quantity
element of the Model
.Compartment
, Species
, SpeciesReference
or Parameter
, or the first LocalParameter
which has
'id' as id.findLocalParameters(String)
public QuantityWithUnit findQuantityWithUnit(java.lang.String id)
QuantityWithUnit
within all of this
Model
's components that has the given identifier (or name attribute for SBML level 1)
and returns it. There might be multiple instances of LocalParameter
with the same identifier or name, each located in different
Reaction
s. In this case, the first match will be returned. Note
that also global Parameter
instances have a higher priority and are
returned first.id
- an id indicating a QuantityWithUnit
element of the
Model
.QuantityWithUnit
with the given idfindLocalParameters(String)
public java.util.SortedSet<java.lang.String> findReactionsForLocalParameter(java.lang.String id)
SortedSet
of identifiers of all Reaction
elements
within
this Model
whose KineticLaw
s contain a
LocalParameter
that has the given 'id' or null
if no
element cannot be found.id
- an id indicating an LocalParameter
element of the
Model
.SortedSet
of the identifiers of all Reaction
elements within this Model
whose KineticLaw
contains a LocalParameter
that has the given 'id' as id
or null
if no such element with this 'id' can be
found.public SimpleSpeciesReference findSimpleSpeciesReference(java.lang.String id)
id
- the identifier of the SimpleSpeciesReference
of interest.
Note that this is not the identifier of the Species
instance
referred to by the SimpleSpeciesReference
.SimpleSpeciesReference
out of all Reaction
s
which has 'id' as id (or name depending on level and version).
null
if it doesn't exist.public SpeciesReference findSpeciesReference(java.lang.String id)
id
- the identifier of the SpeciesReference
of interest.
Note that this is not the identifier of the Species
instance
referred to by the SpeciesReference
.SpeciesReference
out of all Reaction
s
which has 'id' as id (or name depending on level and version).
null
if it doesn't exist.public Symbol findSymbol(java.lang.String id)
Compartment
s, Species
, and
Parameter
s for the element with the given identifier.public UniqueNamedSBase findUniqueNamedSBase(java.lang.String id)
UniqueNamedSBase
element that has the given 'id' within
this Model
or null
if no such element can be found. This method will return
only elements that had an id before SBML L3V2.public SBase findUniqueSBase(java.lang.String id)
public UnitDefinition findUnitDefinition(java.lang.String id)
UnitDefinition
element that has the given 'id' within
this Model
or null
if no such element can be found.id
- an id indicating an UnitDefinition
element of the
Model
.UniqueNamedSBase
element of the Model
that has
the given 'id' as id or null
if no such element with
this 'id' can be found.public UnitDefinition getUnitDefinitionById(java.lang.String id)
UnitDefinition
element that has the given 'id' within
this Model
or null
if no such element can be found.id
- an id indicating an UnitDefinition
element of the
Model
.UniqueNamedSBase
element of the Model
that has
the given 'id' as id or null
if no such element with
this 'id' can be found.public Variable findVariable(java.lang.String id)
Variable
with the given identifier in this model.id
- The identifier of the Variable
of interest.Compartment
, Species
, SpeciesReference
,
or Parameter
, which has 'variable' as id.public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class AbstractSBase
public AssignmentRule getAssignmentRuleByVariable(java.lang.String variable)
AssignmentRule
within this
Model
's listOfRules
, whose variable attribute is set to
the value passed to this method.variable
- the variable to search for.null
if no AssignmentRule
with the required property exists.public java.lang.String getAreaUnits()
Model
.Model
. Returns an empty
String
if it is not set.public UnitDefinition getAreaUnitsInstance()
UnitDefinition
instance which has the
areaUnitsID
of
this Model
as id. null
if it doesn't exist.public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public Compartment getCompartment(int n)
Compartment
instance of the
listOfCompartments.n
- the index of the element to returnCompartment
instance of the
listOfCompartments.
null
if the listOfCompartments is not set.public Compartment getCompartment(java.lang.String id)
Compartment
of the listOfCompartments which has 'id' as
id.id
- the id of the element to returnCompartment
of the listOfCompartments which has 'id' as
id (or name depending on the version and level). null
if
the
listOfCompartments is not set.public int getCompartmentCount()
Compartment
s of this Model
.Compartment
s of this Model
.@Deprecated public CompartmentType getCompartmentType(int n)
n
- the index of the element to returnnull
if there are no
compartmentType defined or if the index n is too big or lower than
zero.@Deprecated public CompartmentType getCompartmentType(java.lang.String id)
CompartmentType
with the given id
.id
- the id of the element to returnlistOfCompartmentTypes
which
has 'id' as
id (or name depending on the level and version). null
if
the
listOfCompartmentTypes
is not set or the id is not found.@Deprecated public int getCompartmentTypeCount()
CompartmentType
is not recommended, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4.CompartmentType
s of this Model
.CompartmentType
s of this Model
.public Constraint getConstraint(int n)
n
- the index of the element to returnnull
if there are no
constraint defined or if the index n is too big or lower than zero.public int getConstraintCount()
Constraint
s of this Model
.Constraint
s of this Model
.public java.lang.String getConversionFactor()
Model
.Model
. Returns an empty
String
if it is not set.public Parameter getConversionFactorInstance()
null
if it doesn't existpublic SBase getElementBySId(java.lang.String id)
SBase
element of the model that has the given 'id'
as id or null
if no element is found.
The element has to have a unique
id (SId) in the model to be returned by this method, meaning
that it need to implement the interface UniqueSId
.
If you want to get an SBase
that is not in the SId namespace,
you can use the filter methods ( for example: AbstractTreeNode.filter(Filter)
)
using the IdFilter
filter.
getElementBySId
in interface SBase
getElementBySId
in class AbstractSBase
id
- an id indicating an element of the model.SBase
element of the model that has the given 'id'
as id or null
if no element is found.getSBaseById(String)
public Event getEvent(int n)
n
- the index of the element to returnnull
if
there are no event
defined or if the index n is too big or lower than zero.public Event getEvent(java.lang.String id)
Event
which as the given id
as id.id
- the id of the element to returnEvent
of the listOfEvents
which has 'id' as id
(or name depending on the level and version). null
if the
listOfEvents
is not set.public int getEventAssignmentCount()
EventAssignment
s of this Model
.EventAssignment
s of this Model
.public java.lang.String getExtentUnits()
Model
.Model
. Returns an empty
String
if it is not set.public UnitDefinition getExtentUnitsInstance()
UnitDefinition
instance which has the extent units ID
of this Model as id.UnitDefinition
instance which has the extent units ID
of this Model as id. null
if it doesn't existpublic FunctionDefinition getFunctionDefinition(int n)
FunctionDefinition
instance of the
listOfFunctionDefinitions.n
- the index of the element to returnFunctionDefinition
instance of the
listOfFunstionDefinitions. null
if the
listOfFunctionDefinitions
is not set.public FunctionDefinition getFunctionDefinition(java.lang.String id)
FunctionDefinition
of the
listOfFunctionDefinitions
which has 'id' as id.id
- the id of the element to returnFunctionDefinition
of the
listOfFunctionDefinitions
which has 'id' as id (or name depending on the level and version).
null
if the listOfFunctionDefinitions
is not set.public int getFunctionDefinitionCount()
FunctionDefinition
s of this Model
.FunctionDefinition
s of this Model
.public InitialAssignment getInitialAssignment(int n)
InitialAssignment
object in this
Model
.n
- the index of the element to returnInitialAssignment
of this Model
.
null
if
the listOfInitialAssignments is not set.@Deprecated public InitialAssignment getInitialAssignment(java.lang.String symbol)
SBase
can have an id. Use either getInitialAssignmentById(String)
or getInitialAssignmentBySymbol(String)
InitialAssignment
of the
listOfInitialAssignments
whose symbol
attribute,
i.e., whose Variable
has the given symbol
as
identifier.symbol
- The identifier of a Variable
, for which a corresponding
InitialAssignment
is requested.InitialAssignment
of the
listOfInitialAssignments
, whose Variable
has the
symbol
as identifier (or name depending on the level
and version). null
if it doesn't exist.public InitialAssignment getInitialAssignmentById(java.lang.String id)
InitialAssignment
of the
listOfInitialAssignments
whose id
attribute,
has the given id
as identifier.id
- the id of the requested InitialAssignment
InitialAssignment
of the
listOfInitialAssignments
, whose id
has the
given value, null
if it doesn't exist.public InitialAssignment getInitialAssignmentBySymbol(java.lang.String variable)
InitialAssignment
of the
listOfInitialAssignments
whose symbol
attribute,
i.e., whose Variable
has the given variable
as
identifier.variable
- The identifier of a variable, for which a corresponding
InitialAssignment
is requested.InitialAssignment
of the
listOfInitialAssignments
, whose Variable
has the
variable
as identifier (or name depending on the level
and version). null
if it doesn't exist.public int getInitialAssignmentCount()
InitialAssignment
s of this Model
.InitialAssignment
s of this Model
.public int getKineticLawCount()
KineticLaw
s of this Model
.KineticLaw
s of this Model
.public java.lang.String getLengthUnits()
Model
.Model
. Returns an empty
String
if it is not set.public UnitDefinition getLengthUnitsInstance()
Model
as a UnitDefinition
.UnitDefinition
instance which has the
lengthUnitsID
of this
Model
as id. null
if it doesn't exist.public ListOf<Compartment> getListOfCompartments()
Model
.Model
.@Deprecated public ListOf<CompartmentType> getListOfCompartmentTypes()
Model
.Model
.public ListOf<Constraint> getListOfConstraints()
Model
.Model
. set.public ListOf<Event> getListOfEvents()
Model
.Model
.public ListOf<FunctionDefinition> getListOfFunctionDefinitions()
Model
.Model
.public ListOf<InitialAssignment> getListOfInitialAssignments()
Model
.Model
.public ListOf<Parameter> getListOfParameters()
listOfParameters
of this Model
.listOfParameters
of this Model
.public java.util.List<UnitDefinition> getListOfPredefinedUnitDefinitions()
UnitDefinition
.UnitDefinition
.public ListOf<Reaction> getListOfReactions()
Model
.Model
.public ListOf<Rule> getListOfRules()
Model
.Model
.public ListOf<Species> getListOfSpecies()
listOfSpecies
of this Model
.listOfSpecies
of this Model
.@Deprecated public ListOf<SpeciesType> getListOfSpeciesTypes()
Model
.Model
.public ListOf<UnitDefinition> getListOfUnitDefinitions()
Model
.Model
.public int getLocalParameterCount()
public int getMathContainerCount()
Model
.Model
.MathContainer
@Deprecated public History getModelHistory()
SBase.getHistory()
History
of this model.History
of this model.SBase.getHistory()
public int getModifierSpeciesReferenceCount()
ModifierSpeciesReference
s in the
Model
.ModifierSpeciesReference
s in the
Model
.public java.util.Set<ModifierSpeciesReference> getModifierSpeciesReferences()
ModifierSpeciesReference
s, registered in
any Reaction
.ModifierSpeciesReference
contained in this
Model
.public int getNamedSBaseCount()
NamedSBase
s in the Model
, so elements
that can have a name in SBML L3V1 or below.NamedSBase
s in the Model
, so elements
that can have a name.public int getNamedSBaseWithDerivedUnitCount()
NamedSBaseWithDerivedUnit
s in the Model
, so elements
that can have a name and a derived unit in SBML L3V1 or below.NamedSBaseWithDerivedUnit
s in the Model
.public int getNumCompartments()
Compartment
s of this Model
.Compartment
s of this Model
.getCompartmentCount()
@Deprecated public int getNumCompartmentTypes()
CompartmentType
s of this Model
.CompartmentType
s of this Model
.getCompartmentTypeCount()
public int getNumConstraints()
Constraint
s of this Model
.Constraint
s of this Model
.getConstraintCount()
public int getNumDelays()
Delay
s of this Model
.getDelayCount()
public int getNumEventAssignments()
EventAssignment
s of this Model
.EventAssignment
s of this Model
.getEventAssignmentCount()
public int getNumEvents()
Event
s of this Model
.getEventCount()
public int getNumFunctionDefinitions()
FunctionDefinition
s of this Model
.FunctionDefinition
s of this Model
.getFunctionDefinitionCount()
public int getNumInitialAssignments()
InitialAssignment
s of this Model
.InitialAssignment
s of this Model
.getInitialAssignmentCount()
public int getNumKineticLaws()
KineticLaw
s of this Model
.KineticLaw
s of this Model
.getKineticLawCount()
public int getNumListsOf()
ListOf
s of this Model
.getListOfCount()
public int getNumLocalParameters()
getLocalParameterCount()
public int getNumMathContainers()
Model
.Model
.MathContainer
getMathContainerCount()
public int getNumModifierSpeciesReferences()
ModifierSpeciesReference
s in the
Model
.ModifierSpeciesReference
s in the
Model
.getModifierSpeciesReferenceCount()
public int getNumNamedSBases()
NamedSBase
s in the Model
, so elements
that can have a name.NamedSBase
s in the Model
, so elements
that can have a name.getNamedSBaseCount()
public int getNumNamedSBasesWithDerivedUnit()
NamedSBaseWithDerivedUnit
s in the
Model
, so elements that can have a name and a unit that can be
derived.NamedSBaseWithDerivedUnit
s in the
Model
, so elements that can have a name and a unit that can
be derived.getNamedSBaseWithDerivedUnitCount()
public int getNumParameters()
Parameter
s of this Model
.getParameterCount()
public int getNumQuantities()
Quantity
s of this Model
.getQuantityCount()
public int getNumQuantitiesWithUnit()
QuantityWithUnit
s of this Model
.QuantityWithUnit
s of this Model
.getQuantityWithUnitCount()
public int getNumReactions()
Reaction
s of this Model
.getReactionCount()
public int getNumRules()
Rule
s of this Model
.getRuleCount()
public int getNumSBases()
SBase
s of this Model
.getSBaseCount()
public int getNumSBasesWithDerivedUnit()
SBaseWithDerivedUnit
s of this Model
.SBaseWithDerivedUnit
s of this Model
.getSBaseWithDerivedUnitCount()
public int getNumSpecies()
Species
of this Model
.getSpeciesCount()
public int getNumSpeciesReferences()
SpeciesReference
s of this Model
.SpeciesReference
s of this Model
.getSpeciesReferenceCount()
@Deprecated public int getNumSpeciesTypes()
SpeciesType
s of this Model
.SpeciesType
s of this Model
.getSpeciesTypeCount()
public int getNumSpeciesWithBoundaryCondition()
Species
whose boundary condition is set to
true
.Species
whose boundary condition is set to
true
.getSpeciesWithBoundaryConditionCount()
@Deprecated public int getNumStoichiometryMath()
StoichiometryMath
in the Model
.StoichiometryMath
in the Model
.getStoichiometryMathCount()
public int getNumSymbols()
Symbol
referenced within the
model. There is no dedicated list for Symbol
s. This is a convenient
method to support working with the model data structure.Compartment
s, Species
, and
Parameter
s in the model.getSymbolCount()
public int getNumTriggers()
Trigger
of this Model
.getTriggerCount()
public int getNumUnitDefinitions()
UnitDefinition
s of this Model
.UnitDefinition
s of this Model
.getUnitDefinitionCount()
public int getNumUnits()
Unit
s of this Model
.getUnitCount()
public int getNumVariables()
Variable
s of this Model
.getVariableCount()
public Parameter getParameter(int n)
public Parameter getParameter(java.lang.String id)
Parameter
of the listOfParameters
which has
'id' as idid
- the id of the element to returnParameter
of the listOfParameters
which has
'id' as id
(or name depending on the level and version). null
if it
doesn't
exist.public UnitDefinition getPredefinedUnitDefinition(java.lang.String unitKind)
UnitDefinition
representing one of the predefined units
of SBML,
returns null
if the given unit kind is not a valid one for the SBML
level
and version of this Model
.unitKind
- a unit kind for one of the predefined units from the SBML
Specificationsnull
if the unitKind is invalid.public int getQuantityWithUnitCount()
QuantityWithUnit
s of this Model
.QuantityWithUnit
s of this Model
.public RateRule getRateRuleByVariable(java.lang.String variable)
RateRule
within this
Model
's listOfRules
, whose variable attribute is set to
the value passed to this method.variable
- the variable to search for.null
if no RateRule
with the required property exists.public Reaction getReaction(int n)
Reaction
object in this Model.n
- the reaction indexReaction
of this Model.public Reaction getReaction(java.lang.String id)
Reaction
of the listOfReactions
which has 'id'
as id.id
- the id of the element to returnReaction
of the listOfReactions
which has 'id'
as id
(or name depending on the level and version). null
if it
doesn't
exist.public Rule getRule(int n)
Rule
of the listOfRules.n
- the index of the element to returnRule
of the listOfRules. null
if
it doesn't exist.@Deprecated public ExplicitRule getRule(java.lang.String variable)
SBase
can have an id. Use either getRuleById(String)
or getRuleByVariable(String)
.ExplicitRule
within this
Model
's listOfRules
, whose variable attribute is set to
the value passed to this method.variable
- the variable to search for.null
if no element with the required property exists.public Rule getRuleById(java.lang.String id)
Rule
within this
Model
's listOfRules
, whose id attribute is set to
the value passed to this method.id
- the id of a rule.null
if no element with the required property exists.public ExplicitRule getRuleByVariable(java.lang.String variable)
ExplicitRule
within this
Model
's listOfRules
, whose variable attribute is set to
the value passed to this method.variable
- the variable to search for.null
if no element with the required property exists.public SBase getSBaseById(java.lang.String id)
SBase
element of the model that has the given 'id'
as id or null
if no element is found.
The element has to have a unique
id (SId) in the model to be returned by this method, meaning
that it need to implement the interface UniqueSId
.
If you want to get an SBase
that is not in the SId namespace,
you can use the filter methods (for example: AbstractTreeNode.filter(Filter)
)
using the IdFilter
filter.
id
- an id indicating an element of the model.SBase
element of the model that has the given 'id'
as id or null
if no element is found.public int getSBaseWithDerivedUnitCount()
SBaseWithDerivedUnit
s of this Model
.SBaseWithDerivedUnit
s of this Model
.public Species getSpecies(int n)
Species
object in this Model.n
- the index of the element to returnSpecies
with the given index if it exists,
null
otherwise.public Species getSpecies(java.lang.String id)
Species
of the listOfSpecies
which has 'id' as
id.id
- the id of the element to returnSpecies
of the listOfSpecies which has 'id' as id (or
name depending on the level and version). null
if
it doesn't exist.public int getSpeciesReferenceCount()
SpeciesReference
s of this Model
.SpeciesReference
s of this Model
.@Deprecated public SpeciesType getSpeciesType(int n)
SpeciesType
object in this Model.n
- the index of the element to returnSpeciesType
of this Model. Returns
null
if there
are no speciesType defined or if the index n is too big or lower
than zero.@Deprecated public SpeciesType getSpeciesType(java.lang.String id)
SpeciesType
of the listOfSpeciesTypes
which
has 'id' as
id.id
- the id of the element to returnSpeciesType
of the listOfSpeciesTypes
which
has 'id' as
id (or name depending on the level and version). null
if it
doesn't
exist.@Deprecated public int getSpeciesTypeCount()
SpeciesType
is not recommended, because this
data structure is only valid in SBML Level 2 for Versions 2
through 4.SpeciesType
s of this Model
.SpeciesType
s of this Model
.public int getSpeciesWithBoundaryConditionCount()
Species
whose boundary condition is set to
true
.Species
whose boundary condition is set to
true
.@Deprecated public int getStoichiometryMathCount()
StoichiometryMath
in the Model
.StoichiometryMath
in the Model
.public java.lang.String getSubstanceUnits()
String
if it is not set.public UnitDefinition getSubstanceUnitsInstance()
UnitDefinition
which has the substanceUnitsID
of this
Model
as id. null
if it doesn't exist.public int getSymbolCount()
Symbol
referenced within the
model. There is no dedicated list for Symbol
s. This is a convenient
method to support working with the model data structure.Compartment
s, Species
, and
Parameter
s in the model.public java.lang.String getTimeUnits()
Model
.Model
or an empty String
if it is not set.public UnitDefinition getTimeUnitsInstance()
UnitDefinition
representing the time units of this
Model
.UnitDefinition
representing the time units of this
Model
, null
if it is not defined in this
Model
public UnitDefinition getUnitDefinition(int n)
UnitDefinition
object in this Model
.n
- the index of the element to returnUnitDefinition
of this Model
.
Returns
null
if there are no UnitDefinition
s defined
or if the index n is too big or lower than zero.public UnitDefinition getUnitDefinition(java.lang.String id)
UnitDefinition
of the listOfUnitDefinitions
which has 'id' as id. If no UnitDefinition
are found, we check in
the
listOfPredefinedUnitDefinitions
. If we still did not find a
UnitDefinition
, null
is returned.id
- the id of the element to returnUnitDefinition
of the listOfUnitDefinitions
s
which has 'id' as id (or name depending on the level and version).
null
if it doesn't exist.public int getUnitDefinitionCount()
UnitDefinition
s of this Model
.UnitDefinition
s of this Model
.public java.lang.String getVolumeUnits()
Model
.Model
. Returns an empty
String
if it is not set.public UnitDefinition getVolumeUnitsInstance()
UnitDefinition
instance which has the
volumeUnitsID
of this Model
as id. null
if it doesn't exist.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public boolean hasUnit(java.lang.String id)
true
if this model has a reference to the UnitDefinition
with the
given identifier.id
- the id of the UnitDefinition
to search fortrue
if this model has a reference to the UnitDefinition
with the
given identifier, false
otherwise.public void initDefaults()
public void initDefaults(int level, int version)
Model
level
- the SBML levelversion
- the SBML versionpublic boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isListOfCompartmentsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfCompartmentTypesEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfConstraintsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfEventsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfFunctionDefinitionsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfInitialAssignmentsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfParametersEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfReactionsEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfRulesEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfSpeciesEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfSpeciesTypesEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isListOfUnitDefinitionEmpty()
!= null
, but has no
children.true
if list exists, but has no children,
false
otherwise.public boolean isSetAreaUnits()
true
if the area units ID of this Model
is not
null
.public boolean isSetAreaUnitsInstance()
true
if the UnitDefinition
which has the area units
ID of this Model
as id is not null
.public boolean isSetConversionFactor()
true
if the conversionFactorID
of this
Model
is not null
.public boolean isSetConversionFactorInstance()
true
if the Parameter which has the conversionFactorID of
this
Model as id is not null
.true
if the Parameter which has the conversionFactorID of
this
Model as id is not null
.public boolean isSetExtentUnits()
true
if the extentUnitsID of this Model is not null
.true
if the extentUnitsID of this Model is not null
.public boolean isSetExtentUnitsInstance()
true
if the UnitDefinition which has the extentUnitsID of
this
Model as id is not null
.true
if the UnitDefinition which has the extentUnitsID of
this
Model as id is not null
.public boolean isSetLengthUnits()
true
if the lengthUnitsID of this Model is not null
.true
if the lengthUnitsID of this Model is not null
.public boolean isSetLengthUnitsInstance()
true
if the UnitDefinition which has the lengthUnitsID of
this
Model as id is not null
.true
if the UnitDefinition which has the lengthUnitsID of
this
Model as id is not null
.public boolean isSetListOfCompartments()
true
if the listOfCompartments of this Model is not
null
and not
empty.true
if the listOfCompartments of this Model is not
null
and not
empty.@Deprecated public boolean isSetListOfCompartmentTypes()
true
if the listOfCompartmentTypes of this Model is not
null
and
not empty.true
if the listOfCompartmentTypes of this Model is not
null
and
not empty.public boolean isSetListOfConstraints()
true
if the listOfConstraints of this Model is not
null
and not
empty.true
if the listOfConstraints of this Model is not
null
and not
empty.public boolean isSetListOfEvents()
true
if the listOfEvents of this Model is not null
and not empty.true
if the listOfEvents of this Model is not null
and not empty.public boolean isSetListOfFunctionDefinitions()
true
if the listOfFunctionDefinitions of this Model is not
null
and
not empty.true
if the listOfFunctionDefinitions of this Model is not
null
and
not empty.public boolean isSetListOfInitialAssignments()
true
if the listOfInitialAssignments of this Model is not
null
and
not empty.true
if the listOfInitialAssignments of this Model is not
null
and
not empty.public boolean isSetListOfParameters()
true
if the listOfParameters of this Model is not
null
and not
empty.true
if the listOfParameters of this Model is not
null
and not
empty.public boolean isSetListOfReactions()
true
if the listOfReactions of this Model is not
null
and not
empty.true
if the listOfReactions of this Model is not
null
and not
empty.public boolean isSetListOfRules()
true
if the listOfRules of this Model is not null
and not empty.true
if the listOfRules of this Model is not null
and not empty.public boolean isSetListOfSpecies()
true
if the listOfSpecies of this Model is not null
and not empty.true
if the listOfSpecies of this Model is not null
and not empty.@Deprecated public boolean isSetListOfSpeciesTypes()
true
if the listOfSpeciesTypes of this Model is not
null
and not
empty.true
if the listOfSpeciesTypes of this Model is not
null
and not
empty.public boolean isSetListOfUnitDefinitions()
true
if the listOfUnitDefinitions of this Model is not
null
and not
empty.true
if the listOfUnitDefinitions of this Model is not
null
and not
empty.@Deprecated public boolean isSetModelHistory()
SBase.isSetHistory()
History
of the Model. This is equivalent to the call
SBase.isSetHistory()
.History
of the Model.public boolean isSetSubstanceUnits()
true
if the substanceUnitsID of this Model is not
null
.true
if the substanceUnitsID of this Model is not
null
.public boolean isSetSubstanceUnitsInstance()
true
if the UnitDefinition which has the substanceUnitsID
of this
Model as id is not null
.true
if the UnitDefinition which has the substanceUnitsID
of this
Model as id is not null
.public boolean isSetTimeUnits()
true
if the timeUnitsID of this Model
is not
null
.public boolean isSetTimeUnitsInstance()
true
if the UnitsDefinition which has the timeUnistID of
this Model
as id is not null
.true
if the UnitsDefinition which has the timeUnistID of
this Model
as id is not null
.public boolean isSetVolumeUnits()
true
if the volumeUnitsID of this Model is not null
.true
if the volumeUnitsID of this Model is not null
.public boolean isSetVolumeUnitsInstance()
true
if the UnitDefinition which has the volumeUnitsID of
this
Model as id is not null
.true
if the UnitDefinition which has the volumeUnitsID of
this
Model as id is not null
.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class AbstractSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public <T extends SBase> T remove(java.lang.String id)
UniqueNamedSBase
with the given identifier from this
Model
and returns the removed element if the operation was
successful. Note that this method cannot be used to remove
UnitDefinition
s from this Model
because
UnitDefinition
s exist in a separate namespace that might have
overlapping identifiers. It would therefore not be clear, which element
to remove in case of a identifier clash.id
- the identifier of the element that is to be removed from this model.null
if the operation was not
successful.public Compartment removeCompartment(int i)
Compartment
of the Model
.i
- the index of the Compartment
to removeCompartment
.public Compartment removeCompartment(java.lang.String id)
Compartment
of the Model
with 'id' as id.id
- Compartment
.@Deprecated public CompartmentType removeCompartmentType(int n)
CompartmentType
of the Model
.n
- the index of the Compartment
to removeCompartmentType
.@Deprecated public CompartmentType removeCompartmentType(java.lang.String id)
CompartmentType
of the Model
with 'id' as id.id
- public Constraint removeConstraint(int n)
Constraint
of the Model
.n
- public Event removeEvent(int n)
n
- public Event removeEvent(java.lang.String id)
id
- public FunctionDefinition removeFunctionDefinition(int n)
FunctionDefinition
of the Model
.n
- public FunctionDefinition removeFunctionDefinition(java.lang.String id)
FunctionDefinition
of the Model
with 'id' as
id.id
- public InitialAssignment removeInitialAssignment(int n)
InitialAssignment
of the Model
.n
- public Parameter removeParameter(int n)
n
- public boolean removeParameter(Parameter parameter)
parameter
- true
if the Parameter
was found and removed.public Parameter removeParameter(java.lang.String id)
id
- public Reaction removeReaction(int n)
n
- public boolean removeReaction(Reaction reac)
reac
- true
if the Reaction
was found and removed.public Reaction removeReaction(java.lang.String id)
id
- public Rule removeRule(int i)
i
- public Rule removeRule(java.lang.String variableId)
variableId
- public boolean removeRule(Rule rule)
public Species removeSpecies(int i)
i
- public boolean removeSpecies(Species spec)
spec
- true
if the Species
was found and removed.public Species removeSpecies(java.lang.String id)
id
- @Deprecated public SpeciesType removeSpeciesType(int n)
SpeciesType
of the Model
.n
- @Deprecated public SpeciesType removeSpeciesType(java.lang.String id)
SpeciesType
of the Model
with 'id' as id.id
- public UnitDefinition removeUnitDefinition(int n)
UnitDefinition
of the Model
.n
- public UnitDefinition removeUnitDefinition(java.lang.String id)
UnitDefinition
of the Model
with 'id' as id.id
- public boolean removeUnitDefinition(UnitDefinition unitDefininition)
UnitDefinition
of the Model
.unitDefininition
- true
if the UnitDefinition
'unitDefinition' has
been removed from the Model
.public void setAreaUnits(java.lang.String areaUnitsID)
Model
to 'areaUnitsID'areaUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setAreaUnits(Unit.Kind kind)
kind
- public void setAreaUnits(UnitDefinition areaUnits)
Model
to the id of the
UnitDefinition
'areaUnits'.areaUnits
- public void setConversionFactor(Parameter conversionFactor)
conversionFactor
- public void setConversionFactor(java.lang.String conversionFactorID)
Model
to
'conversionFactorID'.conversionFactorID
- PropertyNotAvailableException
- if Level < 3.public void setExtentUnits(java.lang.String extentUnitsID)
Model
to 'extentUnitsID'.extentUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setExtentUnits(Unit.Kind kind)
kind
- public void setExtentUnits(UnitDefinition extentUnits)
Model
to the id of the
UnitDefinition
'extentUnits'.extentUnits
- public void setLengthUnits(java.lang.String lengthUnitsID)
Model
to 'lengthUnitsID'.lengthUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setLengthUnits(Unit.Kind kind)
kind
- public void setLengthUnits(UnitDefinition lengthUnits)
Model
to the id of the
UnitDefinition 'lengthUnits'.lengthUnits
- public void setListOfCompartments(ListOf<Compartment> listOfCompartments)
Model
to 'listOfCompartments'.
Automatically sets the parentSBML objects of 'listOfCompartments' to this
Model.listOfCompartments
- @Deprecated public void setListOfCompartmentTypes(ListOf<CompartmentType> listOfCompartmentTypes)
Model
.listOfCompartmentTypes
- the listOfCompartmentTypes to setpublic void setListOfConstraints(ListOf<Constraint> listOfConstraints)
Model
to 'listOfConstraints'.
Automatically sets the parentSBML objects of 'listOfCanstraints' to this
Model.listOfConstraints
- the listOfConstraints to setpublic void setListOfEvents(ListOf<Event> listOfEvents)
Model
to 'listOfEvents'.
Automatically sets the parentSBML objects of 'listOfEvents' to this
Model
.listOfEvents
- public void setListOfFunctionDefinitions(ListOf<FunctionDefinition> listOfFunctionDefinitions)
Model
to
'listOfFunctionDefinitions'. Automatically sets the parentSBML objects of
'listOfFunctionDefinitions' to this Model.listOfFunctionDefinitions
- the listOfFunctionDefinitions to setpublic void setListOfInitialAssignments(ListOf<InitialAssignment> listOfInitialAssignments)
listOfInitialAssignments
of this Model
to
'listOfInitialAssignments'. Automatically sets the parentSBML objects of
'listOfInitialAssignments' to this Model.listOfInitialAssignments
- the listOfInitialAssignments to setpublic void setListOfParameters(ListOf<Parameter> listOfParameters)
listOfParameters
of this Model
to
'listOfParameters'. Automatically sets the parentSBML objects of
'listOfParameters' to this Model.listOfParameters
- public void setListOfReactions(ListOf<Reaction> listOfReactions)
listOfReactions
of this Model
to
'listOfReactions'. Automatically sets the parentSBML objects of
'listOfReactions' to this Model.listOfReactions
- public void setListOfRules(ListOf<Rule> listOfRules)
listOfRules
of this Model
to 'listOfRules'.
Automatically sets the parentSBML objects of 'listOfRules' to this Model.listOfRules
- public void setListOfSpecies(ListOf<Species> listOfSpecies)
Model
to 'listOfSpecies'.
Automatically sets the parentSBML objects of 'listOfSpecies' to this Model.listOfSpecies
- @Deprecated public void setListOfSpeciesTypes(ListOf<SpeciesType> listOfSpeciesTypes)
listOfSpeciesTypes
- the listOfSpeciesTypes to setpublic void setListOfUnitDefinitions(ListOf<UnitDefinition> listOfUnitDefinitions)
Model
to
'listOfUnitDefinitions'. Automatically sets the parentSBML objects of
'listOfUnitDefinitions' to this Model.listOfUnitDefinitions
- @Deprecated public void setModelHistory(History history)
AbstractSBase.setHistory(History)
history
- AbstractSBase.setHistory(History history)
public void setSubstanceUnits(java.lang.String substanceUnitsID)
substanceUnitsID
of this Model
to
'substanceUnitsID'substanceUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setSubstanceUnits(UnitDefinition substanceUnits)
Model
to the id of
'substanceUnits'.substanceUnits
- public void setSubstanceUnits(Unit.Kind kind)
kind
- public void setTimeUnits(java.lang.String timeUnitsID)
Model
to 'timeUnistID'timeUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setTimeUnits(UnitDefinition timeUnits)
Model
to the id of the
UnitDefinition
'timeUnits'.timeUnits
- public void setTimeUnits(Unit.Kind kind)
timeUnitsID
of this Model
to the given unit
kind.kind
- public void setVolumeUnits(java.lang.String volumeUnitsID)
Model
to 'volumeUnitsID'volumeUnitsID
- PropertyNotAvailableException
- if Level < 3.public void setVolumeUnits(Unit.Kind kind)
kind
- public void setVolumeUnits(UnitDefinition volumeUnits)
Model
to the id of the
UnitDefinition
'volumeUnits'.volumeUnits
- public boolean unregister(SBase sbase)
IdManager
unregister
in interface IdManager
true
if this operation was successfully performed,
false
otherwise.public void unsetAreaUnits()
public void unsetConversionFactor()
public void unsetExtentUnits()
public void unsetLengthUnits()
public boolean unsetListOfCompartments()
listOfCompartments
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.@Deprecated public boolean unsetListOfCompartmentTypes()
listOfCompartmentTypes
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfConstraints()
listOfConstraints
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfEvents()
listOfEvents
from this Model
and notifies all
registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfFunctionDefinitions()
listOfFunctionDefinitions
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfInitialAssignments()
listOfInitialAssignments
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfParameters()
listOfParameters
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfReactions()
listOfReactions
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfRules()
listOfRules
from this Model
and notifies all
registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfSpecies()
listOfSpecies
from this Model
and notifies all
registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.@Deprecated public boolean unsetListOfSpeciesTypes()
listOfSpeciesTypes
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfUnitDefinitions()
listOfUnitDefinitions
from this Model
and
notifies all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.@Deprecated public void unsetModelHistory()
AbstractSBase.unsetHistory()
.AbstractSBase.unsetHistory()
public void unsetSubstanceUnits()
public void unsetTimeUnits()
Model
to null
.public void unsetVolumeUnits()
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
SBase
that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes
in interface SBase
writeXMLAttributes
in class AbstractSBase
Map
containing the XML attributes of this object.