Class Port
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
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
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
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
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
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
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
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
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Encapsulated_owner(object, object)
All Ports are owned by an EncapsulatedClassifier. owner = encapsulatedClassifier
public bool Encapsulated_owner(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
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
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe 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
objectThe 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
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
GetEnds()
Derivation for ConnectableElement::/end : ConnectorEnd result = (ConnectorEnd.allInstances()->select(role = self)) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IConnectorEnd> GetEnds()
Returns
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe 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
stringThe 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
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
GetOtherEnd()
Retrieves the other end of the (binary) association in which this property is a member end.
public IProperty GetOtherEnd()
Returns
GetProvideds()
Derivation for Port::/provided result = (if isConjugated then basicRequired() else basicProvided() endif) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IInterface> GetProvideds()
Returns
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe 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
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
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
Returns
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
IsSetDefault()
public bool IsSetDefault()
Returns
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
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Port_aggregation(object, object)
Port.aggregation must be composite. aggregation = AggregationKind::composite
public bool Port_aggregation(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SetBooleanDefaultValue(bool)
Sets the default value for this property to the specified Boolean value.
public void SetBooleanDefaultValue(bool value)
Parameters
value
boolThe 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
stringA 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
SetIntegerDefaultValue(int)
Sets the default value for this property to the specified integer value.
public void SetIntegerDefaultValue(int value)
Parameters
value
intThe 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
boolThe 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
doubleThe new default value.
SetStringDefaultValue(string)
Sets the default value for this property to the specified string value.
public void SetStringDefaultValue(string value)
Parameters
value
stringThe 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
objectThe 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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
UnsetDefault()
public void UnsetDefault()