@OpenApiAll
public class SysMLUtilities
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SysMLUtilities.DirectedFeature
DirectedFeature enumeration
|
static class |
SysMLUtilities.FlowDirection
Flow Direction enumeration
|
Constructor and Description |
---|
SysMLUtilities() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDirectionForPort(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
Return port direction
|
static SysMLUtilities.DirectedFeature |
getFeatureDirection(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element feature)
Returns DirectedFeatures featureDirection tag value
|
static SysMLUtilities.FlowDirection |
getFlowDirection(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
Return the direction from element with flow direction (Flow Port and Flow Property)
|
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 boolean |
isMDCusForSysMLAndRelatedLoaded(com.nomagic.magicdraw.core.Project project)
Check whether the MD_Customization_for_SysML and related profile already been loaded or not.
|
static void |
setDirectionForFlowPort(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port,
SysMLUtilities.FlowDirection direction)
Set the direction for flowPort.
|
public static boolean isBlockNotConstraint(@CheckForNull com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
- the element to checkpublic static boolean isInterfaceBlockNotConstraint(@CheckForNull com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
- the element to checkpublic static boolean isAtomicFlowPort(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port)
port
- flowPort to checktrue
is flowPort atomic, false
if non-atomicpublic static void setDirectionForFlowPort(com.nomagic.uml2.ext.magicdraw.compositestructures.mdports.Port port, SysMLUtilities.FlowDirection direction)
port
- flowPort elementdirection
- flow direction SysMLUtilities.FlowDirection
public static SysMLUtilities.FlowDirection getFlowDirection(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
- element with flow directionSysMLUtilities.FlowDirection
, empty if direction is not setpublic static boolean isEncapsulated(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
.element
- element to checktrue
when encapsulated, false
when not encapsulated or value is not set.public static boolean isMDCusForSysMLAndRelatedLoaded(@CheckForNull com.nomagic.magicdraw.core.Project project)
SysMLHelper#isMDCusForSysMLAndRelatedLoaded(com.nomagic.magicdraw.core.Project, String)
project
- the project to be checked.true
if MD_Customization_for_SysML and SysML profile have been loaded already, otherwise false
.@CheckForNull public static SysMLUtilities.DirectedFeature getFeatureDirection(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element feature)
feature
- DirectedFeature to checkSysMLUtilities.DirectedFeature
@CheckForNull public static java.lang.String getDirectionForPort(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
- port from which to get direction