boolean hasAttributes, boolean hasNamespaces, Object contextObject) {
// logger.debug("processStartElement: elementName = " + elementName + " (" + contextObject.getClass().getSimpleName() + ")");
if (contextObject instanceof Model) {
Model model = (Model) contextObject;
QualitativeModel qualModel = null;
if (model.getExtension(QualConstants.namespaceURI) != null) {
qualModel = (QualitativeModel) model.getExtension(QualConstants.namespaceURI);
} else {
qualModel = new QualitativeModel(model);
model.addExtension(QualConstants.namespaceURI, qualModel);
}
if (elementName.equals("listOfQualitativeSpecies")) {
ListOf<QualitativeSpecies> listOfQualitativeSpecies = qualModel.getListOfQualitativeSpecies();
groupList = QualList.listOfQualitativeSpecies;
return listOfQualitativeSpecies;
}
else if (elementName.equals("listOfTransitions")) {
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();