@Override protected EStructuralFeature getTarget( EStructuralFeature eStructuralFeature) { return (EStructuralFeature) profile .getDefinition(getNamedElement(eStructuralFeature)); }
public Stereotype findStereotype(String name) { Stereotype result = null; if (this.umlgProfile != null) { result = this.umlgProfile.getOwnedStereotype(name); if (result == null) { if (this.umlgValidationProfile != null) { result = this.umlgValidationProfile.getOwnedStereotype(name); } } } else { if (this.umlgValidationProfile != null) { result = this.umlgValidationProfile.getOwnedStereotype(name); } } return result; }
public List<Stereotype> getValidationStereotypes() { if (this.umlgValidationProfile != null) { return this.umlgValidationProfile.getOwnedStereotypes(); } else { return Collections.emptyList(); } }
.getNestingPackage(); String profileParentQualifiedName = nestingPackage == null ? EMPTY_STRING EPackage definition = profile.getDefinition();
if (!profile.getReferencedMetaclasses().contains(metaclass) && !profile.getReferencedMetamodels() .contains(metaclass.getModel())) { Extension extension = (Extension) profile.createOwnedType(metaclassName + '_' + name, UMLPackage.Literals.EXTENSION);
profileName = appliedProfile.getName(); .getEAnnotation(UML2_UML_PACKAGE_2_0_NS_URI); && !appliedProfile.getOwnedExtensions(true) .isEmpty()) {
EPackage profileDefinition = profile.getDefinition(); return profile.getOwnedExtensions(true).isEmpty() ? ECollections.<EObject> emptyEList() : applyAllRequiredStereotypes(package_);
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the current definition (Ecore representation) of this profile. * @param profile The receiving '<em><b>Profile</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EPackage getDefinition(Profile profile) { EPackage definition = getEPackage(profile); if (definition == null) { EAnnotation eAnnotation = profile .getEAnnotation(UML2_UML_PACKAGE_2_0_NS_URI); if (eAnnotation != null) { EList<EObject> contents = eAnnotation.getContents(); if (contents.size() > 0) { definition = (EPackage) contents.get(0); } } } return definition; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static Stereotype createOwnedStereotype(Profile profile, String name, boolean isAbstract) { Stereotype ownedStereotype = (Stereotype) profile.createOwnedType(name, UMLPackage.Literals.STEREOTYPE); ownedStereotype.setIsAbstract(isAbstract); return ownedStereotype; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Defines this profile by (re)creating Ecore representations of its current contents. * @param profile The receiving '<em><b>Profile</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EPackage define(Profile profile) { Map<String, String> options = new HashMap<String, String>(); options.put(UML2EcoreConverter.OPTION__ECORE_TAGGED_VALUES, OPTION__PROCESS); options.put(UML2EcoreConverter.OPTION__DUPLICATE_FEATURES, OPTION__PROCESS); options.put(UML2EcoreConverter.OPTION__DUPLICATE_FEATURE_INHERITANCE, OPTION__PROCESS); options.put(UML2EcoreConverter.OPTION__INVARIANT_CONSTRAINTS, OPTION__IGNORE); options .put(UML2EcoreConverter.OPTION__OPERATION_BODIES, OPTION__IGNORE); options.put(UML2EcoreConverter.OPTION__COMMENTS, OPTION__IGNORE); return profile.define(options, null, null); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Profile getAppliedProfile() { if (appliedProfile != null && appliedProfile.eIsProxy()) { InternalEObject oldAppliedProfile = (InternalEObject) appliedProfile; appliedProfile = (Profile) eResolveProxy(oldAppliedProfile); if (appliedProfile != oldAppliedProfile) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, UMLPackage.PROFILE_APPLICATION__APPLIED_PROFILE, oldAppliedProfile, appliedProfile)); } } return appliedProfile; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the metamodels referenced by this profile. * @param profile The receiving '<em><b>Profile</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EList<Model> getReferencedMetamodels(Profile profile) { EList<Model> referencedMetamodels = new UniqueEList.FastCompare<Model>(); for (PackageImport metamodelReference : profile .getMetamodelReferences()) { org.eclipse.uml2.uml.Package importedPackage = metamodelReference .getImportedPackage(); if (importedPackage != null) { referencedMetamodels.add((Model) importedPackage); } } return ECollections.unmodifiableEList(referencedMetamodels); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the metaclasses referenced by this profile. * @param profile The receiving '<em><b>Profile</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EList<org.eclipse.uml2.uml.Class> getReferencedMetaclasses( Profile profile) { EList<org.eclipse.uml2.uml.Class> referencedMetaclasses = new UniqueEList.FastCompare<org.eclipse.uml2.uml.Class>(); for (ElementImport metaclassReference : profile .getMetaclassReferences()) { PackageableElement importedElement = metaclassReference .getImportedElement(); if (importedElement != null) { referencedMetaclasses .add((org.eclipse.uml2.uml.Class) importedElement); } } return ECollections.unmodifiableEList(referencedMetaclasses); }
.getEAnnotation("attributes"); //$NON-NLS-1$ .getEAnnotation("ePackages"); //$NON-NLS-1$
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Determines whether this profile is defined. * @param profile The receiving '<em><b>Profile</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static boolean isDefined(Profile profile) { return profile.getDefinition() != null; }
protected Stereotype getUML2Stereotype(Element element, String name) { Profile ecoreProfile = getUML2Profile(element); return ecoreProfile != null ? ecoreProfile.getOwnedStereotype(name) : null; }
@Override protected EClass getTarget(EClass eClass) { return (EClass) profile.getDefinition(getNamedElement(eClass)); }
protected Stereotype getEcoreStereotype(EObject eObject, String name) { Profile ecoreProfile = getEcoreProfile(eObject); return ecoreProfile != null ? ecoreProfile.getOwnedStereotype(name) : null; }