/** * Removes the n-th {@link FunctionDefinition} of the {@link Model}. * * @param n * @return the removed element. */ public FunctionDefinition removeFunctionDefinition(int n) { return getListOfFunctionDefinitions().remove(n); }
/** * Adds a {@link FunctionDefinition} instance to the listOfFunctionDefinitions * of this {@link Model}. * * @param functionDefinition * @return {@code true} if the {@link #listOfFunctionDefinitions} was * changed as a result of this call. */ public boolean addFunctionDefinition(FunctionDefinition functionDefinition) { return getListOfFunctionDefinitions().add(functionDefinition); }
/** * Gets the n<sup>th</sup> {@link FunctionDefinition} instance of the * listOfFunctionDefinitions. * * @param n the index of the element to return * @return the n<sup>th</sup> {@link FunctionDefinition} instance of the * listOfFunstionDefinitions. {@code null} if the * listOfFunctionDefinitions * is not set. */ public FunctionDefinition getFunctionDefinition(int n) { return getListOfFunctionDefinitions().get(n); }
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfFunctionDefinitions() || m.isListOfFunctionDefinitionsEmpty()) { return new UnknownAttributeValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfFunctionDefinitions()); } return true; } };
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfFunctionDefinitions() || m.isListOfFunctionDefinitionsEmpty()) { return new UnknownElementValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfFunctionDefinitions()); } return true; } };
private Model flattenModel(Model modelOfSubmodel) { flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfReactions()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfCompartments()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfConstraints()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfEvents()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfFunctionDefinitions()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfParameters()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfRules()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfSpecies()); flattenSBaseList(modelOfSubmodel, modelOfSubmodel.getListOfUnitDefinitions()); return modelOfSubmodel; }
mergeListsOfModels(previousModel.getListOfFunctionDefinitions(), previousModel, mergedModel); mergeListsOfModels(previousModel.getListOfRules(), previousModel, mergedModel); mergeListsOfModels(previousModel.getListOfEvents(), previousModel, mergedModel); mergeListsOfModels(currentModel.getListOfFunctionDefinitions(), currentModel, mergedModel); mergeListsOfModels(currentModel.getListOfRules(), currentModel, mergedModel); mergeListsOfModels(currentModel.getListOfEvents(), currentModel, mergedModel);
Map<String, UnitDefinition> unitsMap = new HashMap<String, UnitDefinition>(); for (FunctionDefinition functionDefinition : model.getListOfFunctionDefinitions()) { allFunctionsIdSet.add(functionDefinition.getId());
ListOf<FunctionDefinition> functionalDefinitionsListOf = sourceModel.getListOfFunctionDefinitions().clone(); sourceModel.getListOfFunctionDefinitions().removeFromParent();
if (model.isSetListOfFunctionDefinitions()) { setListOfFunctionDefinitions( model.getListOfFunctionDefinitions().clone());