}
} // end SBMLDocument
else if (contextObject instanceof Model)
{
Model model = (Model) contextObject;
CompModelPlugin compModel = null;
if (model.getExtension(namespaceURI) != null) {
compModel = (CompModelPlugin) model.getExtension(namespaceURI);
} else {
compModel = new CompModelPlugin(model);
model.addExtension(namespaceURI, compModel);
}
if (elementName.equals(CompConstants.listOfSubmodels))
{
return compModel.getListOfSubmodels();
}
else if (elementName.equals(CompConstants.listOfPorts))
{
return compModel.getListOfPorts();
}
} // end Model
else if (contextObject instanceof Submodel)
{
Submodel submodel = (Submodel) contextObject;