model.put("label", label);
NameForTypeDefinitionMethod nameForTypeDefinition = new NameForTypeDefinitionMethod(getTypeDefinitionNamePattern(), label, getModelInternal().getNamespacesToPrefixes(), this.packageIdentifiers);
if (exampleResource != null) {
if (exampleResource.getEntityParameter() != null && exampleResource.getEntityParameter().getXmlElement() != null) {
ElementDeclaration el = exampleResource.getEntityParameter().getXmlElement();
TypeDefinition typeDefinition = null;
if (el instanceof RootElementDeclaration) {
typeDefinition = getModelInternal().findTypeDefinition((RootElementDeclaration) el);
}
else if (el instanceof LocalElementDeclaration && ((LocalElementDeclaration) el).getElementTypeDeclaration() instanceof ClassDeclaration) {
typeDefinition = getModelInternal().findTypeDefinition((ClassDeclaration) ((LocalElementDeclaration) el).getElementTypeDeclaration());
}
if (typeDefinition != null) {
model.put("input_element_name", nameForTypeDefinition.calculateName(typeDefinition));
}
}
if (exampleResource.getRepresentationMetadata() != null && exampleResource.getRepresentationMetadata().getXmlElement() != null) {
ElementDeclaration el = exampleResource.getRepresentationMetadata().getXmlElement();
TypeDefinition typeDefinition = null;
if (el instanceof RootElementDeclaration) {
typeDefinition = getModelInternal().findTypeDefinition((RootElementDeclaration) el);
}
else if (el instanceof LocalElementDeclaration && ((LocalElementDeclaration) el).getElementTypeDeclaration() instanceof ClassDeclaration) {