org.eclipse.uml2.uml
Interface Profile

All Superinterfaces:
Element, EModelElement, EObject, NamedElement, Namespace, Notifier, Package, PackageableElement, ParameterableElement, TemplateableElement

public interface Profile
extends Package

A representation of the model object 'Profile'. A profile defines limited extensions to a reference metamodel with the purpose of adapting the metamodel to a specific platform or domain.

The following features are supported:

See Also:
UMLPackage.getProfile()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 EObject create(Classifier classifier)
           Creates and returns an instance of (the Ecore representation of) the specified classifier defined in this profile
 ElementImport createMetaclassReference(PackageableElement importedElement)
          Creates a new ElementImport, with the specified 'Imported Element', and appends it to the 'Metaclass Reference' reference list
 PackageImport createMetamodelReference(Package importedPackage)
          Creates a new PackageImport, with the specified 'Imported Package', and appends it to the 'Metamodel Reference' reference list
 Stereotype createOwnedStereotype(String name)
          Creates a new Stereotype, with the specified 'Name', and appends it to the 'Owned Stereotype' reference list
 Stereotype createOwnedStereotype(String name, boolean isAbstract)
           Creates a(n) (abstract) stereotype with the specified name as an owned stereotype of this profile
 EPackage define()
           Defines this profile by (re)creating Ecore representations of its current contents
 EPackage getDefinition()
           Retrieves the current definition (Ecore representation) of this profile
 ENamedElement getDefinition(NamedElement namedElement)
           Retrieves the current definition (Ecore representation) of the specified named element in this profile
 ElementImport getMetaclassReference(PackageableElement importedElement)
          Retrieves the first ElementImport with the specified 'Imported Element' from the 'Metaclass Reference' reference list
 ElementImport getMetaclassReference(PackageableElement importedElement, boolean createOnDemand)
          Retrieves the first ElementImport with the specified 'Imported Element' from the 'Metaclass Reference' reference list
 EList getMetaclassReferences()
          Returns the value of the 'Metaclass Reference' reference list.
 PackageImport getMetamodelReference(Package importedPackage)
          Retrieves the first PackageImport with the specified 'Imported Package' from the 'Metamodel Reference' reference list
 PackageImport getMetamodelReference(Package importedPackage, boolean createOnDemand)
          Retrieves the first PackageImport with the specified 'Imported Package' from the 'Metamodel Reference' reference list
 EList getMetamodelReferences()
          Returns the value of the 'Metamodel Reference' reference list.
 EList getOwnedExtensions(boolean requiredOnly)
           Retrieves the extensions owned by this profile, excluding non-required extensions if indicated
 Stereotype getOwnedStereotype(String name)
          Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list
 Stereotype getOwnedStereotype(String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list
 EList getOwnedStereotypes()
          Returns the value of the 'Owned Stereotype' reference list.
 EList getReferencedMetaclasses()
           Retrieves the metaclasses referenced by this profile
 EList getReferencedMetamodels()
           Retrieves the metamodels referenced by this profile
 boolean isDefined()
           Determines whether this profile is defined
 boolean validateMetaclassReferenceNotSpecialized(DiagnosticChain diagnostics, Map context)
           An element imported as a metaclassReference is not specialized or generalized in a Profile.
 boolean validateReferencesSameMetamodel(DiagnosticChain diagnostics, Map context)
           All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel.
 
Methods inherited from interface org.eclipse.uml2.uml.Package
applyProfile, createNestedPackage, createNestedPackage, createOwnedClass, createOwnedEnumeration, createOwnedInterface, createOwnedPrimitiveType, createOwnedType, createPackagedElement, createPackageMerge, createProfileApplication, getAllAppliedProfiles, getAllProfileApplications, getAppliedProfile, getAppliedProfile, getAppliedProfiles, getNestedPackage, getNestedPackage, getNestedPackages, getNestingPackage, getOwnedType, getOwnedType, getOwnedTypes, getPackagedElement, getPackagedElement, getPackagedElements, getPackageMerge, getPackageMerge, getPackageMerges, getProfileApplication, getProfileApplication, getProfileApplications, isModelLibrary, isProfileApplied, makesVisible, setNestingPackage, unapplyProfile, validateElementsPublicOrPrivate, visibleMembers
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 

Method Detail

getOwnedStereotypes

public EList getOwnedStereotypes()
Returns the value of the 'Owned Stereotype' reference list. The list contents are of type Stereotype. References the Stereotypes that are owned by the Profile.

Returns:
the value of the 'Owned Stereotype' reference list.
See Also:
UMLPackage.getProfile_OwnedStereotype()

createOwnedStereotype

public Stereotype createOwnedStereotype(String name)
Creates a new Stereotype, with the specified 'Name', and appends it to the 'Owned Stereotype' reference list.

Parameters:
name - The 'Name' for the new Stereotype, or null.
Returns:
The new Stereotype.
See Also:
Profile.getOwnedStereotypes()

getOwnedStereotype

public Stereotype getOwnedStereotype(String name)
Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list.

Parameters:
name - The 'Name' of the Stereotype to retrieve, or null.
Returns:
The first Stereotype with the specified 'Name', or null.
See Also:
Profile.getOwnedStereotypes()

getOwnedStereotype

public Stereotype getOwnedStereotype(String name,
                                     boolean ignoreCase,
                                     boolean createOnDemand)
Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list.

Parameters:
name - The 'Name' of the Stereotype to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a Stereotype on demand if not found.
Returns:
The first Stereotype with the specified 'Name', or null.
See Also:
Profile.getOwnedStereotypes()

getMetaclassReferences

public EList getMetaclassReferences()
Returns the value of the 'Metaclass Reference' reference list. The list contents are of type ElementImport. References a metaclass that may be extended.

Returns:
the value of the 'Metaclass Reference' reference list.
See Also:
UMLPackage.getProfile_MetaclassReference()

createMetaclassReference

public ElementImport createMetaclassReference(PackageableElement importedElement)
Creates a new ElementImport, with the specified 'Imported Element', and appends it to the 'Metaclass Reference' reference list.

Parameters:
importedElement - The 'Imported Element' for the new ElementImport, or null.
Returns:
The new ElementImport.
See Also:
Profile.getMetaclassReferences()

getMetaclassReference

public ElementImport getMetaclassReference(PackageableElement importedElement)
Retrieves the first ElementImport with the specified 'Imported Element' from the 'Metaclass Reference' reference list.

Parameters:
importedElement - The 'Imported Element' of the ElementImport to retrieve, or null.
Returns:
The first ElementImport with the specified 'Imported Element', or null.
See Also:
Profile.getMetaclassReferences()

getMetaclassReference

public ElementImport getMetaclassReference(PackageableElement importedElement,
                                           boolean createOnDemand)
Retrieves the first ElementImport with the specified 'Imported Element' from the 'Metaclass Reference' reference list.

Parameters:
importedElement - The 'Imported Element' of the ElementImport to retrieve, or null.
createOnDemand - Whether to create a ElementImport on demand if not found.
Returns:
The first ElementImport with the specified 'Imported Element', or null.
See Also:
Profile.getMetaclassReferences()

getMetamodelReferences

public EList getMetamodelReferences()
Returns the value of the 'Metamodel Reference' reference list. The list contents are of type PackageImport. References a package containing (directly or indirectly) metaclasses that may be extended.

Returns:
the value of the 'Metamodel Reference' reference list.
See Also:
UMLPackage.getProfile_MetamodelReference()

createMetamodelReference

public PackageImport createMetamodelReference(Package importedPackage)
Creates a new PackageImport, with the specified 'Imported Package', and appends it to the 'Metamodel Reference' reference list.

Parameters:
importedPackage - The 'Imported Package' for the new PackageImport, or null.
Returns:
The new PackageImport.
See Also:
Profile.getMetamodelReferences()

getMetamodelReference

public PackageImport getMetamodelReference(Package importedPackage)
Retrieves the first PackageImport with the specified 'Imported Package' from the 'Metamodel Reference' reference list.

Parameters:
importedPackage - The 'Imported Package' of the PackageImport to retrieve, or null.
Returns:
The first PackageImport with the specified 'Imported Package', or null.
See Also:
Profile.getMetamodelReferences()

getMetamodelReference

public PackageImport getMetamodelReference(Package importedPackage,
                                           boolean createOnDemand)
Retrieves the first PackageImport with the specified 'Imported Package' from the 'Metamodel Reference' reference list.

Parameters:
importedPackage - The 'Imported Package' of the PackageImport to retrieve, or null.
createOnDemand - Whether to create a PackageImport on demand if not found.
Returns:
The first PackageImport with the specified 'Imported Package', or null.
See Also:
Profile.getMetamodelReferences()

validateMetaclassReferenceNotSpecialized

public boolean validateMetaclassReferenceNotSpecialized(DiagnosticChain diagnostics,
                                                        Map context)
An element imported as a metaclassReference is not specialized or generalized in a Profile. self.metaclassReference.importedElement-> select(c | c.oclIsKindOf(Classifier) and (c.generalization.namespace = self or (c.specialization.namespace = self) )->isEmpty()


validateReferencesSameMetamodel

public boolean validateReferencesSameMetamodel(DiagnosticChain diagnostics,
                                               Map context)
All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. self.metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages())-> union(self.metaclassReference.importedElement.allOwningPackages() )->notEmpty()


create

public EObject create(Classifier classifier)
Creates and returns an instance of (the Ecore representation of) the specified classifier defined in this profile.


createOwnedStereotype

public Stereotype createOwnedStereotype(String name,
                                        boolean isAbstract)
Creates a(n) (abstract) stereotype with the specified name as an owned stereotype of this profile.


isDefined

public boolean isDefined()
Determines whether this profile is defined.


define

public EPackage define()
Defines this profile by (re)creating Ecore representations of its current contents.


getDefinition

public EPackage getDefinition()
Retrieves the current definition (Ecore representation) of this profile.


getDefinition

public ENamedElement getDefinition(NamedElement namedElement)
Retrieves the current definition (Ecore representation) of the specified named element in this profile.


getReferencedMetaclasses

public EList getReferencedMetaclasses()
Retrieves the metaclasses referenced by this profile.


getReferencedMetamodels

public EList getReferencedMetamodels()
Retrieves the metamodels referenced by this profile.


getOwnedExtensions

public EList getOwnedExtensions(boolean requiredOnly)
Retrieves the extensions owned by this profile, excluding non-required extensions if indicated.


Copyright 2003, 2006 IBM Corporation and others.
All Rights Reserved.