// TODO: make it generic by using reflection on the contextObject
if (contextObject instanceof Model)
{
Model model = (Model) contextObject;
MultiModel multiModel = null;
if (model.getExtension(namespaceURI) != null) {
multiModel = (MultiModel) model.getExtension(namespaceURI);
} else {
multiModel = new MultiModel(model);
model.addExtension(namespaceURI, multiModel);
}
if (elementName.equals(listOfSpeciesTypes))
{
return multiModel.getListOfSpeciesTypes();
}
else if (elementName.equals(listOfSelectors))
{
return multiModel.getListOfSelectors();
}
} // end Model
else if (contextObject instanceof SpeciesType)
{
SpeciesType speciesType = (SpeciesType) contextObject;