MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
true);
if (modelElement instanceof Type)
{
Type element = (Type)modelElement;
final Property property = umlClass.createOwnedAttribute(
name,
element,
1,
1);
VisibilityKind kind = VisibilityKind.PUBLIC_LITERAL;
if (visibility.equalsIgnoreCase("package"))
{
kind = VisibilityKind.PACKAGE_LITERAL;
}
if (visibility.equalsIgnoreCase("private"))
{
kind = VisibilityKind.PRIVATE_LITERAL;
}
if (visibility.equalsIgnoreCase("protected"))
{
kind = VisibilityKind.PROTECTED_LITERAL;
}
property.setVisibility(kind);
Stereotype stereotype =
UmlUtilities.findApplicableStereotype(
property,
UMLProfile.STEREOTYPE_IDENTIFIER);
if (stereotype == null)
{
throw new MetafacadeException("Could not apply '" + UMLProfile.STEREOTYPE_IDENTIFIER + "' to " +
property + ", the stereotype could not be found");
}
property.apply(stereotype);
}
}
}