Class Element
This is the superclass for all model elements.
[DataContract]
public abstract class Element : ModelItem
- Inheritance
-
Element
- Derived
- Inherited Members
Properties
CanonicalName
Gets the canonical name that uniquely identifies this element within the model.
public abstract string CanonicalName { get; }
Property Value
Description
A short description of this element.
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Model
The model that contains this element.
public Model Model { get; set; }
Property Value
Name
The name of this element.
[DataMember(Name = "name", EmitDefaultValue = false)]
public virtual string Name { get; }
Property Value
Parent
Gets or sets the parent element in the model hierarchy.
public abstract Element Parent { get; set; }
Property Value
Relationships
The outgoing relationships owned by this element.
[DataMember(Name = "relationships", EmitDefaultValue = false)]
public ISet<Relationship> Relationships { get; }
Property Value
Url
The URL where more information about this element can be found.
[DataMember(Name = "url", EmitDefaultValue = false)]
public string Url { get; set; }
Property Value
Methods
Equals(Element)
Compares this element with another element by canonical name.
public bool Equals(Element element)
Parameters
elementElementThe element to compare with.
Returns
Equals(object)
Compares this element with another object by canonical name.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with.
Returns
GetEfferentRelationshipWith(Element)
Gets the efferent (outgoing) relationship with the specified element.
public Relationship GetEfferentRelationshipWith(Element element)
Parameters
elementElementthe element to look for
Returns
- Relationship
a Relationship object if an efferent relationship exists, null otherwise
GetEfferentRelationshipWith(Element, string)
Gets the efferent (outgoing) relationship with the specified element and description.
public Relationship GetEfferentRelationshipWith(Element element, string description)
Parameters
Returns
- Relationship
a Relationship object, or null if the specified relationship doesn't exist
GetEfferentRelationshipsWith(Element)
Gets the efferent (outgoing) relationships with the specified element.
public ISet<Relationship> GetEfferentRelationshipsWith(Element element)
Parameters
elementElementthe element to look for
Returns
- ISet<Relationship>
a Set of Relationship objects; empty if no relationships exist
Has(Relationship)
Determines whether this element already owns the specified outgoing relationship.
public bool Has(Relationship relationship)
Parameters
relationshipRelationshipThe relationship to look for.
Returns
HasAfferentRelationships()
Determines whether this element has afferent (incoming) relationships.
public bool HasAfferentRelationships()
Returns
- bool
true if this element has afferent relationships, false otherwise
HasEfferentRelationshipWith(Element)
Determines whether this element has an efferent (outgoing) relationship with the specified element.
public bool HasEfferentRelationshipWith(Element element)
Parameters
elementElementthe element to look for
Returns
- bool
true if this element has an efferent relationship with the specified element, false otherwise
HasEfferentRelationshipWith(Element, string)
Determines whether this element has an efferent (outgoing) relationship with the specified element and description.
public bool HasEfferentRelationshipWith(Element element, string description)
Parameters
Returns
- bool
true if this element has an efferent relationship with the specified element and description, false otherwise
ToString()
Returns a readable representation containing the element ID, name, and description.
public override string ToString()
Returns
- string
A string representation of this element.