/** * Sets the {@link Type} of this {@link ListOf} instance to the {@link Type} * defined by the given {@link Class}. * * @param type a class instance */ public void setSBaseListType(Class<T> type) { setSBaseListType(Type.valueOf(type)); }
/** * Sets the given {@code ListOf<EventAssignment>}. If listOfEventAssignments * was defined before and contains some elements, they are all unset. * * @param listOfEventAssignments */ public void setListOfEventAssignments( ListOf<EventAssignment> listOfEventAssignments) { unsetListOfEventAssignments(); this.listOfEventAssignments = listOfEventAssignments; if (this.listOfEventAssignments != null) { this.listOfEventAssignments.setSBaseListType(ListOf.Type.listOfEventAssignments); registerChild(this.listOfEventAssignments); } }
/** * Sets the listOfModifiers of this {@link Reaction}. Automatically sets the * parentSBML object of the list to this {@link Reaction} instance. * * @param listOfModifiers */ public void setListOfModifiers(ListOf<ModifierSpeciesReference> listOfModifiers) { unsetListOfModifiers(); this.listOfModifiers = listOfModifiers; if ((this.listOfModifiers != null) && (this.listOfModifiers.getSBaseListType() != ListOf.Type.listOfModifiers)) { this.listOfModifiers.setSBaseListType(ListOf.Type.listOfModifiers); } registerChild(this.listOfModifiers); }
/** * Sets the {@link #listOfProducts} of this {@link Reaction}. Automatically sets the * parentSBML object of the list to this {@link Reaction} instance. * * @param listOfProducts */ public void setListOfProducts(ListOf<SpeciesReference> listOfProducts) { unsetListOfProducts(); this.listOfProducts = listOfProducts; if ((this.listOfProducts != null) && (this.listOfProducts.getSBaseListType() != ListOf.Type.listOfProducts)) { this.listOfProducts.setSBaseListType(ListOf.Type.listOfProducts); } registerChild(this.listOfProducts); }
/** * Sets the listOfReactants of this {@link Reaction}. Automatically sets the * parentSBML object of the list to this {@link Reaction} instance. * * @param listOfReactants */ public void setListOfReactants(ListOf<SpeciesReference> listOfReactants) { unsetListOfReactants(); this.listOfReactants = listOfReactants; if ((this.listOfReactants != null) && (this.listOfReactants.getSBaseListType() != ListOf.Type.listOfReactants)) { this.listOfReactants.setSBaseListType(ListOf.Type.listOfReactants); } registerChild(this.listOfReactants); }
/** * Sets the listOfSpecies of this {@link Model} to 'listOfSpecies'. * Automatically sets the parentSBML objects of 'listOfSpecies' to this Model. * * @param listOfSpecies */ public void setListOfSpecies(ListOf<Species> listOfSpecies) { unsetListOfSpecies(); this.listOfSpecies = listOfSpecies; if ((this.listOfSpecies != null) && (this.listOfSpecies.getSBaseListType() != ListOf.Type.listOfSpecies)) { this.listOfSpecies.setSBaseListType(ListOf.Type.listOfSpecies); } registerChild(this.listOfSpecies); }
/** * Sets the {@link #listOfReactions} of this {@link Model} to * 'listOfReactions'. Automatically sets the parentSBML objects of * 'listOfReactions' to this Model. * * @param listOfReactions */ public void setListOfReactions(ListOf<Reaction> listOfReactions) { unsetListOfReactions(); this.listOfReactions = listOfReactions; if ((this.listOfReactions != null) && (this.listOfReactions.getSBaseListType() != ListOf.Type.listOfReactions)) { this.listOfReactions.setSBaseListType(ListOf.Type.listOfReactions); } registerChild(this.listOfReactions); }
/** * Sets the {@link #listOfRules} of this {@link Model} to 'listOfRules'. * Automatically sets the parentSBML objects of 'listOfRules' to this Model. * * @param listOfRules */ public void setListOfRules(ListOf<Rule> listOfRules) { unsetListOfRules(); this.listOfRules = listOfRules; if ((this.listOfRules != null) && (this.listOfRules.getSBaseListType() != ListOf.Type.listOfRules)) { this.listOfRules.setSBaseListType(ListOf.Type.listOfRules); } registerChild(this.listOfRules); }
/** * Sets the listOfEvents of this {@link Model} to 'listOfEvents'. * Automatically sets the parentSBML objects of 'listOfEvents' to this * {@link Model}. * * @param listOfEvents */ public void setListOfEvents(ListOf<Event> listOfEvents) { unsetListOfEvents(); this.listOfEvents = listOfEvents; if ((this.listOfEvents != null) && (this.listOfEvents.getSBaseListType() != ListOf.Type.listOfEvents)) { this.listOfEvents.setSBaseListType(ListOf.Type.listOfEvents); } registerChild(this.listOfEvents); }
/** * Sets the {@link #listOfParameters} of this {@link Model} to * 'listOfParameters'. Automatically sets the parentSBML objects of * 'listOfParameters' to this Model. * * @param listOfParameters */ public void setListOfParameters(ListOf<Parameter> listOfParameters) { unsetListOfParameters(); this.listOfParameters = listOfParameters; if ((this.listOfParameters != null) && (this.listOfParameters.getSBaseListType() != ListOf.Type.listOfParameters)) { this.listOfParameters.setSBaseListType(ListOf.Type.listOfParameters); } registerChild(listOfParameters); }
/** * Sets the {@link #listOfUnits} of this {@link UnitDefinition}. * * <p>Automatically sets the parent SBML object of the list to this * {@link UnitDefinition} instance. * * @param listOfUnits the new list of {@link Unit}s. */ public void setListOfUnits(ListOf<Unit> listOfUnits) { unsetListOfUnits(); this.listOfUnits = listOfUnits; if ((this.listOfUnits != null) && (this.listOfUnits.getSBaseListType() != ListOf.Type.listOfUnits)) { this.listOfUnits.setSBaseListType(ListOf.Type.listOfUnits); } registerChild(this.listOfUnits); }
/** * Sets the listOfCompartments of this {@link Model} to 'listOfCompartments'. * Automatically sets the parentSBML objects of 'listOfCompartments' to this * Model. * * @param listOfCompartments */ public void setListOfCompartments(ListOf<Compartment> listOfCompartments) { unsetListOfCompartments(); this.listOfCompartments = listOfCompartments; if ((this.listOfCompartments != null) && (this.listOfCompartments.getSBaseListType() != ListOf.Type.listOfCompartments)) { this.listOfCompartments.setSBaseListType(ListOf.Type.listOfCompartments); } registerChild(this.listOfCompartments); }
/** * Returns the listOfAnalyticVolumes. Creates it if it is not already existing. * * @return the listOfAnalyticVolumes */ public ListOf<AnalyticVolume> getListOfAnalyticVolumes() { if (!isSetListOfAnalyticVolumes()) { listOfAnalyticVolumes = new ListOf<AnalyticVolume>(); listOfAnalyticVolumes.setNamespace(SpatialConstants.namespaceURI); listOfAnalyticVolumes.setSBaseListType(ListOf.Type.other); registerChild(listOfAnalyticVolumes); } return listOfAnalyticVolumes; }
/** * Creates a ListOf instance from a given ListOf. * * @param listOf the list to clone */ @SuppressWarnings("unchecked") public ListOf(ListOf<? extends SBase> listOf) { super(listOf); setSBaseListType(listOf.getSBaseListType()); setOtherListName(listOf.getOtherListName()); for (SBase base : listOf) { if (base != null) { add((T) base.clone()); } } }
/** * Returns the listOfParametricObjects. Creates it if it is not already existing. * * @return the listOfParametricObjects */ public ListOf<ParametricObject> getListOfParametricObjects() { if (!isSetListOfParametricObjects()) { listOfParametricObjects = new ListOf<ParametricObject>(getLevel(), getVersion()); listOfParametricObjects.setNamespace(SpatialConstants.namespaceURI); listOfParametricObjects.setSBaseListType(ListOf.Type.other); registerChild(listOfParametricObjects); } return listOfParametricObjects; }
/** * Returns the listOfDomains. Creates it if it is not already existing. * * @return the listOfDomains */ public ListOf<Domain> getListOfDomains() { if (!isSetListOfDomains()) { listOfDomains = new ListOf<Domain>(); listOfDomains.setPackageVersion(-1); // changing the ListOf package name from 'core' to 'spatial' listOfDomains.setPackageName(null); listOfDomains.setPackageName(SpatialConstants.shortLabel); listOfDomains.setSBaseListType(ListOf.Type.other); registerChild(listOfDomains); } return listOfDomains; }
/** * Returns the listOfDomainTypes. Creates it if it is not already existing. * * @return the listOfDomainTypes */ public ListOf<DomainType> getListOfDomainTypes() { if (!isSetListOfDomainTypes()) { listOfDomainTypes = new ListOf<DomainType>(); listOfDomainTypes.setPackageVersion(-1); // changing the ListOf package name from 'core' to 'spatial' listOfDomainTypes.setPackageName(null); listOfDomainTypes.setPackageName(SpatialConstants.shortLabel); listOfDomainTypes.setSBaseListType(ListOf.Type.other); registerChild(listOfDomainTypes); } return listOfDomainTypes; }
/** * @return the listOfOutputs */ public ListOf<Output> getListOfOutputs() { if (!isSetListOfOutputs()) { listOfOutputs = new ListOf<Output>(getLevel(), getVersion()); listOfOutputs.setSBaseListType(ListOf.Type.other); listOfOutputs.setPackageVersion(-1); // changing the ListOf package name from 'core' to 'qual' listOfOutputs.setPackageName(null); listOfOutputs.setPackageName(QualConstants.shortLabel); listOfOutputs.setOtherListName(QualConstants.listOfOutputs); registerChild(listOfOutputs); } return listOfOutputs; }
/** * @return the listOfFunctionTerms */ public ListOf<FunctionTerm> getListOfFunctionTerms() { if (!isSetListOfFunctionTerms()) { listOfFunctionTerms = new ListOf<FunctionTerm>(getLevel(), getVersion()); listOfFunctionTerms.setSBaseListType(ListOf.Type.other); listOfFunctionTerms.setPackageVersion(-1); // changing the ListOf package name from 'core' to 'qual' listOfFunctionTerms.setPackageName(null); listOfFunctionTerms.setPackageName(QualConstants.shortLabel); listOfFunctionTerms.setOtherListName(QualConstants.listOfFunctionTerms); registerChild(listOfFunctionTerms); } return listOfFunctionTerms; }
/** * @return the listOfInputs */ public ListOf<Input> getListOfInputs() { if (!isSetListOfInputs()) { listOfInputs = new ListOf<Input>(getLevel(), getVersion()); listOfInputs.setSBaseListType(ListOf.Type.other); listOfInputs.setPackageVersion(-1); // changing the ListOf package name from 'core' to 'qual' listOfInputs.setPackageName(null); listOfInputs.setPackageName(QualConstants.shortLabel); listOfInputs.setOtherListName(QualConstants.listOfInputs); registerChild(listOfInputs); } return listOfInputs; }