Class SysMLUtility

  • Direct Known Subclasses:
    SysMLUtilities

    @OpenApiAll
    public class SysMLUtility
    extends java.lang.Object
    SysML utilities.
    • Constructor Summary

      Constructors 
      Constructor Description
      SysMLUtility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDirectionForPort​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
      Return element direction
      static SysMLUtility.DirectedFeature getFeatureDirection​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Feature feature)
      Returns DirectedFeatures featureDirection tag value
      static SysMLUtility.FlowDirection getFlowDirection​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
      Return the direction from element with flow direction (Flow Port and Flow Property)
      private static java.lang.String getFlowPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)  
      private static java.lang.String getFullPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)  
      private static java.lang.String getPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)  
      static boolean isAtomicFlowPort​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)
      Check if flowPort is atomic or not.
      static boolean isBlockNotConstraint​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
      Check if an element is a block or a derived block but not a constraint block (or derived).
      static boolean isEncapsulated​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
      Check the isEncapsulated of element element.
      static boolean isInterfaceBlockNotConstraint​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
      Check if an element is a InterfaceBlock or a derived InterfaceBlock but not a constraint block (or derived).
      static void setDirectionForFlowPort​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port, SysMLUtility.FlowDirection direction)
      Set the direction for flowPort.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SysMLUtility

        public SysMLUtility()
    • Method Detail

      • isBlockNotConstraint

        public static boolean isBlockNotConstraint​(@CheckForNull
                                                   com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
        Check if an element is a block or a derived block but not a constraint block (or derived).
        Parameters:
        element - the element to check
        Returns:
        true if element is a block but not a constraint block.
      • isInterfaceBlockNotConstraint

        public static boolean isInterfaceBlockNotConstraint​(@CheckForNull
                                                            com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
        Check if an element is a InterfaceBlock or a derived InterfaceBlock but not a constraint block (or derived).
        Parameters:
        element - the element to check
        Returns:
        true if element is a block but not a constraint block.
      • isAtomicFlowPort

        public static boolean isAtomicFlowPort​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)
        Check if flowPort is atomic or not.
        Parameters:
        port - flowPort to check
        Returns:
        true is flowPort atomic, false if non-atomic
      • setDirectionForFlowPort

        public static void setDirectionForFlowPort​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port,
                                                   SysMLUtility.FlowDirection direction)
        Set the direction for flowPort.
        Parameters:
        port - flowPort element
        direction - flow direction
      • getFlowDirection

        public static SysMLUtility.FlowDirection getFlowDirection​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
        Return the direction from element with flow direction (Flow Port and Flow Property)
        Parameters:
        element - element with flow direction
        Returns:
        flow direction, empty if direction is not set
      • isEncapsulated

        public static boolean isEncapsulated​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
        Check the isEncapsulated of element element.
        Parameters:
        element - element to check
        Returns:
        true when encapsulated, false when not encapsulated or value is not set.
      • getFeatureDirection

        @CheckForNull
        public static SysMLUtility.DirectedFeature getFeatureDirection​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Feature feature)
        Returns DirectedFeatures featureDirection tag value
        Parameters:
        feature - DirectedFeature to check
        Returns:
        direction of feature
      • getDirectionForPort

        @CheckForNull
        public static java.lang.String getDirectionForPort​(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
        Return element direction
        Parameters:
        element - element from which to get direction
        Returns:
        element direction string
      • getFlowPortDirection

        @CheckForNull
        private static java.lang.String getFlowPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)
      • getPortDirection

        @CheckForNull
        private static java.lang.String getPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)
      • getFullPortDirection

        @CheckForNull
        private static java.lang.String getFullPortDirection​(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)