A dynamic constraint provider that makes constraints defined in UML 2.0
profiles available to Aurora's EMF Validation Framework for the UML2 metamodel.
Package Specification
This defines a dynamic constraint provider that adapts
{@link org.eclipse.uml2.Constraint} elements in an Aurora-managed profile to
the {@link com.ibm.xtools.emf.validation.internal.model.IModelConstraint}
interface, so that they are included in model validation. The provider leverages
existing support in the EMF Validation framework for a variety of constraint
languages by creating constraint descriptors from the properties of a stereotyped
UML 2.0 Constraint element and asking the framework to create the implementations
(through the {@link com.ibm.xtools.emf.validation.internal.util.ConstraintFactory}
mechanism). Supported constraint languages include:
- OCL: profiles may specify boolean OCL expressions
- JavaClass: profiles may specify a Java class (extending
{@link com.ibm.xtools.emf.validation.AbstractModelConstraint}) in the
plug-in that hosts the profile. Uses the "Java" constraint language
internally
Constraints that have either the Default::MetaConstraint stereotype
applied in a user model or the ProfileBase::ProfileConstraint stereotype
applied in a profile can be processed by this provider.
The main classes in this package are:
- {@link com.ibm.xtools.uml2.validation.internal.providers.UmlConstraintProvider}:
obtains the UML 2.0 Constraint elements attached to model elements through
their applied stereotypes and makes them available to the EMF validation
system
- {@link com.ibm.xtools.uml2.validation.internal.providers.AdapterDescriptor}:
implements a constraint descriptor that leverages the EMF Validation
framework's {@link com.ibm.xtools.emf.validation.internal.util.ConstraintFactory}
to instantiate constraints in the OCL and Java languages that are
already supported by the base validation framework
- {@link com.ibm.xtools.uml2.validation.internal.providers.ConstraintAdapter}:
an EMF adapter that is attached at run-time to UML Constraint elements as
they are discovered by this provider. The adapter listens for changes
to the constraint's definition in order to appropriately re-initialize it
in the validation system
- {@link com.ibm.xtools.uml2.validation.internal.providers.ProfileConstraintCategoryManager}:
creates and maintains dynamic constraint categories that make profile
constraints visible to the user in the validation preferences UI. These
categories are mandatory (cannot be disabled by the user) because
the enablement of profile constraints follows application/removal of
the profile on a user model
This package also includes a variety of utility classes for optimizing (caching)
stereotype and package information.
@see com.ibm.xtools.emf.validation.internal.xml.IXmlConstraintParser