Interface NamedElement

    • Method Detail

      • isSetName

        boolean isSetName()
        Returns whether the value of the 'Name' attribute is set.
        Returns:
        whether the value of the 'Name' attribute is set.
        See Also:
        unsetName(), getName(), setName(String)
      • getQualifiedName

        String getQualifiedName()
        Returns the value of the 'Qualified Name' attribute. A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.
        Returns:
        the value of the 'Qualified Name' attribute.
        See Also:
        UMLPackage.getNamedElement_QualifiedName()
      • getClientDependency

        Dependency getClientDependency​(String name,
                                       boolean ignoreCase,
                                       org.eclipse.emf.ecore.EClass eClass)
        Retrieves the first Dependency with the specified 'Name' from the ' Client Dependency' reference list.
        Parameters:
        name - The 'Name' of the Dependency to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        eClass - The Ecore class of the Dependency to retrieve, or null.
        Returns:
        The first Dependency with the specified 'Name', or null.
        See Also:
        getClientDependencies()
      • validateHasNoQualifiedName

        boolean validateHasNoQualifiedName​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                           Map context)
        If there is no name, or one of the containing namespaces has no name, there is no qualified name. (self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()) implies self.qualifiedName->isEmpty()
      • validateHasQualifiedName

        boolean validateHasQualifiedName​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                         Map context)
        When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. (self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))
      • validateVisibilityNeedsOwnership

        boolean validateVisibilityNeedsOwnership​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                 Map context)
        If a NamedElement is not owned by a Namespace, it does not have a visibility. namespace->isEmpty() implies visibility->isEmpty()
      • createDependency

        Dependency createDependency​(NamedElement supplier)
        Creates a dependency between this named element and the specified supplier, owned by this named element's nearest package.
      • getLabel

        String getLabel()
        Retrieves a localized label for this named element.
      • getLabel

        String getLabel​(boolean localize)
        Retrieves a label for this named element, localized if indicated.
      • allNamespaces

        MDWEList<Namespace> allNamespaces()
        The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards. result = if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif
      • isDistinguishableFrom

        boolean isDistinguishableFrom​(NamedElement n,
                                      Namespace ns)
        The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names. result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType) then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty() else true endif
      • separator

        String separator()
        The query separator() gives the string that is used to separate names when constructing a qualified name. result = '::'
      • allOwningPackages

        MDWEList<Package> allOwningPackages()
        The query allOwningPackages() returns all the directly or indirectly owning packages. result = self.namespace->select(p | p.oclIsKindOf(Package))->union(p.allOwningPackages())