Class Subjects
java.lang.Object
com.dassault_systemes.modeler.sysml.model.Subjects
Utility class providing helper methods for working with Subjects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UsagecreateSubject(Type type, int relationshipPosition) Creates a new subject parameter on the given type at the specified relationship position.static UsagegetOwnedSubjectParameter(Type type) Returns the subject parameter owned by the given type, if any.static ExpressionReturns the owned value expression of the subject parameter, if any.static ExpressionReturns the value expression of the owned subject parameter, if any.static UsagegetSubjectParameter(Type type) Returns the subject parameter of the given type, if the type supports subject parameters (e.g., requirements and cases).static booleanChecks whether the given feature is a subject parameter.static booleanisSubject(FeatureMembership membership) Checks whether the given membership represents a subject membership.
-
Constructor Details
-
Subjects
public Subjects()
-
-
Method Details
-
createSubject
Creates a new subject parameter on the given type at the specified relationship position. The subject is represented as aReferenceUsagewithFeatureDirectionKind.INdirection, owned through aSubjectMembership.- Parameters:
type- the type on which the subject is createdrelationshipPosition- index at which the membership is inserted, or a negative value to append- Returns:
- the created subject parameter
-
getOwnedSubjectParameter
Returns the subject parameter owned by the given type, if any.- Parameters:
type- the type- Returns:
- subject parameter, or null if none exists
-
getOwnedSubjectParameterValue
Returns the value expression of the owned subject parameter, if any.- Parameters:
type- the type- Returns:
- value expression, or null if none exists
-
getOwnedSubjectParameterOwnedValue
Returns the owned value expression of the subject parameter, if any. This retrieves the expression directly owned by the feature value.- Parameters:
type- the type- Returns:
- owned value expression, or null if none exists
-
isSubject
Checks whether the given feature is a subject parameter.- Parameters:
feature- the feature- Returns:
- true if the feature is a subject parameter
-
isSubject
Checks whether the given membership represents a subject membership.- Parameters:
membership- the membership- Returns:
- true if the membership is a
SubjectMembership
-
getSubjectParameter
Returns the subject parameter of the given type, if the type supports subject parameters (e.g., requirements and cases).- Parameters:
type- the type- Returns:
- subject parameter, or null if none exists
-