Class Requirements

java.lang.Object
com.dassault_systemes.modeler.sysml.model.Requirements

@OpenApiAll public class Requirements extends Object
Utility class to work with RequirementUsage or RequirementDefinition
  • Constructor Details

    • Requirements

      public Requirements()
  • Method Details

    • isVerify

      public static boolean isVerify(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents a requirement verification.
      Parameters:
      membership - the membership
      Returns:
      true if the membership is a RequirementVerificationMembership
    • isStakeholder

      public static boolean isStakeholder(Feature feature)
      Checks whether the feature is a stakeholder parameter.
      Parameters:
      feature - the feature
      Returns:
      true if the feature is a stakeholder parameter
    • isStakeholder

      public static boolean isStakeholder(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents a stakeholder membership.
      Parameters:
      membership - the membership
      Returns:
      true if stakeholder membership
    • isFramedConcern

      public static boolean isFramedConcern(Feature feature)
      Checks whether the feature is a framed concern.
      Parameters:
      feature - the feature
      Returns:
      true if the feature is a framed concern
    • isFramedConcern

      public static boolean isFramedConcern(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents a framed concern membership.
      Parameters:
      membership - the membership
      Returns:
      true if framed concern membership
    • isRequirementParameter

      public static boolean isRequirementParameter(Feature feature)
      Checks whether the feature is a requirement parameter. Requirement parameters include:
      • actors
      • stakeholders
      • subjects
      Parameters:
      feature - the feature
      Returns:
      true if requirement parameter
    • isAssumedConstraint

      public static boolean isAssumedConstraint(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents an assumed requirement constraint.
      Parameters:
      membership - the membership
      Returns:
      true if assumed constraint
    • isRequiredConstraint

      public static boolean isRequiredConstraint(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents a required requirement constraint.
      Parameters:
      membership - the membership
      Returns:
      true if required constraint
    • isRequirementUsageOrDefinition

      public static boolean isRequirementUsageOrDefinition(@CheckForNull Element element)
      Checks whether the element is a requirement usage or definition.
      Parameters:
      element - the element
      Returns:
      true if requirement usage or definition
    • isRequirementUsageOrDefinition

      public static boolean isRequirementUsageOrDefinition(org.eclipse.emf.ecore.EClass eClass)
      Checks whether the given EClass represents a requirement usage or definition.
      Parameters:
      eClass - the class
      Returns:
      true if requirement usage or definition
    • isOwningTypeRequirementUsageOrDefinition

      public static boolean isOwningTypeRequirementUsageOrDefinition(RequirementUsage requirementUsage)
      Checks whether the owning type of the requirement usage is itself a requirement usage or definition.
      Parameters:
      requirementUsage - the requirement usage
      Returns:
      true if owning type is requirement usage or definition
    • getActualRequirementUsage

      @CheckForNull public static RequirementUsage getActualRequirementUsage(ConstraintUsage usage)
      Returns the actual requirement usage represented by the given constraint usage. For satisfy requirement usages, this returns the satisfied requirement.
      Parameters:
      usage - the constraint usage
      Returns:
      requirement usage, or null if none applies
    • getRequiredConstraint

      public static List<ConstraintUsage> getRequiredConstraint(Type type)
      Returns all required constraints of the given type.
      Parameters:
      type - the type
      Returns:
      list of required constraints
    • getOwnedRequiredConstraint

      public static List<ConstraintUsage> getOwnedRequiredConstraint(Type type)
      Returns the required constraints owned directly by the type.
      Parameters:
      type - the type
      Returns:
      list of owned required constraints
    • getAssumedConstraint

      public static List<ConstraintUsage> getAssumedConstraint(Type type)
      Returns all assumed constraints of the given type.
      Parameters:
      type - the type
      Returns:
      list of assumed constraints
    • getOwnedAssumedConstraint

      public static List<ConstraintUsage> getOwnedAssumedConstraint(Type type)
      Returns the assumed constraints owned directly by the type.
      Parameters:
      type - the type
      Returns:
      list of owned assumed constraints
    • getFramedConcern

      public static List<ConcernUsage> getFramedConcern(Type type)
      Returns all framed concerns of the given type.
      Parameters:
      type - the type
      Returns:
      list of framed concerns
    • getOwnedFramedConcern

      public static List<ConcernUsage> getOwnedFramedConcern(Type type)
      Returns the framed concerns owned directly by the type.
      Parameters:
      type - the type
      Returns:
      list of owned framed concerns
    • getReqId

      @CheckForNull public static String getReqId(Type type)
      Returns the requirement ID of the given type, if any.
      Parameters:
      type - the type
      Returns:
      requirement ID, or null if none exists
    • getStakeholderParameter

      public static List<PartUsage> getStakeholderParameter(Type type)
      Returns the stakeholder parameters of the given type.
      Parameters:
      type - the type
      Returns:
      list of stakeholder parameters
    • getOwnedStakeholderParameter

      public static List<PartUsage> getOwnedStakeholderParameter(Type type)
      Returns the stakeholder parameters owned directly by the type.
      Parameters:
      type - the type
      Returns:
      list of owned stakeholder parameters