Class ReferencingFeaturesAsRelationships
java.lang.Object
com.dassault_systemes.modeler.kerml.model.ReferencingFeaturesAsRelationships
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanBeSource(Feature relationship, Element source) Checks whether the given element can be used as the source of the relationship.static ElementFinds a suitable owner for the given relationship feature.static booleanisRelationship(ModelElement element) Checks whether the given model element represents a relationship.static booleanisRelationship(Feature feature) Checks whether the given feature represents a relationship.
-
Constructor Details
-
ReferencingFeaturesAsRelationships
public ReferencingFeaturesAsRelationships()
-
-
Method Details
-
isRelationship
Checks whether the given model element represents a relationship.- Parameters:
element- the model element to check- Returns:
- true if the element is a feature that represents a relationship
-
isRelationship
Checks whether the given feature represents a relationship.- Parameters:
feature- the feature to check- Returns:
- true if the feature is treated as a relationship
-
findOwner
Finds a suitable owner for the given relationship feature.- Parameters:
relationship- the relationship featureclient- the client element of the relationship- Returns:
- the element that should own the relationship, or null if none found
-
canBeSource
Checks whether the given element can be used as the source of the relationship.- Parameters:
relationship- the relationship featuresource- the potential source element- Returns:
- true if the element can be used as the source
-