Interface INamedElement
The public interface for NamedElement
[DefaultImplementationType(typeof(NamedElement))]
[XmlDefaultImplementationType(typeof(NamedElement))]
[ModelRepresentationClass("http://schema.omg.org/spec/MOF/2.0/cmof.xml#//NamedElement")]
public interface INamedElement : IElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inherited Members
Properties
Name
The name of the NamedElement.
[XmlElementName("name")]
[Id]
[XmlAttribute(true)]
string Name { get; set; }
Property Value
Visibility
Determines the visibility of the NamedElement within different Namespaces within the overall model.
[XmlElementName("visibility")]
[XmlAttribute(true)]
VisibilityKind? Visibility { get; set; }
Property Value
Methods
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
IOrderedSetExpression<INamespace> AllNamespaces()
Returns
IsDistinguishableFrom(INamedElement, INamespace)
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
bool IsDistinguishableFrom(INamedElement n, INamespace ns)
Parameters
n
INamedElementns
INamespace
Returns
No_name(object, object)
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()
bool No_name(object diagnostics, object context)
Parameters
Returns
QualifiedName()
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. result = if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty() then self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) else Set{} endif
string QualifiedName()
Returns
Qualified_name(object, object)
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))
bool Qualified_name(object diagnostics, object context)
Parameters
Returns
Separator()
The query separator() gives the string that is used to separate names when constructing a qualified name. result = '::'
string Separator()
Returns
Visibility_needs_ownership(object, object)
If a NamedElement is not owned by a Namespace, it does not have a visibility. namespace->isEmpty() implies visibility->isEmpty()
bool Visibility_needs_ownership(object diagnostics, object context)