ListOf<Transition> listOfObjectives = qualModel.getListOfTransitions();
groupList = QualList.listOfTransitions;
return listOfObjectives;
}
} else if (contextObject instanceof Transition) {
Transition transition = (Transition) contextObject;
if (elementName.equals("listOfInputs")) {
ListOf<Input> listOfInputs = transition.getListOfInputs();
groupList = QualList.listOfInputs;
return listOfInputs;
} else if (elementName.equals("listOfOutputs")) {
ListOf<Output> listOfOutputs = transition.getListOfOutputs();
groupList = QualList.listOfOutputs;
return listOfOutputs;
} else if (elementName.equals("listOfFunctionTerms")) {
ListOf<FunctionTerm> listOfFunctionTerms = transition.getListOfFunctionTerms();
groupList = QualList.listOfFunctionTerms;
return listOfFunctionTerms;
}
}
else if (contextObject instanceof ListOf<?>) {
ListOf<SBase> listOf = (ListOf<SBase>) contextObject;
if (elementName.equals("transition") && groupList.equals(QualList.listOfTransitions)) {
Model model = (Model) listOf.getParentSBMLObject();
QualitativeModel extendeModel = (QualitativeModel) model.getExtension(QualConstants.namespaceURI);
Transition transition = new Transition();
extendeModel.addTransition(transition);
return transition;
} else if ((elementName.equals("qualitativeSpecies")) && groupList.equals(QualList.listOfQualitativeSpecies)) {
Model model = (Model) listOf.getParentSBMLObject();
QualitativeModel extendeModel = (QualitativeModel) model.getExtension(QualConstants.namespaceURI);
QualitativeSpecies qualSpecies = new QualitativeSpecies();
extendeModel.addQualitativeSpecies(qualSpecies);
return qualSpecies;
} else if (elementName.equals("input") && groupList.equals(QualList.listOfInputs)) {
Transition transition = (Transition) listOf.getParentSBMLObject();
Input input = new Input();
transition.addInput(input);
return input;
} else if (elementName.equals("output") && groupList.equals(QualList.listOfOutputs)) {
Transition transition = (Transition) listOf.getParentSBMLObject();
Output output = new Output();
transition.addOutput(output);
return output;
} else if (elementName.equals("functionTerm") && groupList.equals(QualList.listOfFunctionTerms)) {
Transition transition = (Transition) listOf.getParentSBMLObject();
FunctionTerm functionTerm = new FunctionTerm();
transition.addFunctionTerm(functionTerm);
return functionTerm;
} else if (elementName.equals("defaultTerm") && groupList.equals(QualList.listOfFunctionTerms)) {
Transition transition = (Transition) listOf.getParentSBMLObject();
FunctionTerm functionTerm = new FunctionTerm();
functionTerm.setDefaultTerm(true);
transition.addFunctionTerm(functionTerm);
return functionTerm;
}
}
return contextObject;
}