org.eclipse.uml2.uml
Interface Connector

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, Feature, NamedElement, org.eclipse.emf.common.notify.Notifier, RedefinableElement

public interface Connector
extends Feature

A representation of the model object 'Connector'. A Connector specifies links that enables communication between two or more instances. In contrast to Associations, which specify links between any instance of the associated Classifiers, Connectors specify links between instances playing the connected parts only.

From package UML::StructuredClassifiers.

The following features are supported:

See Also:
UMLPackage.getConnector()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 ConnectorEnd createEnd()
          Creates a new ConnectorEnd and appends it to the 'End' containment reference list
 Behavior getContract(java.lang.String name)
          Retrieves the first Behavior with the specified 'Name' from the 'Contract' reference list
 Behavior getContract(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first Behavior with the specified 'Name' from the 'Contract' reference list
 org.eclipse.emf.common.util.EList<Behavior> getContracts()
          Returns the value of the 'Contract' reference list.
 org.eclipse.emf.common.util.EList<ConnectorEnd> getEnds()
          Returns the value of the 'End' containment reference list.
 ConnectorKind getKind()
          Returns the value of the 'Kind' attribute.
 Connector getRedefinedConnector(java.lang.String name)
          Retrieves the first Connector with the specified 'Name' from the 'Redefined Connector' reference list
 Connector getRedefinedConnector(java.lang.String name, boolean ignoreCase)
          Retrieves the first Connector with the specified 'Name' from the 'Redefined Connector' reference list
 org.eclipse.emf.common.util.EList<Connector> getRedefinedConnectors()
          Returns the value of the 'Redefined Connector' reference list.
 Association getType()
          Returns the value of the 'Type' reference
 void setType(Association value)
          Sets the value of the 'Type' reference
 boolean validateRoles(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The ConnectableElements attached as roles to each ConnectorEnd owned by a Connector must be owned or inherited roles of the Classifier that owned the Connector, or they must be Ports of such roles.
 boolean validateTypes(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The types of the ConnectableElements that the ends of a Connector are attached to must conform to the types of the ends of the Association that types the Connector, if any.
 
Methods inherited from interface org.eclipse.uml2.uml.Feature
getFeaturingClassifier, getFeaturingClassifier, getFeaturingClassifiers, isStatic, setIsStatic
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateNonLeafRedefinition, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getType

Association getType()
Returns the value of the 'Type' reference. An optional Association that classifies links corresponding to this Connector.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Type' reference.
See Also:
setType(Association), UMLPackage.getConnector_Type()

setType

void setType(Association value)
Sets the value of the 'Type' reference.

Parameters:
value - the new value of the 'Type' reference.
See Also:
getType()

getRedefinedConnectors

org.eclipse.emf.common.util.EList<Connector> getRedefinedConnectors()
Returns the value of the 'Redefined Connector' reference list. The list contents are of type Connector.

This feature subsets the following features:

A Connector may be redefined when its containing Classifier is specialized. The redefining Connector may have a type that specializes the type of the redefined Connector. The types of the ConnectorEnds of the redefining Connector may specialize the types of the ConnectorEnds of the redefined Connector. The properties of the ConnectorEnds of the redefining Connector may be replaced.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Redefined Connector' reference list.
See Also:
UMLPackage.getConnector_RedefinedConnector()

getRedefinedConnector

Connector getRedefinedConnector(java.lang.String name)
Retrieves the first Connector with the specified 'Name' from the 'Redefined Connector' reference list.

Parameters:
name - The 'Name' of the Connector to retrieve, or null.
Returns:
The first Connector with the specified 'Name', or null.
See Also:
getRedefinedConnectors()

getRedefinedConnector

Connector getRedefinedConnector(java.lang.String name,
                                boolean ignoreCase)
Retrieves the first Connector with the specified 'Name' from the 'Redefined Connector' reference list.

Parameters:
name - The 'Name' of the Connector to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first Connector with the specified 'Name', or null.
See Also:
getRedefinedConnectors()

getEnds

org.eclipse.emf.common.util.EList<ConnectorEnd> getEnds()
Returns the value of the 'End' containment reference list. The list contents are of type ConnectorEnd.

This feature subsets the following features:

A Connector has at least two ConnectorEnds, each representing the participation of instances of the Classifiers typing the ConnectableElements attached to the end. The set of ConnectorEnds is ordered.

From package UML::StructuredClassifiers.

Returns:
the value of the 'End' containment reference list.
See Also:
UMLPackage.getConnector_End()

createEnd

ConnectorEnd createEnd()
Creates a new ConnectorEnd and appends it to the 'End' containment reference list.

Returns:
The new ConnectorEnd.
See Also:
getEnds()

getKind

ConnectorKind getKind()
Returns the value of the 'Kind' attribute. The literals are from the enumeration ConnectorKind. Indicates the kind of Connector. This is derived: a Connector with one or more ends connected to a Port which is not on a Part and which is not a behavior port is a delegation; otherwise it is an assembly.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Kind' attribute.
See Also:
ConnectorKind, UMLPackage.getConnector_Kind()

getContracts

org.eclipse.emf.common.util.EList<Behavior> getContracts()
Returns the value of the 'Contract' reference list. The list contents are of type Behavior. The set of Behaviors that specify the valid interaction patterns across the Connector.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Contract' reference list.
See Also:
UMLPackage.getConnector_Contract()

getContract

Behavior getContract(java.lang.String name)
Retrieves the first Behavior with the specified 'Name' from the 'Contract' reference list.

Parameters:
name - The 'Name' of the Behavior to retrieve, or null.
Returns:
The first Behavior with the specified 'Name', or null.
See Also:
getContracts()

getContract

Behavior getContract(java.lang.String name,
                     boolean ignoreCase,
                     org.eclipse.emf.ecore.EClass eClass)
Retrieves the first Behavior with the specified 'Name' from the 'Contract' reference list.

Parameters:
name - The 'Name' of the Behavior to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Behavior to retrieve, or null.
Returns:
The first Behavior with the specified 'Name', or null.
See Also:
getContracts()

validateTypes

boolean validateTypes(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                      java.util.Map<java.lang.Object,java.lang.Object> context)
The types of the ConnectableElements that the ends of a Connector are attached to must conform to the types of the ends of the Association that types the Connector, if any. type<>null implies let noOfEnds : Integer = end->size() in (type.memberEnd->size() = noOfEnds) and Sequence{1..noOfEnds}->forAll(i | end->at(i).role.type.conformsTo(type.memberEnd->at(i).type))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateRoles

boolean validateRoles(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                      java.util.Map<java.lang.Object,java.lang.Object> context)
The ConnectableElements attached as roles to each ConnectorEnd owned by a Connector must be owned or inherited roles of the Classifier that owned the Connector, or they must be Ports of such roles. structuredClassifier <> null and end->forAll( e | structuredClassifier.allRoles()->includes(e.role) or e.role.oclIsKindOf(Port) and structuredClassifier.allRoles()->includes(e.partWithPort))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.