org.sbml.jsbml
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.
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
areaUnitsID
Represents the 'areaUnits' XML attribute of a model element.
|
private java.lang.String |
conversionFactorID
Represents the 'conversionFactor' XML attribute of a model element.
|
private static java.lang.String |
COULD_NOT_CREATE_ELEMENT_MSG
Error message to indicate that an element could not be created.
|
private java.lang.String |
extentUnitsID
Represents the 'extentUnits' XML attribute of a model element.
|
private java.lang.String |
lengthUnitsID
Represents the 'lengthUnits' XML attribute of a model element.
|
private ListOf<Compartment> |
listOfCompartments
Represents the listOfCompartments subnode of a model element.
|
private ListOf<CompartmentType> |
listOfCompartmentTypes
Deprecated.
only valid in SBML Level 2 for Versions 2 through 4.
|
private ListOf<Constraint> |
listOfConstraints
Represents the listOfConstraints subnode of a model element.
|
private ListOf<Event> |
listOfEvents
Represents the listOfEvents subnode of a model element.
|
private ListOf<FunctionDefinition> |
listOfFunctionDefinitions
Represents the listOfFunctionDefinitions subnode of a model element.
|
private ListOf<InitialAssignment> |
listOfInitialAssignments
Represents the listOfInitialAssignments subnode of a model element.
|
private ListOf<Parameter> |
listOfParameters
Represents the listOfParameters subnode of a model element.
|
private java.util.List<UnitDefinition> |
listOfPredefinedUnitDefinitions
Represents the list of predefined UnitDefinitions for a given SBML level
and version.
|
private ListOf<Reaction> |
listOfReactions
Represents the listOfReactions subnode of a model element.
|
private ListOf<Rule> |
listOfRules
Represents the listOfRules subnode of a model element.
|
private ListOf<Species> |
listOfSpecies
Represents the listOfSpecies subnode of a model element.
|
private ListOf<SpeciesType> |
listOfSpeciesTypes
Deprecated.
only valid in SBML Level 2 for Versions 2 through 4.
|
private ListOf<UnitDefinition> |
listOfUnitDefinitions
Represents the listOfUnitDefinitions sub-node of a model element.
|
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
private java.util.Map<java.lang.String,java.util.List<Reaction>> |
mapOfLocalParameters
A mapping between the identifiers of
LocalParameters and the
containing Reaction objects. |
private java.util.Map<java.lang.String,UniqueNamedSBase> |
mapOfUniqueNamedSBases
For internal computation: a mapping between their identifiers and
the
UniqueNamedSBases in Models themselves: |
private java.util.Map<java.lang.String,UnitDefinition> |
mapOfUnitDefinitions
A mapping between their identifiers and associated
UnitDefinition objects. |
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.String |
substanceUnitsID
Represents the 'substanceUnits' XML attribute of a model element.
|
private java.lang.String |
timeUnitsID
Represents the 'timeUnits' XML attribute of a model element.
|
private java.lang.String |
volumeUnitsID
Represents the 'volumeUnits' XML attribute of a model element.
|
ignoredExtensions, ignoredXMLElements, lvlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
Model()
Creates a Model instance.
|
Model(int level,
int version)
Creates a Model instance.
|
Model(Model model)
Creates a Model instance from a Model.
|
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.
|
| Modifier and Type | Method and 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.
|
private void |
addPredefinedUnits()
Adds all the possible unit kinds as
UnitDefinition, so that the
method getUnitDefinition(String) would be able to return a
valid UnitDefinition even if one of these kinds is passed as
parameter. |
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.
CompartmentTypes 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.
CompartmentTypes 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,
Compartment c)
|
Species |
createSpecies(java.lang.String id,
java.lang.String name,
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 idOrName)
Searches for an instance of
QuantityWithUnit within all of this
Model's components that has the given identifier or name attribute
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 KineticLaws 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
Compartments, Species, and
Parameters 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. |
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()
|
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
Compartments 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
Constraints 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()
|
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
EventAssignments 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
listOfFunstionDefinitions. |
FunctionDefinition |
getFunctionDefinition(java.lang.String id)
Returns the
FunctionDefinition of the listOfFunctionDefinitions
which has 'id' as id. |
int |
getFunctionDefinitionCount()
Returns the number of
FunctionDefinitions of this Model. |
InitialAssignment |
getInitialAssignment(int n)
Gets the nth
InitialAssignment object in this Model. |
InitialAssignment |
getInitialAssignment(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
InitialAssignments of this Model. |
int |
getKineticLawCount()
Returns the number of
KineticLaws of this Model. |
private <T> T |
getLastElementOf(ListOf<? extends T> listOf)
Returns the last element added in the given list.
|
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() |
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
ModifierSpeciesReferences in the
Model. |
java.util.Set<ModifierSpeciesReference> |
getModifierSpeciesReferences()
Returns all
ModifierSpeciesReferences, registered in
any Reaction. |
int |
getNamedSBaseCount()
Returns the number of
NamedSBases in the Model, so elements
that can have a name. |
int |
getNamedSBaseWithDerivedUnitCount() |
int |
getNumCompartments()
Returns the number of
Compartments of this Model. |
int |
getNumCompartmentTypes()
Deprecated.
|
int |
getNumConstraints()
Returns the number of
Constraints of this Model. |
int |
getNumDelays()
|
int |
getNumEventAssignments()
Returns the number of
EventAssignments of this Model. |
int |
getNumEvents()
|
int |
getNumFunctionDefinitions()
Returns the number of
FunctionDefinitions of this Model. |
int |
getNumInitialAssignments()
Returns the number of
InitialAssignments of this Model. |
int |
getNumKineticLaws()
Returns the number of
KineticLaws 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
ModifierSpeciesReferences in the
Model. |
int |
getNumNamedSBases()
Returns the number of
NamedSBases in the Model, so elements
that can have a name. |
int |
getNumNamedSBasesWithDerivedUnit()
Returns the number of
NamedSBaseWithDerivedUnits 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
QuantityWithUnits of this Model. |
int |
getNumReactions()
|
int |
getNumRules()
|
int |
getNumSBases()
|
int |
getNumSBasesWithDerivedUnit()
Returns the number of
SBaseWithDerivedUnits of this Model. |
int |
getNumSpecies()
|
int |
getNumSpeciesReferences()
Returns the number of
SpeciesReferences of this Model. |
int |
getNumSpeciesTypes()
Deprecated.
|
int |
getNumSpeciesWithBoundaryCondition()
Returns the number of
Species whose boundary condition is set to
true. |
int |
getNumStoichiometryMath()
Returns the number of
StoichiometryMath in the Model. |
int |
getNumSymbols()
Returns the number of all instances of
Symbol referenced within the
model. |
int |
getNumTriggers()
|
int |
getNumUnitDefinitions()
Returns the number of
UnitDefinitions 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
QuantityWithUnits of this Model. |
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)
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()
|
int |
getSBaseCount()
|
int |
getSBaseWithDerivedUnitCount()
Returns the number of
SBaseWithDerivedUnits 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
SpeciesReferences 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()
Returns the number of
StoichiometryMath in the Model. |
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. |
int |
getUnitDefinitionCount()
Returns the number of
UnitDefinitions 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 unit 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()
This method can be used to query if the identifier of this
NamedSBase is required to be defined (i.e., not null)
in the definition of SBML. |
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)
|
private boolean |
registerId(KineticLaw kl,
LocalParameter lp,
boolean delete,
boolean alreadyRegisteredInKL)
Registration of
LocalParameter instances in the Model. |
private boolean |
registerId(UniqueNamedSBase unsb,
boolean delete) |
private boolean |
registerId(UnitDefinition ud,
boolean add)
Registers the identifier and the corresponding
UnitDefinition
itself
in this Model. |
private boolean |
registerIds(SBase parent,
SBase newElem,
boolean recursively,
boolean delete,
java.util.List<IdManager> idManagerList)
Registers the given element in this
Model. |
private <T extends UniqueNamedSBase> |
remove(java.lang.Class<T> clazz,
java.lang.String id)
Removes the element with the given id from this model if such an element
can be found.
|
<T extends UniqueNamedSBase> |
remove(java.lang.String id)
Removes any
UniqueNamedSBase with the given identifier from this
Model and returns the removed element if the operation was
successfull. |
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)
|
boolean |
removeParameter(Parameter parameter)
Removes the Parameter 'parameter' from this Model.
|
Parameter |
removeParameter(java.lang.String id)
|
Reaction |
removeReaction(int n)
|
boolean |
removeReaction(Reaction reac)
Removes a reaction from the model.
|
Reaction |
removeReaction(java.lang.String id)
|
Rule |
removeRule(int i)
|
boolean |
removeRule(Rule rule)
|
Rule |
removeRule(java.lang.String variableId)
|
Species |
removeSpecies(int i)
|
boolean |
removeSpecies(Species spec)
Removes a species from the model.
|
Species |
removeSpecies(java.lang.String id)
|
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(Parameter conversionFactor)
|
void |
setConversionFactor(java.lang.String conversionFactorID)
Sets the conversionFactorID of this
Model to
'conversionFactorID'. |
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. |
checkIdentifier, getId, getName, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setLevelAndVersion, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, 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, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitgetId, getName, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate static final java.lang.String COULD_NOT_CREATE_ELEMENT_MSG
private static final transient org.apache.log4j.Logger logger
Logger for this class.private static final long serialVersionUID
private java.lang.String areaUnitsID
private java.lang.String conversionFactorID
private java.lang.String extentUnitsID
private java.lang.String lengthUnitsID
private ListOf<Compartment> listOfCompartments
@Deprecated private ListOf<CompartmentType> listOfCompartmentTypes
private ListOf<Constraint> listOfConstraints
private ListOf<Event> listOfEvents
private ListOf<FunctionDefinition> listOfFunctionDefinitions
private ListOf<InitialAssignment> listOfInitialAssignments
private ListOf<Parameter> listOfParameters
private java.util.List<UnitDefinition> listOfPredefinedUnitDefinitions
private ListOf<Reaction> listOfReactions
private ListOf<Species> listOfSpecies
@Deprecated private ListOf<SpeciesType> listOfSpeciesTypes
private ListOf<UnitDefinition> listOfUnitDefinitions
private java.util.Map<java.lang.String,java.util.List<Reaction>> mapOfLocalParameters
LocalParameters and the
containing Reaction objects.private java.util.Map<java.lang.String,UniqueNamedSBase> mapOfUniqueNamedSBases
UniqueNamedSBases in Models themselves:private java.util.Map<java.lang.String,UnitDefinition> mapOfUnitDefinitions
UnitDefinition objects.private java.lang.String substanceUnitsID
private java.lang.String timeUnitsID
private java.lang.String volumeUnitsID
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.private void addPredefinedUnits()
UnitDefinition, so that the
method getUnitDefinition(String) would be able to return a
valid UnitDefinition even if one of these kinds is passed as
parameter.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()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic boolean containsCompartment(java.lang.String id)
true if this model contains a reference to a Compartment
with the given identifier.id - true 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 - true 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 - true 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 - true 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()
CompartmentTypes 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)
CompartmentTypes 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 - 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)
SBasepublic 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 - 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 - 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 Reactions
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.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.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
and returns it. There might be multiple instances of LocalParameter
with the same identifier or name, each located in different
Reactions. In this case, the first match will be returned. Note
that also global Parameter instances have a higher priority and are
returned first.id - Compartment, Species, SpeciesReference
or Parameter, or the first LocalParameter which has
'id' as id.findLocalParameters(String)public QuantityWithUnit findQuantityWithUnit(java.lang.String idOrName)
QuantityWithUnit within all of this
Model's components that has the given identifier or name attribute
and returns it. There might be multiple instances of LocalParameter
with the same identifier or name, each located in different
Reactions. In this case, the first match will be returned. Note
that also global Parameter instances have a higher priority and are
returned first.idOrName - findLocalParameters(String)public java.util.SortedSet<java.lang.String> findReactionsForLocalParameter(java.lang.String id)
SortedSet of identifiers of all Reaction elements
within
this Model whose KineticLaws 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 Reactions
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 Reactions
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)
Compartments, Species, and
Parameters for the element with the given identifier.id - Symbol element with the given identifier or null if there
is no such element.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.id - an id indicating an UniqueNamedSBase element of the
Model.UniqueNamedSBase element of the Model that has
the given 'id' as id or null if no element with this
'id' can be found.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 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.TreeNodegetAllowsChildren in class AbstractSBasepublic 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.TreeNodegetChildAt in class AbstractSBasepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractSBasepublic Compartment getCompartment(int n)
Compartment instance of the listOfCompartments.n - Compartment 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 - Compartment 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()
Compartments of this Model.Compartments of this Model.@Deprecated public CompartmentType getCompartmentType(int n)
n - indexnull 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 - listOfCompartmentTypes 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.CompartmentTypes of this Model.CompartmentTypes of this Model.public Constraint getConstraint(int n)
n - null if there are no
constraint defined or if the index n is too big or lower than zero.public int getConstraintCount()
Constraints of this Model.Constraints 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 Event getEvent(int n)
n - null 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 - Event 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()
EventAssignments of this Model.EventAssignments 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
listOfFunstionDefinitions.n - FunctionDefinition 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 - FunctionDefinition 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()
FunctionDefinitions of this Model.FunctionDefinitions of this Model.public InitialAssignment getInitialAssignment(int n)
InitialAssignment object in this Model.n - InitialAssignment of this Model. null if
the listOfInitialAssignments is not set.public InitialAssignment getInitialAssignment(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()
InitialAssignments of this Model.InitialAssignments of this Model.public int getKineticLawCount()
KineticLaws of this Model.KineticLaws of this Model.private <T> T getLastElementOf(ListOf<? extends T> listOf)
null is no element exist
for this type.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()
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()
ModifierSpeciesReferences in the
Model.ModifierSpeciesReferences in the
Model.public java.util.Set<ModifierSpeciesReference> getModifierSpeciesReferences()
ModifierSpeciesReferences, registered in
any Reaction.public int getNamedSBaseCount()
NamedSBases in the Model, so elements
that can have a name.NamedSBases in the Model, so elements
that can have a name.public int getNamedSBaseWithDerivedUnitCount()
public int getNumCompartments()
Compartments of this Model.Compartments of this Model.@Deprecated public int getNumCompartmentTypes()
CompartmentTypes of this Model.CompartmentTypes of this Model.public int getNumConstraints()
Constraints of this Model.Constraints of this Model.public int getNumEventAssignments()
EventAssignments of this Model.EventAssignments of this Model.public int getNumFunctionDefinitions()
FunctionDefinitions of this Model.FunctionDefinitions of this Model.public int getNumInitialAssignments()
InitialAssignments of this Model.InitialAssignments of this Model.public int getNumKineticLaws()
KineticLaws of this Model.KineticLaws of this Model.public int getNumLocalParameters()
public int getNumMathContainers()
Model .Model .MathContainerpublic int getNumModifierSpeciesReferences()
ModifierSpeciesReferences in the
Model.ModifierSpeciesReferences in the
Model.public int getNumNamedSBases()
NamedSBases in the Model, so elements
that can have a name.NamedSBases in the Model, so elements
that can have a name.public int getNumNamedSBasesWithDerivedUnit()
NamedSBaseWithDerivedUnits in the
Model, so elements that can have a name and a unit that can be
derived.NamedSBaseWithDerivedUnits in the
Model, so elements that can have a name and a unit that can
be derived.public int getNumQuantitiesWithUnit()
QuantityWithUnits of this Model.QuantityWithUnits of this Model.public int getNumSBasesWithDerivedUnit()
SBaseWithDerivedUnits of this Model.SBaseWithDerivedUnits of this Model.public int getNumSpeciesReferences()
SpeciesReferences of this Model.SpeciesReferences of this Model.@Deprecated public int getNumSpeciesTypes()
SpeciesTypes of this Model.SpeciesTypes of this Model.public int getNumSpeciesWithBoundaryCondition()
Species whose boundary condition is set to
true.Species whose boundary condition is set to
true.public int getNumStoichiometryMath()
StoichiometryMath in the Model.StoichiometryMath in the Model.public int getNumSymbols()
Symbol referenced within the
model. There is no dedicated list for Symbols. This is a convenient
method to support working with the model data structure.Compartments, Species, and
Parameters in the model.public int getNumUnitDefinitions()
UnitDefinitions of this Model.UnitDefinitions of this Model.public Parameter getParameter(int n)
public Parameter getParameter(java.lang.String id)
Parameter of the listOfParameters which has 'id' as idid - Parameter 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()
QuantityWithUnits of this Model.QuantityWithUnits of this Model.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 - Reaction 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 - an indexRule of the listOfRules. null if it doesn't exist.public ExplicitRule getRule(java.lang.String variable)
ExplicitRule within this
Model's listOfRules, whose variable attribute is set to
the value passed to this method.variable - null if no element with the required property exists.public int getSBaseWithDerivedUnitCount()
SBaseWithDerivedUnits of this Model.SBaseWithDerivedUnits of this Model.public Species getSpecies(int n)
Species object in this Model.n - an indexSpecies 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 - Species 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()
SpeciesReferences of this Model.SpeciesReferences of this Model.@Deprecated public SpeciesType getSpeciesType(int n)
SpeciesType object in this Model.n - indexSpeciesType 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 - SpeciesType 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.SpeciesTypes of this Model.SpeciesTypes of this Model.public int getSpeciesWithBoundaryConditionCount()
Species whose boundary condition is set to
true.Species whose boundary condition is set to
true.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 Symbols. This is a convenient
method to support working with the model data structure.Compartments, Species, and
Parameters 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 Modelpublic UnitDefinition getUnitDefinition(int n)
UnitDefinition object in this Model.n - UnitDefinition of this Model. Returns
null if there are no UnitDefinitions 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 - UnitDefinition of the listOfUnitDefinitionss
which has 'id' as id (or name depending on the level and version).
null if it doesn't exist.public int getUnitDefinitionCount()
UnitDefinitions of this Model.UnitDefinitions 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()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractNamedSBaseSBase instance.Object.hashCode()public boolean hasUnit(java.lang.String id)
true if this model has a reference to the unit with the given
identifier.id - true if this model has a reference to the unit with the given
identifier, false otherwise.public void initDefaults()
public void initDefaults(int level,
int version)
Modelpublic boolean isIdMandatory()
NamedSBaseNamedSBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBasetrue 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 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)
SBaseSBase.
If the given attribute name is not recognized, nothing is done and
false is returned.
readAttribute in interface SBasereadAttribute in class AbstractNamedSBaseattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.private boolean registerId(KineticLaw kl, LocalParameter lp, boolean delete, boolean alreadyRegisteredInKL)
LocalParameter instances in the Model.kl - the KineticLaw that contains the given
LocalParameterlp - the LocalParameter whose identifier is to be registered.delete - true in case of success, otherwise false.private boolean registerId(UniqueNamedSBase unsb, boolean delete)
unsb - recursively - delete - private boolean registerId(UnitDefinition ud, boolean add)
UnitDefinition
itself
in this Model.ud - the UnitDefinition to be registered.add - true if the operation was a success, false
otherwise.private boolean registerIds(SBase parent, SBase newElem, boolean recursively, boolean delete, java.util.List<IdManager> idManagerList)
Model.parent - newElem - recursively - delete - idManagerList - true if this operation was successfully performed,
false otherwise.private <T extends UniqueNamedSBase> T remove(java.lang.Class<T> clazz, java.lang.String id)
clazz - The desired type of the element to be removed, can be null.id - the identifier of the NamedSBase to be removed.null if no such
element
could be found or the action was not successful.public <T extends UniqueNamedSBase> T remove(java.lang.String id)
UniqueNamedSBase with the given identifier from this
Model and returns the removed element if the operation was
successfull. Note that this method cannot be used to remove
UnitDefinitions from this Model because
UnitDefinitions 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)
IdManagerunregister in interface IdManagertrue 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()
SBaseSBase 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 SBasewriteXMLAttributes in class AbstractNamedSBaseMap containing the XML attributes of this object.