// A BiologicalQualifierParser can only modify a contextObject which is
// an instance of Annotation.
// That will probably change in SBML level 3 with the Annotation package
if (contextObject instanceof Annotation) {
Annotation annotation = (Annotation) contextObject;
// This parser can parse only biological MIRIAM qualifiers. This
// element should not have attributes or namespace declarations.
// Creates a new CVTerm and
// sets the qualifierType and biologicalQualifierType of this
// CVTerm. Then, adds the
// initialized CVTerm to annotation.
if (biologicalQualifierMap.containsKey(elementName)
&& !hasAttributes && !hasNamespaces) {
CVTerm cvTerm = new CVTerm();
cvTerm.setQualifierType(Type.BIOLOGICAL_QUALIFIER);
cvTerm.setBiologicalQualifierType(biologicalQualifierMap
.get(elementName));
annotation.addCVTerm(cvTerm);
return cvTerm;
} else {
// TODO: SBML syntax error, log an error
}
} else {