Class FeatureChainExpressions
java.lang.Object
com.dassault_systemes.modeler.kerml.model.FeatureChainExpressions
Utility class to work with
FeatureChainExpression-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FeatureChainExpressioncreate(Expression pureExpression, List<Feature> target) Creates a feature chain expression using a pure source expression and a target feature list.static FeatureChainExpressionCreates a feature chain expression from a list of source and target features.static ExpressioncreateChainOrReferenceExpression(List<Feature> referenced) CreatesFeatureChainExpressionif more than one feature is given orFeatureReferenceExpressionif one.getChainingFeatureOfTarget(FeatureChainExpression expression) Returns the chaining features of the target feature.getSourceAndTarget(FeatureChainExpression featureChainExpression) Returns the full source-and-target feature path of the chain expression.static FeaturegetSourceParameter(FeatureChainExpression expression) Returns the source parameter of the chain expression.static MembershipgetTargetFeatureMembership(FeatureChainExpression expression) Returns the membership storing the target feature(s).static ExpressionsetSourceExpressionAndTarget(FeatureChainExpression expression, Expression pureExpression, List<Feature> target) Updates source and target in the given expressionstatic voidsetSourceReferent(FeatureChainExpression expression, Feature referent) Sets the source referent of the feature chain expression.static ExpressionsetSourceReferentAndTarget(FeatureChainExpression expression, List<Feature> sourceAndTarget) Updates source and target in the given expression or creates a newFeatureReferenceExpressionstatic voidsetTargetFeature(FeatureChainExpression expression, List<Feature> target) Sets the target features of the feature chain expression.
-
Field Details
-
OPERATOR
- See Also:
-
-
Constructor Details
-
FeatureChainExpressions
public FeatureChainExpressions()
-
-
Method Details
-
createChainOrReferenceExpression
CreatesFeatureChainExpressionif more than one feature is given orFeatureReferenceExpressionif one.- Parameters:
referenced- features- Returns:
- created expression
-
create
Creates a feature chain expression using a pure source expression and a target feature list.- Parameters:
pureExpression- pure expression used as the chain sourcetarget- target features- Returns:
- created feature chain expression
-
create
Creates a feature chain expression from a list of source and target features.- Parameters:
sourceAndTarget- list containing source followed by target features- Returns:
- created feature chain expression
-
setSourceReferent
Sets the source referent of the feature chain expression.- Parameters:
expression- expression to updatereferent- source feature
-
setTargetFeature
Sets the target features of the feature chain expression.- Parameters:
expression- expression to updatetarget- target features
-
getTargetFeatureMembership
@CheckForNull public static Membership getTargetFeatureMembership(FeatureChainExpression expression) Returns the membership storing the target feature(s).- Parameters:
expression- expression- Returns:
- membership, or null
-
setSourceReferentAndTarget
public static Expression setSourceReferentAndTarget(FeatureChainExpression expression, List<Feature> sourceAndTarget) Updates source and target in the given expression or creates a newFeatureReferenceExpression- Parameters:
expression- expressionsourceAndTarget- source used in FeatureReferenceExpressions as referent and target- Returns:
- returns given or a new expression
-
setSourceExpressionAndTarget
public static Expression setSourceExpressionAndTarget(FeatureChainExpression expression, Expression pureExpression, List<Feature> target) Updates source and target in the given expression- Parameters:
expression- expressionpureExpression- expression used to set FeatureChainExpression source valuetarget- target- Returns:
- returns given expression
-
getSourceParameter
Returns the source parameter of the chain expression.- Parameters:
expression- expression- Returns:
- source parameter, or null
-
getSourceAndTarget
Returns the full source-and-target feature path of the chain expression.- Parameters:
featureChainExpression- chain expression- Returns:
- list of source and target features
-
getChainingFeatureOfTarget
Returns the chaining features of the target feature.- Parameters:
expression- chain expression- Returns:
- list of chaining features, or empty list
-