Interface Package

    • Method Detail

      • getPackageMerge

        PackageMerge getPackageMerge​(Package mergedPackage)
        Retrieves the first PackageMerge with the specified 'Merged Package' from the ' Package Merge' containment reference list.
        Parameters:
        mergedPackage - The 'Merged Package' of the PackageMerge to retrieve, or null.
        Returns:
        The first PackageMerge with the specified 'Merged Package', or null .
        See Also:
        getPackageMerges()
      • getPackageMerge

        PackageMerge getPackageMerge​(Package mergedPackage,
                                     boolean createOnDemand)
        Retrieves the first PackageMerge with the specified 'Merged Package' from the ' Package Merge' containment reference list.
        Parameters:
        mergedPackage - The 'Merged Package' of the PackageMerge to retrieve, or null.
        createOnDemand - Whether to create a PackageMerge on demand if not found.
        Returns:
        The first PackageMerge with the specified 'Merged Package', or null .
        See Also:
        getPackageMerges()
      • createOwnedType

        Type createOwnedType​(String name,
                             org.eclipse.emf.ecore.EClass eClass)
        Creates a new Type, with the specified 'Name', and appends it to the ' Owned Type' reference list.
        Parameters:
        name - The 'Name' for the new Type, or null.
        eClass - The Ecore class of the Type to create.
        Returns:
        The new Type.
        See Also:
        getOwnedTypes()
      • getOwnedType

        Type getOwnedType​(String name)
        Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list.
        Parameters:
        name - The 'Name' of the Type to retrieve, or null.
        Returns:
        The first Type with the specified 'Name', or null.
        See Also:
        getOwnedTypes()
      • getOwnedType

        Type getOwnedType​(String name,
                          boolean ignoreCase,
                          org.eclipse.emf.ecore.EClass eClass,
                          boolean createOnDemand)
        Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list.
        Parameters:
        name - The 'Name' of the Type to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        eClass - The Ecore class of the Type to retrieve, or null.
        createOnDemand - Whether to create a Type on demand if not found.
        Returns:
        The first Type with the specified 'Name', or null.
        See Also:
        getOwnedTypes()
      • createNestedPackage

        Package createNestedPackage​(String name,
                                    org.eclipse.emf.ecore.EClass eClass)
        Creates a new Package, with the specified 'Name', and appends it to the ' Nested Package' reference list.
        Parameters:
        name - The 'Name' for the new Package, or null.
        eClass - The Ecore class of the Package to create.
        Returns:
        The new Package.
        See Also:
        getNestedPackages()
      • getNestedPackage

        Package getNestedPackage​(String name)
        Retrieves the first Package with the specified 'Name' from the ' Nested Package' reference list.
        Parameters:
        name - The 'Name' of the Package to retrieve, or null.
        Returns:
        The first Package with the specified 'Name', or null.
        See Also:
        getNestedPackages()
      • getNestedPackage

        Package getNestedPackage​(String name,
                                 boolean ignoreCase,
                                 org.eclipse.emf.ecore.EClass eClass,
                                 boolean createOnDemand)
        Retrieves the first Package with the specified 'Name' from the ' Nested Package' reference list.
        Parameters:
        name - The 'Name' of the Package to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        eClass - The Ecore class of the Package to retrieve, or null.
        createOnDemand - Whether to create a Package on demand if not found.
        Returns:
        The first Package with the specified 'Name', or null.
        See Also:
        getNestedPackages()
      • setNestingPackage

        void setNestingPackage​(Package value)
        Sets the value of the 'Nesting Package' reference.
        Parameters:
        value - the new value of the 'Nesting Package' reference.
        See Also:
        getNestingPackage()
      • validateElementsPublicOrPrivate

        boolean validateElementsPublicOrPrivate​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                Map context)
        If an element that is owned by a package has visibility, it is public or private. self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)
      • createNestedPackage

        Package createNestedPackage​(String name)
        Creates a new Package, with the specified 'Name', and appends it to the ' Nested Package' reference list.
        Parameters:
        name - The 'Name' for the new Package, or null.
        Returns:
        The new Package.
        See Also:
        getNestedPackages()
      • createOwnedClass

        Class createOwnedClass​(String name,
                               boolean isAbstract)
        Creates a(n) (abstract) class with the specified name as an owned type of this package.
      • createOwnedEnumeration

        Enumeration createOwnedEnumeration​(String name)
        Creates a enumeration with the specified name as an owned type of this package.
      • createOwnedPrimitiveType

        PrimitiveType createOwnedPrimitiveType​(String name)
        Creates a primitive type with the specified name as an owned type of this package.
      • isProfileApplied

        boolean isProfileApplied​(Profile profile)
        Determines whether the specified profile is applied to this package.
      • allApplicableStereotypes

        org.eclipse.emf.common.util.EList<Stereotype> allApplicableStereotypes()
        The query allApplicableStereotypes() returns all the directly or indirectly owned stereotypes, including stereotypes contained in sub-profiles. result = (let ownedPackages : Bag(Package) = ownedMember->select(oclIsKindOf(Package))->collect(oclAsType(Package)) in ownedStereotype->union(ownedPackages.allApplicableStereotypes())->flatten()->asSet() )

        From package UML::Packages.

      • applyProfile

        MDWEList<org.eclipse.emf.ecore.EObject> applyProfile​(Profile profile)
        Applies the current definition of the specified profile to this package and automatically applies required stereotypes in the profile to elements within this package's namespace hieararchy. If a different definition is already applied, automatically migrates any associated stereotype values on a "best effort" basis (matching classifiers and structural features by name).
      • unapplyProfile

        MDWEList<org.eclipse.emf.ecore.EObject> unapplyProfile​(Profile profile)
        Unapplies the specified profile from this package and automatically unapplies stereotypes in the profile from elements within this package's namespace hieararchy.
      • getAppliedProfiles

        MDWEList<Profile> getAppliedProfiles()
        Retrieves the profiles that are applied to this package.
      • getAppliedProfile

        Profile getAppliedProfile​(String qualifiedName)
        Retrieves the profile with the specified qualified name that is applied to this package, or null if no such profile is applied.
      • getAppliedProfile

        Profile getAppliedProfile​(String qualifiedName,
                                  boolean recurse)
        Retrieves the profile with the specified qualified name that is applied to this package or any of its nesting packages (if indicated), or null if no such profile is applied.
      • getAllProfileApplications

        MDWEList<ProfileApplication> getAllProfileApplications()
        Retrieves all the profile applications for this package, including profile applications for its nesting package(s).
      • getProfileApplication

        ProfileApplication getProfileApplication​(Profile profile)
        Retrieves the application of the specified profile to this package, or null if no such profile is applied.
      • getProfileApplication

        ProfileApplication getProfileApplication​(Profile profile,
                                                 boolean recurse)
        Retrieves the application of the specified profile to this package or any of its nesting packages (if indicated), or null if no such profile is applied.
      • createOwnedInterface

        Interface createOwnedInterface​(String name)
        Creates an interface with the specified name as an owned type of this package.
      • isModelLibrary

        boolean isModelLibrary()
        Determines whether this package is a model library.
      • getAllAppliedProfiles

        MDWEList<Profile> getAllAppliedProfiles()
        Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).
      • visibleMembers

        MDWEList<PackageableElement> visibleMembers()
        The query visibleMembers() defines which members of a Package can be accessed outside it. result = member->select( m | self.makesVisible(m))
      • makesVisible

        boolean makesVisible​(NamedElement el)
        The query makesVisible() defines whether a Package makes an element visible outside itself. Elements with no visibility and elements with public visibility are made visible. self.member->includes(el) result = (ownedMember->includes(el)) or (elementImport->select(ei|ei.importedElement = #public)->collect(ei|ei.importedElement)->includes(el)) or (packageImport->select(pi|pi.visibility = #public)->collect(pi|pi.importedPackage.member->includes(el))->notEmpty())