if (contextObject instanceof Annotation) {
Annotation annotation = (Annotation) contextObject;
Model model = (Model) annotation.getParent();
LayoutModelPlugin layoutModel = null;
if (model.getExtension(namespaceURI) != null) {
layoutModel = (LayoutModelPlugin) model
.getExtension(namespaceURI);
} else {
layoutModel = new LayoutModelPlugin(model);
model.addExtension(namespaceURI, layoutModel);
}
}
if (contextObject instanceof SBase) {
setLevelAndVersionFor(newContextObject,
(SBase) contextObject);
}
if (contextObject instanceof Annotation) {
Annotation annotation = (Annotation) contextObject;
if (elementName.equals("listOfLayouts")) {
ListOf<Layout> listOfLayouts = (ListOf<Layout>) newContextObject;
listOfLayouts.setSBaseListType(ListOf.Type.other);
setNamespace(listOfLayouts, namespaceURI);
groupList = LayoutList.listOfLayouts;
Model model = (Model) annotation.getParent();
LayoutModelPlugin layoutModel = (LayoutModelPlugin) model
.getExtension(namespaceURI);
layoutModel.setListOfLayouts(listOfLayouts);
return listOfLayouts;
} else {
log4jLogger.warn(MessageFormat.format(
"Element {0} not recognized!", elementName));
}