Class Directions

java.lang.Object
com.dassault_systemes.modeler.kerml.model.Directions

@OpenApiAll public class Directions extends Object
Utility class to work with a direction of Feature
  • Constructor Details

    • Directions

      public Directions()
  • Method Details

    • getDirectionInOwningType

      @CheckForNull public static FeatureDirectionKind getDirectionInOwningType(Feature feature, @CheckForNull Type owningType)
      Returns the direction of the feature within the given owning type.
      Parameters:
      feature - the feature
      owningType - the type in which direction is evaluated
      Returns:
      direction of the feature in the owning type, or null
    • isInputInOwningType

      public static boolean isInputInOwningType(Feature feature)
      Checks whether the feature is an input in its owning type.
      Parameters:
      feature - the feature
      Returns:
      true if the feature is an input
    • isInputInOwningType

      public static boolean isInputInOwningType(Feature feature, @CheckForNull Type owningType)
      Checks whether the feature is an input in the given owning type.
      Parameters:
      feature - the feature
      owningType - the type in which direction is evaluated
      Returns:
      true if the feature is an input
    • isOutputInOwningType

      public static boolean isOutputInOwningType(Feature feature)
      Checks whether the feature is an output in its owning type.
      Parameters:
      feature - the feature
      Returns:
      true if the feature is an output
    • isOutputInOwningType

      public static boolean isOutputInOwningType(Feature feature, @CheckForNull Type owningType)
      Checks whether the feature is an output in the given owning type.
      Parameters:
      feature - the feature
      owningType - the type in which direction is evaluated
      Returns:
      true if the feature is an output
    • isInDirection

      public static boolean isInDirection(@CheckForNull FeatureDirectionKind direction)
      Returns true if the direction is input or bidirectional.
      Parameters:
      direction - the direction
      Returns:
      true if input-like
    • isOutDirection

      public static boolean isOutDirection(@CheckForNull FeatureDirectionKind direction)
      Returns true if the direction is output or bidirectional.
      Parameters:
      direction - the direction
      Returns:
      true if output-like
    • getDirectionByFeatures

      @CheckForNull public static FeatureDirectionKind getDirectionByFeatures(Feature feature)
      Calculates direction by direction of its features Type.getFeature().
      Parameters:
      feature - given feature
      Returns:
      direction by features or null if all features are non-directional or there are no features
    • getDirection

      @CheckForNull public static FeatureDirectionKind getDirection(Feature feature, @CheckForNull Type context)
      Returns the direction of the feature in the given context. If the feature has an explicit direction and the context is non-null, the direction is resolved relative to the containing type.
      Parameters:
      feature - the feature
      context - the context type
      Returns:
      direction, or null
    • getEffectiveDirection

      @CheckForNull public static FeatureDirectionKind getEffectiveDirection(Feature feature, @CheckForNull Type context)
      Provides an effective or actual direction for a given Feature. Effective direction can be calculated, for example, from owned features.
      Parameters:
      feature - feature
      context - context of feature
      Returns:
      direction