Interface NameSpace

All Known Implementing Classes:
Default­Name­Space

@UML(identifier="NameSpace", specification=ISO_19103) public interface NameSpace
A domain in which names given by character strings are defined. Every Generic­Name must be valid in a namespace. For a Local­Name, this means that the name must exist in the current namespace. For a Scoped­Name, this means:

  1. The head of a Scoped­Name must be a Local­Name which is valid in this namespace.
  2. The tail must either be:
    • a Local­Name which is valid in the Name­Space associated with the head, or
    • another Scoped­Name with these same constraints on head and tail, applied to the Name­Space associated with the head.
Since:
2.1
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether this namespace is a "top level" namespace.
    Represents the identifier of this namespace.
  • Method Details

    • isGlobal

      @UML(identifier="isGlobal", obligation=MANDATORY, specification=ISO_19103) boolean isGlobal()
      Indicates whether this namespace is a "top level" namespace. Global, or top-level namespaces are not contained within another namespace. There is no namespace called "global" or "root" which contains all of the top-level namespaces. Hence, this flag indicates whether the namespace has a parent.
      Returns:
      true if this namespace has no parent.
    • name

      Represents the identifier of this namespace. If the global attribute is true, indicating that this is a top level Name­Space, then the name shall be a local name. If false, name shall be a fully-qualified name where name.scope().is­Global() == true.
      Returns:
      The identifier of this namespace.