/** * Returns the number of {@link Reaction}s of this {@link Model}. * * @return the number of {@link Reaction}s of this {@link Model}. */ public int getReactionCount() { return isSetListOfReactions() ? listOfReactions.size() : 0; }
/** * Returns the number of {@link KineticLaw}s of this {@link Model}. * * @return the number of {@link KineticLaw}s of this {@link Model}. */ public int getKineticLawCount() { int count = 0; if (isSetListOfReactions()) { for (Reaction r : getListOfReactions()) { if (r.isSetKineticLaw()) { count++; } } } return count; }
/** * Returns the number of {@link ModifierSpeciesReference}s in the * {@link Model}. * * @return the number of {@link ModifierSpeciesReference}s in the * {@link Model}. */ public int getModifierSpeciesReferenceCount() { int count = 0; if (isSetListOfReactions()) { for (Reaction r : getListOfReactions()) { count += r.getModifierCount(); } } return count; }
/** * Returns all {@link ModifierSpeciesReference}s, registered in * any {@link Reaction}. * * @return all {@link ModifierSpeciesReference} contained in this * {@link Model}. */ public Set<ModifierSpeciesReference> getModifierSpeciesReferences() { Set<ModifierSpeciesReference> listOfModifiers = new HashSet<ModifierSpeciesReference>(); if (isSetListOfReactions()) { for (Reaction r : getListOfReactions()) { if (r.isSetListOfModifiers()) { listOfModifiers.addAll(r.getListOfModifiers()); } } } return listOfModifiers; }
/** * Returns the number of {@link SpeciesReference}s of this {@link Model}. * * @return the number of {@link SpeciesReference}s of this {@link Model}. */ public int getSpeciesReferenceCount() { int count = 0; if (isSetListOfReactions()) { for (Reaction r : getListOfReactions()) { count += r.getReactantCount() + r.getProductCount(); } } return count; }
public static boolean isSpeciesReference(Model m, String name) { if (m.isSetListOfReactions()) { for (Reaction r : m.getListOfReactions()) { if (r.getReactant(name) != null || r.getProduct(name) != null || r.getModifier(name) != null) { return true; } } } return false; }
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfReactions() || m.isListOfReactionsEmpty()) { return new UnknownElementValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfReactions()); } return true; } };
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfReactions() || m.isListOfReactionsEmpty()) { return new UnknownAttributeValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfReactions()); } return true; } };
/** * Returns the number of parameters that are contained within kineticLaws in * the reactions of this model. * * @return the number of parameters that are contained within kineticLaws in * the reactions of this model. */ public int getLocalParameterCount() { int count = 0; if (isSetListOfReactions()) { for (Reaction reaction : getListOfReactions()) { if (reaction.isSetKineticLaw()) { count += reaction.getKineticLaw().getLocalParameterCount(); } } } return count; }
/** * Returns the number of {@link StoichiometryMath} in the {@link Model}. * * @return the number of {@link StoichiometryMath} in the {@link Model}. * @deprecated since SBML L3V1 */ @Deprecated public int getStoichiometryMathCount() { int count = 0; if (isSetListOfReactions()) { for (Reaction r : getListOfReactions()) { for (SpeciesReference sr : r.getListOfReactants()) { if (sr.isSetStoichiometryMath()) { count++; } } for (SpeciesReference sr : r.getListOfProducts()) { if (sr.isSetStoichiometryMath()) { count++; } } } } return count; }
SBase child = m.isSetListOfReactions() ? m.getReaction(id) : null;
if (model.isSetListOfReactions()) { for (Reaction r : model.getListOfReactions()) { variable = new InnerNode<SBase>(r);
if (model.isSetListOfReactions()) { for (int i = 0; i < model.getReactionCount(); i++) { Reaction reaction = model.getReaction(i);
if (m.isSetListOfReactions()) { for (Reaction r: m.getListOfReactions())
setListOfConstraints(model.getListOfConstraints().clone()); if (model.isSetListOfReactions()) { setListOfReactions(model.getListOfReactions().clone());