/** * * @param model */ public UnitsCompiler(Model model) { this(model.getLevel(), model.getVersion()); this.model = model; }
/** * * @param model */ public UnitsCompiler(Model model, ValidationContext ctx) { this(model.getLevel(), model.getVersion()); this.model = model; this.allowInvalidModel = true; this.ctx = ctx; }
/** * * @param model */ public UnitsCompiler(Model model, boolean allowInvalidModel) { this(model.getLevel(), model.getVersion()); this.model = model; this.allowInvalidModel = allowInvalidModel; }
/** * * @param model */ public UnitsCompiler(Model model) { this(model.getLevel(), model.getVersion()); this.model = model; }
/** * Initializes the default values using the current Level/Version * configuration. */ public void initDefaults() { initDefaults(getLevel(), getVersion()); }
/** * Creates a new {@link SpeciesType} inside this {@link Model} and returns it. * * @param id * the id of the new element to create * @return the {@link SpeciesType} object created * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. */ @Deprecated public SpeciesType createSpeciesType(String id) { SpeciesType speciesType = new SpeciesType(id, getLevel(), getVersion()); addSpeciesType(speciesType); return speciesType; }
/** * Creates a new {@link Parameter}. * * @param id * the id of the new element to create * @return the {@link Parameter} object created */ public Parameter createParameter(String id) { Parameter parameter = new Parameter(id, getLevel(), getVersion()); addParameter(parameter); return parameter; }
/** * Creates a new {@link Compartment} inside this {@link Model} and returns it. * * @param id * the id of the new element to create * @return the {@link Compartment} object created */ public Compartment createCompartment(String id) { Compartment compartment = new Compartment(id, getLevel(), getVersion()); addCompartment(compartment); return compartment; }
/** * Creates a new {@link Event} inside this {@link Model} and returns it. * * @param id * the id of the new element to create * @return the {@link Event} object created */ public Event createEvent(String id) { Event event = new Event(id, getLevel(), getVersion()); addEvent(event); return event; }
/** * Creates a new {@link Reaction} inside this {@link Model} and returns it. * * @param id * the id of the new element to create * @return the {@link Reaction} object created */ public Reaction createReaction(String id) { Reaction reaction = new Reaction(id, getLevel(), getVersion()); addReaction(reaction); return reaction; }
/** * Creates a new {@link Species} inside this {@link Model} and returns it. * * @param id * the id of the new element to create * @return the {@link Species} object created */ public Species createSpecies(String id) { Species species = new Species(id, getLevel(), getVersion()); addSpecies(species); return species; }
/** * Creates a new {@link RateRule} inside this {@link Model} and returns it. * <p> * * @return the {@link RateRule} object created * <p> * @see #addRule(Rule r) */ public RateRule createRateRule() { RateRule rule = new RateRule(getLevel(), getVersion()); addRule(rule); return rule; }
/** * Creates a new {@link Constraint} inside this {@link Model} and returns it. * <p> * * @return the {@link Constraint} object created * <p> * @see #addConstraint(Constraint c) */ public Constraint createConstraint() { Constraint constraint = new Constraint(getLevel(), getVersion()); addConstraint(constraint); return constraint; }
/** * Creates a new {@link UnitDefinition} inside this {@link Model} and returns * it. * * @param id * the id of the new element to create * @return the {@link UnitDefinition} object created */ public UnitDefinition createUnitDefinition(String id) { UnitDefinition unitDefinition = new UnitDefinition(id, getLevel(), getVersion()); addUnitDefinition(unitDefinition); return unitDefinition; }
/** * Creates a new {@link CompartmentType} inside this {@link Model} and returns * it. * * @param id * the id of the new element to create * @return the {@link CompartmentType} object created * @deprecated {@link CompartmentType}s should no longer be used, because this * data structure is only valid in SBML Level 2 for Versions 2 * through 4. */ @Deprecated public CompartmentType createCompartmentType(String id) { CompartmentType compartmentType = new CompartmentType(id, getLevel(), getVersion()); addCompartmentType(compartmentType); return compartmentType; }
/** * Creates a new {@link InitialAssignment} inside this {@link Model} and * returns it. * <p> * * @return the {@link InitialAssignment} object created * <p> * @see #addInitialAssignment(InitialAssignment ia) */ public InitialAssignment createInitialAssignment() { InitialAssignment initAssgmt = new InitialAssignment(getLevel(), getVersion()); addInitialAssignment(initAssgmt); return initAssgmt; }
/** * Creates a new {@link AlgebraicRule} inside this {@link Model} and returns * it. * <p> * * @return the {@link AlgebraicRule} object created * <p> * @see #addRule(Rule r) */ public AlgebraicRule createAlgebraicRule() { AlgebraicRule rule = new AlgebraicRule(getLevel(), getVersion()); addRule(rule); return rule; }
/** * Creates a new {@link AssignmentRule} inside this {@link Model} and returns * it. * <p> * * @return the {@link AssignmentRule} object created * <p> * @see #addRule(Rule r) */ public AssignmentRule createAssignmentRule() { AssignmentRule rule = new AssignmentRule(getLevel(), getVersion()); addRule(rule); return rule; }
/** * Creates a new {@link FunctionDefinition} inside this {@link Model} and * returns it. * * @param id * the id of the new element to create * @return the {@link FunctionDefinition} object created */ public FunctionDefinition createFunctionDefinition(String id) { FunctionDefinition functionDef = new FunctionDefinition(id, getLevel(), getVersion()); addFunctionDefinition(functionDef); return functionDef; }
/** * Creates a new {@link SpeciesType} inside this {@link Model} and returns it. * <p> * * @return the {@link SpeciesType} object created * <p> * @see #addSpeciesType(SpeciesType st) * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. * @sbml.deprecated only valid in SBML Level 2 for Versions 2 through 4. */ @Deprecated public SpeciesType createSpeciesType() { if ((getLevelAndVersion().compareTo(Integer.valueOf(2), Integer.valueOf(2)) < 0) || (getLevelAndVersion().compareTo(Integer.valueOf(3), Integer.valueOf(1)) >= 0)) { throw new SBMLTypeUndefinedException(SpeciesType.class, getLevel(), getVersion()); } return createSpeciesType(null); }