org.andromda.metafacades.emf.uml22.ManageableEntityAttributeLogicImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-metafacades-emf-uml22 Show documentation
Show all versions of andromda-metafacades-emf-uml22 Show documentation
The Eclipse EMF UML2 v2.X metafacades. This is the set of EMF UML2 2.X metafacades
implementations. These implement the common UML metafacades for .uml model files.
The newest version!
package org.andromda.metafacades.emf.uml22;
import org.andromda.metafacades.uml.Entity;
import org.andromda.metafacades.uml.UMLMetafacadeProperties;
import org.apache.commons.lang.StringUtils;
/**
* MetafacadeLogic implementation for
* org.andromda.metafacades.uml.ManageableEntityAttribute.
*
* @see org.andromda.metafacades.uml.ManageableEntityAttribute
*/
public class ManageableEntityAttributeLogicImpl
extends ManageableEntityAttributeLogic
{
private static final long serialVersionUID = 34L;
/**
* @param metaObject
* @param context
*/
public ManageableEntityAttributeLogicImpl(
final Object metaObject,
final String context)
{
super(metaObject, context);
}
/**
* @see org.andromda.metafacades.uml.ManageableEntityAttribute#isDisplay()
*/
@Override
protected boolean handleIsDisplay()
{
boolean display = true;
// only identifiers might be hidden
if (this.isIdentifier())
{
final String displayStrategy =
StringUtils.trimToNull(
(String)this.getConfiguredProperty(UMLMetafacadeProperties.MANAGEABLE_ID_DISPLAY_STRATEGY));
// never display identifiers
if ("never".equalsIgnoreCase(displayStrategy))
{
display = false;
}
// always display identifiers
else if ("always".equalsIgnoreCase(displayStrategy))
{
display = true;
}
// only display identifiers when explicitly modeled
else// if ("auto".equalsIgnoreCase(displayStrategy))
{
display = ((Entity)this.getOwner()).isUsingAssignedIdentifier();
}
}
return display;
}
/**
* @see org.andromda.metafacades.uml.ManageableEntityAttribute#isManageableGetterAvailable()
*/
@Override
protected boolean handleIsManageableGetterAvailable()
{
return this.handleGetType() != null && this.getType().isBlobType();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy