Table of Contents

Class Port

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

A Port is a property of an EncapsulatedClassifier that specifies a distinct interaction point between that EncapsulatedClassifier and its environment or between the (behavior of the) EncapsulatedClassifier and its internal parts. Ports are connected to Properties of the EncapsulatedClassifier by Connectors through which requests can be made to invoke BehavioralFeatures. A Port may specify the services an EncapsulatedClassifier provides (offers) to its environment as well as the services that an EncapsulatedClassifier expects (requires) of its environment. A Port may have an associated ProtocolStateMachine. <p>From package UML::StructuredClassifiers.</p>

[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Port")]
public class Port : StructuralFeature, IPort, IProperty, IDeploymentTarget, IConnectableElement, IParameterableElement, IStructuralFeature, IMultiplicityElement, ITypedElement, IFeature, IRedefinableElement, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Port
Implements
Inherited Members

Constructors

Port()

Creates a new instance

public Port()

Properties

Aggregation

Specifies the kind of aggregation that applies to the Property. <p>From package UML::Classification.</p>

[XmlElementName("aggregation")]
[XmlAttribute(true)]
public AggregationKind Aggregation { get; set; }

Property Value

AggregationKind

AssociationEnd

Designates the optional association end that owns a qualifier attribute. <p>From package UML::Classification.</p>

[Browsable(false)]
[XmlElementName("associationEnd")]
[XmlAttribute(true)]
[XmlOpposite("qualifier")]
public IProperty AssociationEnd { get; set; }

Property Value

IProperty

Class

The Class that owns this Property, if any. <p>From package UML::Classification.</p>

[XmlElementName("class")]
[XmlAttribute(true)]
public IClass Class { get; set; }

Property Value

IClass

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

Datatype

The DataType that owns this Property, if any. <p>From package UML::Classification.</p>

[Browsable(false)]
[XmlElementName("datatype")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
public IDataType Datatype { get; set; }

Property Value

IDataType

DefaultValue

A ValueSpecification that is evaluated to give a default value for the Property when an instance of the owning Classifier is instantiated. <p>From package UML::Classification.</p>

[Browsable(false)]
[XmlElementName("defaultValue")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification DefaultValue { get; set; }

Property Value

IValueSpecification

Deployment

The set of Deployments for a DeploymentTarget. <p>From package UML::Deployments.</p>

[Browsable(false)]
[XmlElementName("deployment")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("location")]
public IOrderedSetExpression<IDeployment> Deployment { get; }

Property Value

IOrderedSetExpression<IDeployment>

Interface

The Interface that owns this Property, if any. <p>From package UML::Classification.</p>

[Browsable(false)]
[XmlElementName("interface")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
public IInterface Interface { get; set; }

Property Value

IInterface

IsBehavior

Specifies whether requests arriving at this Port are sent to the classifier behavior of this EncapsulatedClassifier. Such a Port is referred to as a behavior Port. Any invocation of a BehavioralFeature targeted at a behavior Port will be handled by the instance of the owning EncapsulatedClassifier itself, rather than by any instances that it may contain. <p>From package UML::StructuredClassifiers.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isBehavior")]
[XmlAttribute(true)]
public bool IsBehavior { get; set; }

Property Value

bool

IsConjugated

Specifies the way that the provided and required Interfaces are derived from the Port’s Type. <p>From package UML::StructuredClassifiers.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isConjugated")]
[XmlAttribute(true)]
public bool IsConjugated { get; set; }

Property Value

bool

IsDerived

Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information. <p>From package UML::Classification.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerived")]
[XmlAttribute(true)]
public bool IsDerived { get; set; }

Property Value

bool

IsDerivedUnion

Specifies whether the property is derived as the union of all of the Properties that are constrained to subset it. <p>From package UML::Classification.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerivedUnion")]
[XmlAttribute(true)]
public bool IsDerivedUnion { get; set; }

Property Value

bool

IsID

True indicates this property can be used to uniquely identify an instance of the containing Class. <p>From package UML::Classification.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isID")]
[XmlAttribute(true)]
public bool IsID { get; set; }

Property Value

bool

IsService

If true, indicates that this Port is used to provide the published functionality of an EncapsulatedClassifier. If false, this Port is used to implement the EncapsulatedClassifier but is not part of the essential externally-visible functionality of the EncapsulatedClassifier and can, therefore, be altered or deleted along with the internal implementation of the EncapsulatedClassifier and other properties that are considered part of its implementation. <p>From package UML::StructuredClassifiers.</p>

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isService")]
[XmlAttribute(true)]
public bool IsService { get; set; }

Property Value

bool

OwningAssociation

The owning association of this property, if any. <p>From package UML::Classification.</p>

[XmlElementName("owningAssociation")]
[XmlAttribute(true)]
[XmlOpposite("ownedEnd")]
public IAssociation OwningAssociation { get; set; }

Property Value

IAssociation

OwningTemplateParameter

The formal TemplateParameter that owns this ParameterableElement. <p>From package UML::CommonStructure.</p>

[XmlElementName("owningTemplateParameter")]
[XmlAttribute(true)]
[XmlOpposite("ownedParameteredElement")]
public ITemplateParameter OwningTemplateParameter { get; set; }

Property Value

ITemplateParameter

Protocol

An optional ProtocolStateMachine which describes valid interactions at this interaction point. <p>From package UML::StructuredClassifiers.</p>

[XmlElementName("protocol")]
[XmlAttribute(true)]
public IProtocolStateMachine Protocol { get; set; }

Property Value

IProtocolStateMachine

Qualifier

An optional list of ordered qualifier attributes for the end. <p>From package UML::Classification.</p>

[Browsable(false)]
[XmlElementName("qualifier")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("associationEnd")]
public IOrderedSetExpression<IProperty> Qualifier { get; }

Property Value

IOrderedSetExpression<IProperty>

RedefinedPort

A Port may be redefined when its containing EncapsulatedClassifier is specialized. The redefining Port may have additional Interfaces to those that are associated with the redefined Port or it may replace an Interface by one of its subtypes. <p>From package UML::StructuredClassifiers.</p>

[XmlElementName("redefinedPort")]
[XmlAttribute(true)]
public ISetExpression<IPort> RedefinedPort { get; }

Property Value

ISetExpression<IPort>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

SubsettedProperty

The properties of which this Property is constrained to be a subset, if any. <p>From package UML::Classification.</p>

[XmlElementName("subsettedProperty")]
[XmlAttribute(true)]
public ISetExpression<IProperty> SubsettedProperty { get; }

Property Value

ISetExpression<IProperty>

TemplateParameter

The TemplateParameter that exposes this ParameterableElement as a formal parameter. <p>From package UML::CommonStructure.</p>

[XmlElementName("templateParameter")]
[XmlAttribute(true)]
[XmlOpposite("parameteredElement")]
public ITemplateParameter TemplateParameter { get; set; }

Property Value

ITemplateParameter

Methods

BasicProvided()

The union of the sets of Interfaces realized by the type of the Port and its supertypes, or directly the type of the Port if the Port is typed by an Interface. result = (if type.oclIsKindOf(Interface) then type.oclAsType(Interface)->asSet() else type.oclAsType(Classifier).allRealizedInterfaces() endif) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> BasicProvided()

Returns

ISetExpression<IInterface>

BasicRequired()

The union of the sets of Interfaces used by the type of the Port and its supertypes. result = ( type.oclAsType(Classifier).allUsedInterfaces() ) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> BasicRequired()

Returns

ISetExpression<IInterface>

Binding_to_attribute(object, object)

A binding of a PropertyTemplateParameter representing an attribute must be to an attribute. (self.isAttribute() and (templateParameterSubstitution->notEmpty()) implies (templateParameterSubstitution->forAll(ts | ts.formal.oclIsKindOf(Property) and ts.formal.oclAsType(Property).isAttribute())))

public bool Binding_to_attribute(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Default_value(object, object)

A defaultValue for port cannot be specified when the type of the Port is an Interface. type.oclIsKindOf(Interface) implies defaultValue->isEmpty()

public bool Default_value(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Deployment_target(object, object)

A Property can be a DeploymentTarget if it is a kind of Node and functions as a part in the internal structure of an encompassing Node. deployment->notEmpty() implies owner.oclIsKindOf(Node) and Node.allInstances()->exists(n | n.part->exists(p | p = self))

public bool Deployment_target(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Derived_union_is_derived(object, object)

A derived union is derived. isDerivedUnion implies isDerived

public bool Derived_union_is_derived(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Derived_union_is_read_only(object, object)

A derived union is read only. isDerivedUnion implies isReadOnly

public bool Derived_union_is_read_only(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Encapsulated_owner(object, object)

All Ports are owned by an EncapsulatedClassifier. owner = encapsulatedClassifier

public bool Encapsulated_owner(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

GetAttributeValue(string, int)

Resolves the given attribute name

protected override object GetAttributeValue(string attribute, int index)

Parameters

attribute string

The requested attribute name

index int

The index of this attribute

Returns

object

The attribute value or null if it could not be found

GetClass()

Gets the Class for this model element

public override IClass GetClass()

Returns

IClass

GetCollectionForFeature(string)

Gets the Model element collection for the given feature

protected override IList GetCollectionForFeature(string feature)

Parameters

feature string

The requested feature

Returns

IList

A non-generic list of elements

GetCompositionName(object)

Gets the property name for the given container

protected override string GetCompositionName(object container)

Parameters

container object

The container object

Returns

string

The name of the respective container reference

GetDefault()

Retrieves a string representation of the default value for this property.

public string GetDefault()

Returns

string

GetDeployedElements()

Derivation for DeploymentTarget::/deployedElement result = (deployment.deployedArtifact->select(oclIsKindOf(Artifact))->collect(oclAsType(Artifact).manifestation)->collect(utilizedElement)->asSet()) <p>From package UML::Deployments.</p>

public ISetExpression<IPackageableElement> GetDeployedElements()

Returns

ISetExpression<IPackageableElement>

GetEnds()

Derivation for ConnectableElement::/end : ConnectorEnd result = (ConnectorEnd.allInstances()->select(role = self)) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IConnectorEnd> GetEnds()

Returns

ISetExpression<IConnectorEnd>

GetExpressionForAttribute(string)

Gets the property expression for the given attribute

protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)

Parameters

attribute string

The requested attribute in upper case

Returns

INotifyExpression<object>

An incremental property expression

GetExpressionForReference(string)

Gets the property expression for the given reference

protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)

Parameters

reference string

The requested reference in upper case

Returns

INotifyExpression<IModelElement>

An incremental property expression

GetModelElementForReference(string, int)

Resolves the given URI to a child model element

protected override IModelElement GetModelElementForReference(string reference, int index)

Parameters

reference string

The requested reference name

index int

The index of this reference

Returns

IModelElement

The model element or null if it could not be found

GetOpposite()

If this property is a memberEnd of a binary association, then opposite gives the other end. result = (if association <> null and association.memberEnd->size() = 2 then association.memberEnd->any(e | e <> self) else null endif) <p>From package UML::Classification.</p>

public IProperty GetOpposite()

Returns

IProperty

GetOtherEnd()

Retrieves the other end of the (binary) association in which this property is a member end.

public IProperty GetOtherEnd()

Returns

IProperty

GetProvideds()

Derivation for Port::/provided result = (if isConjugated then basicRequired() else basicProvided() endif) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> GetProvideds()

Returns

ISetExpression<IInterface>

GetRelativePathForNonIdentifiedChild(IModelElement)

Gets the relative URI fragment for the given child model element

protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)

Parameters

element IModelElement

The element that should be looked for

Returns

string

A fragment of the relative URI

GetRequireds()

Derivation for Port::/required result = (if isConjugated then basicProvided() else basicRequired() endif) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> GetRequireds()

Returns

ISetExpression<IInterface>

IsAttribute()

The query isAttribute() is true if the Property is defined as an attribute of some Classifier. result = (not classifier->isEmpty()) <p>From package UML::Classification.</p>

public bool IsAttribute()

Returns

bool

IsCompatibleWith(IParameterableElement)

The query isCompatibleWith() determines if this ParameterableElement is compatible with the specified ParameterableElement. By default, this ParameterableElement is compatible with another ParameterableElement p if the kind of this ParameterableElement is the same as or a subtype of the kind of p. Subclasses of ParameterableElement should override this operation to specify different compatibility constraints. result = (self.oclIsKindOf(p.oclType())) <p>From package UML::CommonStructure.</p>

public bool IsCompatibleWith(IParameterableElement p)

Parameters

p IParameterableElement

Returns

bool

IsNavigable()

The query isNavigable() indicates whether it is possible to navigate across the property. result = (not classifier->isEmpty() or association.navigableOwnedEnd->includes(self)) <p>From package UML::Classification.</p>

public bool IsNavigable()

Returns

bool

IsSetDefault()

public bool IsSetDefault()

Returns

bool

IsTemplateParameter()

The query isTemplateParameter() determines if this ParameterableElement is exposed as a formal TemplateParameter. result = (templateParameter->notEmpty()) <p>From package UML::CommonStructure.</p>

public bool IsTemplateParameter()

Returns

bool

Multiplicity_of_composite(object, object)

A multiplicity on the composing end of a composite aggregation must not have an upper bound greater than 1. isComposite and association <> null implies opposite.upperBound() <= 1

public bool Multiplicity_of_composite(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Port_aggregation(object, object)

Port.aggregation must be composite. aggregation = AggregationKind::composite

public bool Port_aggregation(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Qualified_is_association_end(object, object)

All qualified Properties must be Association ends qualifier->notEmpty() implies association->notEmpty()

public bool Qualified_is_association_end(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Redefined_property_inherited(object, object)

A redefined Property must be inherited from a more general Classifier. (redefinedProperty->notEmpty()) implies (redefinitionContext->notEmpty() and redefinedProperty->forAll(rp| ((redefinitionContext->collect(fc| fc.allParents()))->asSet())->collect(c| c.allFeatures())->asSet()->includes(rp)))

public bool Redefined_property_inherited(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

SetBooleanDefaultValue(bool)

Sets the default value for this property to the specified Boolean value.

public void SetBooleanDefaultValue(bool value)

Parameters

value bool

The new default value.

SetDefault(string)

Sets the default value for this property based on the specified string representation.

public void SetDefault(string newDefault)

Parameters

newDefault string

A string repesentation of the new default value.

SetFeature(string, object)

Sets a value to the given feature

protected override void SetFeature(string feature, object value)

Parameters

feature string

The requested feature

value object

The value that should be set to that feature

SetIntegerDefaultValue(int)

Sets the default value for this property to the specified integer value.

public void SetIntegerDefaultValue(int value)

Parameters

value int

The new default value.

SetIsComposite(bool)

public void SetIsComposite(bool newIsComposite)

Parameters

newIsComposite bool

SetIsNavigable(bool)

Sets the navigability of this property as indicated.

public void SetIsNavigable(bool isNavigable)

Parameters

isNavigable bool

The new navigability.

SetNullDefaultValue()

Sets the default value for this property to the null value.

public void SetNullDefaultValue()

SetOpposite(IProperty)

public void SetOpposite(IProperty newOpposite)

Parameters

newOpposite IProperty

SetRealDefaultValue(double)

Sets the default value for this property to the specified real value.

public void SetRealDefaultValue(double value)

Parameters

value double

The new default value.

SetStringDefaultValue(string)

Sets the default value for this property to the specified string value.

public void SetStringDefaultValue(string value)

Parameters

value string

The new default value.

SetUnlimitedNaturalDefaultValue(object)

Sets the default value for this property to the specified unlimited natural value.

public void SetUnlimitedNaturalDefaultValue(object value)

Parameters

value object

The new default value.

Subsetted_property_names(object, object)

A Property may not subset a Property with the same name. subsettedProperty->forAll(sp | sp.name <> name)

public bool Subsetted_property_names(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

SubsettingContext()

The query subsettingContext() gives the context for subsetting a Property. It consists, in the case of an attribute, of the corresponding Classifier, and in the case of an association end, all of the Classifiers at the other ends. result = (if association <> null then association.memberEnd->excluding(self)->collect(type)->asSet() else if classifier<>null then classifier->asSet() else Set{} endif endif) <p>From package UML::Classification.</p>

public ISetExpression<IType> SubsettingContext()

Returns

ISetExpression<IType>

Subsetting_context_conforms(object, object)

Subsetting may only occur when the context of the subsetting property conforms to the context of the subsetted property. subsettedProperty->notEmpty() implies (subsettingContext()->notEmpty() and subsettingContext()->forAll (sc | subsettedProperty->forAll(sp | sp.subsettingContext()->exists(c | sc.conformsTo(c)))))

public bool Subsetting_context_conforms(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Subsetting_rules(object, object)

A subsetting Property may strengthen the type of the subsetted Property, and its upper bound may be less. subsettedProperty->forAll(sp | self.type.conformsTo(sp.type) and ((self.upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies self.upperBound() <= sp.upperBound() ))

public bool Subsetting_rules(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Type_of_opposite_end(object, object)

If a Property is a classifier-owned end of a binary Association, its owner must be the type of the opposite end. (opposite->notEmpty() and owningAssociation->isEmpty()) implies classifier = opposite.type

public bool Type_of_opposite_end(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

UnsetDefault()

public void UnsetDefault()