public class UMLUtils
extends java.lang.Object
Constructor and Description |
---|
UMLUtils() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.uml2.uml.Stereotype |
applyStereotype(org.eclipse.uml2.uml.Element element,
java.lang.String qualifiedName)
Applies the
Stereotype to a given element based on the qualified name. |
static boolean |
areOperationsEqual(org.eclipse.uml2.uml.Operation source,
org.eclipse.uml2.uml.Operation target,
org.eclipse.uml2.uml.Parameter p)
If parameter 'p' is null checks if the operations are the same, that is if they have the same signature.
|
static boolean |
areParametersEqual(org.eclipse.uml2.uml.Parameter param,
org.eclipse.uml2.uml.Parameter aux)
Checks if two parameters are the same.
|
static boolean |
areParametersEquals(org.eclipse.uml2.uml.Operation source,
org.eclipse.uml2.uml.Operation target)
Checks if the parameters of two operations are the same.
|
static boolean |
areParametersEquals(org.eclipse.uml2.uml.Operation source,
org.eclipse.uml2.uml.Operation target,
org.eclipse.uml2.uml.Parameter p)
Checks if the list of parameters of two operations are equal.
|
static boolean |
checkAllocationToCores(java.util.List<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> chHwProcList,
org.eclipse.uml2.uml.Model umlModel)
Checks that at least one Partition or Task is allocated on a Core that is owned by one of the HW instances in input.
|
static boolean |
checkPlatformsInContext(org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SaAnalysisContext saAnalysisContext,
org.eclipse.uml2.uml.Model umlModel)
Checks that the Context has two CHGaResourcePlatforms specified in the Platform field,
one must be in the ComponentView and one in the DeploymentView,
the one in the DeploymentView must contain a CH_HWProcessor.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Dependency> |
computeDependenciesToRemove(org.eclipse.uml2.uml.Component comp)
Retrieves all the
Dependency of a given Component. |
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InterfaceRealization> |
computeRealizationsToRemove(org.eclipse.uml2.uml.Component comp)
Retrieves all the
InterfaceRealization of a given Component. |
static void |
copyOperation(org.eclipse.uml2.uml.Operation source,
org.eclipse.uml2.uml.Operation target)
Copy the source operation data to the target operation.
|
static boolean |
elementIsCHRtPortSlot(org.eclipse.uml2.uml.Element elem)
Verifies if element is a CHRtPortSlot Slot.
|
static boolean |
elementIsComponentInstance(org.eclipse.uml2.uml.Element element)
Returns TRUE if the element is a component instance, false otherwise.
|
static boolean |
elementIsPartitionInstance(org.eclipse.uml2.uml.Element element)
Element is partition instance.
|
static boolean |
elementIsProcessorInstance(org.eclipse.uml2.uml.Element element)
Returns TRUE if the element is a processor instance, FALSE otherwise.
|
static boolean |
elementIsSlotInstance(org.eclipse.uml2.uml.Element element)
Element is slot instance.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getAll2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source anything and the target is a Processor Instance.
|
static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> |
getAllChrtSpecs(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
This function returns the list of all the CHrtSpecifications in the given View of the model.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> |
getAllComponentInstances(org.eclipse.uml2.uml.Model umlModel,
boolean onlyTerminal)
Returns the list of all Component Instances found in the Component View if onlyTerminal is FALSE,
Returns the list of all terminal Component Instances found in the Component View if onlyTerminal is TRUE.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Component> |
getAllInterfaceComponents(org.eclipse.uml2.uml.Interface interfce)
Retrieves all the
Component implementing the given interface. |
static java.util.List<ValueNFP> |
getAllNfpValues(java.lang.String str,
java.lang.String toSearch)
Returns a list of the NFPValues (value and unit) of the toSearch field,
or [value=-1.0, unit=] if the field is not present in the string that is parsed.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getAllPartitionAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source is a Partition Instance and the target is a Processor Instance.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> |
getAllPartitionInstances(org.eclipse.uml2.uml.Model umlModel)
Returns the list of all partition instances in the model.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Package> |
getAllResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
Gets the all resource platform package.
|
static java.util.List<AnalysisResultData> |
getAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
Returns the list of AnalysisResultData contained in the PSM Package.
|
static org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification |
getArincProcessSpecification(org.eclipse.uml2.uml.InstanceSpecification instSpec,
org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification arincFunctionSpec)
Returns the CHRTSpecification of the ARINCProcess owning the ARINCFunction referred by the given CHRtSpecification (context field) .
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName .
|
static java.lang.String |
getBlockingTimeString(java.lang.String rldlUnit,
org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SaStep opSaStep)
Returns the blocking time and unit
if rldl is expressed in ms by the user convert blockT in ms too
if rldl is expressed in us by the user convert blockT in us too.
|
static org.eclipse.uml2.uml.Stereotype |
getCHRtSpecification(java.lang.Object el)
Returns the CHRtSpecification of the given element.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Comment> |
getCHRtSpecificationComments(org.eclipse.uml2.uml.Package pkg,
org.eclipse.uml2.uml.Port portFilter)
Retrieves all the CHRTSpecification
Comment s given a Package and a Port. |
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getComponent2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source is a Component Instance and the target is a Processor Instance.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getComponent2PartitionAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Looks for all the Component to Functional Partition Assignments in the specified View.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getComponentAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source is a Component Instance .
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_DesignModel.GCM.ClientServerPort> |
getComponentClientServerPorts(org.eclipse.uml2.uml.Component component)
Retrieves the list of
ClientServerPort of a given Component. |
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Component> |
getComponentImplementations(org.eclipse.uml2.uml.Component comp)
Retrieves all the
ComponentImplementation of a given Component. |
static java.lang.String |
getElementID(org.eclipse.uml2.uml.Element el)
Returns the XML ID (UUID) of a model element.
|
static java.util.List<EndToEndResultData> |
getEndtoEndAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
Gets the endto end analysis results.
|
static java.util.List<HWAnalysisResultData> |
getHWAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
Returns the HW results for Schedulability analysis.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.NamedElement> |
getInterfaceClients(org.eclipse.uml2.uml.Interface interfce)
Retrieves all the clients of a given
Interface . |
static ValueNFP |
getNfpValue(java.lang.String str,
java.lang.String toSearch)
Returns the NFPValue (value and unit) of the toSearch field,
or [value=-1.0, unit=] if the field is not present in the string that is parsed.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getPartition2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source is a Partition Instance and the target is a Processor Instance.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getPartitionAssignments(org.eclipse.uml2.uml.Model umlModel,
org.polarsys.chess.chessmlprofile.ComponentModel.FunctionalPartition functPart)
Returns all the assignments that have the input functional partition
either in the To field (Component to Partition Assignment), or
in the From field (Partition to ProcessorAssignment).
|
static org.eclipse.uml2.uml.Component |
getResourcePlatformComponent(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Gets the resource platform component.
|
static org.eclipse.uml2.uml.Component |
getResourcePlatformComponentInPackage(org.eclipse.uml2.uml.Model umlModel,
org.eclipse.uml2.uml.Package pack)
Looks inside the input package pack, and returns a Component stereotyped as CHGaResourcePlatform .
|
static org.eclipse.uml2.uml.Package |
getResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
Gets the resource platform package.
|
static org.eclipse.uml2.uml.InstanceSpecification |
getRootInstanceInPackage(org.eclipse.uml2.uml.Package thePack)
Returns the root instance in the package .
|
static org.eclipse.emf.ecore.EObject |
getSelectedElement()
Get the selected element, the first selected element if several are selected or null
if no selection or the selection is not an
EObject . |
static org.eclipse.uml2.uml.Stereotype |
getStereotype(org.eclipse.uml2.uml.Element element,
java.lang.String qualifiedName)
Returns the
Stereotype of a given element based on the qualified name, or null. |
static <T extends org.eclipse.emf.ecore.EObject> |
getStereotypeApplication(org.eclipse.uml2.uml.Element element,
java.lang.Class<T> stereotypeClass)
Returns the stereotype object given the stereotype class and the model element.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getTask2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of assignments found in viewName where
the source is a Slot Instance and the target is a Processor Instance.
|
static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getTwoSelectedElements()
Get the selected element, the first selected element if several are selected or null
if no selection or the selection is not an
EObject . |
static org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification |
getUpdatedArincFunChrtSpec(org.eclipse.uml2.uml.InstanceSpecification instance,
org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification arincFunctChrtspec)
Returns the CHRtSpecification for an ARINCFunction,
deriving it from the CHRtSpecification of the related CHRtProcess
and the occurrencyKind of the ARINCFunction itself.
|
static java.lang.String |
getValue(java.lang.String s,
java.lang.String match)
Returns the value of the field identified by the match parameter within the s string
The s string is expected to be in the form: name1=value1,name2=value2,name3=value3
with or without surrounding parenthesis.
|
static ValueNFP |
getValueNFP(java.lang.String value)
Returns the first NFPValue (value, unit) found in the input string .
|
static boolean |
hasComponentAssigned(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if this Partition has at least a component assigned to it.
|
static boolean |
hasPublicVisibility(org.eclipse.uml2.uml.Operation operation)
Checks if the given operation is public.
|
static boolean |
isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if this Partition is assigned to a CPU .
|
static int |
isAssigned2HowManyPartitions(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Returns the number of FunctionalPartitions to which the InstanceSpecification is assigned .
|
static int |
isAssigned2HowManyProcessingUnits(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.uml2.uml.Element theDeploymentElem,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Returns the number of CPUs to which the InstanceSpecification is assigned .
|
static int |
isAssigned2HowManyProcessingUnitsOrPartitions(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.uml2.uml.Element theDeploymentElem,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Returns the number of CPUs or FunctionalPartitions to which the InstanceSpecification is assigned .
|
static boolean |
isClientServerPort(java.lang.Object el)
Checks if the given object represents a Client/Server port.
|
static boolean |
isComponentImplementation(java.lang.Object el)
Checks if the given object is a
ComponentImplementation . |
static boolean |
isComponentInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns TRUE if the InstanceSpecification is a component instance, false otherwise.
|
static boolean |
isComponentType(java.lang.Object el)
Checks if the given object is a
ComponentType . |
static boolean |
isLeafComponentInstance(org.eclipse.uml2.uml.InstanceSpecification instSpec)
Checks if is leaf component instance.
|
static boolean |
isOperationContained(org.eclipse.uml2.uml.Classifier component,
org.eclipse.uml2.uml.Operation operation)
Checks if there given Component offers an operation that is equal
of the operation given.
|
static boolean |
isOperationEquals(org.eclipse.uml2.uml.Operation source,
org.eclipse.uml2.uml.Operation target)
Checks if two operations are equal.
|
static boolean |
isPartitionInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns TRUE if the instance specification is a partition instance.
|
static boolean |
isProcessorInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns TRUE if the instanceSpecification is a processor instance, FALSE otherwise.
|
static java.lang.String |
setNfpValue(java.lang.String str,
java.lang.String toSearch,
java.lang.Double value,
java.lang.String units)
Adds the field named in toSearch with its value and unit to the input NFPValue string
if it was not there.
|
static java.lang.Double |
toSeconds(java.lang.Double value,
java.lang.String units)
Converts into seconds .
|
public static java.lang.String getElementID(org.eclipse.uml2.uml.Element el)
el
- the model elementpublic static boolean hasPublicVisibility(org.eclipse.uml2.uml.Operation operation)
operation
- the operationpublic static boolean areParametersEqual(org.eclipse.uml2.uml.Parameter param, org.eclipse.uml2.uml.Parameter aux)
param
- the source parameteraux
- the target paramaterpublic static void copyOperation(org.eclipse.uml2.uml.Operation source, org.eclipse.uml2.uml.Operation target)
source
- the source operationtarget
- the target operationpublic static boolean areOperationsEqual(org.eclipse.uml2.uml.Operation source, org.eclipse.uml2.uml.Operation target, org.eclipse.uml2.uml.Parameter p)
source
- the source operationtarget
- the target operationp
- the parameterpublic static boolean areParametersEquals(org.eclipse.uml2.uml.Operation source, org.eclipse.uml2.uml.Operation target, org.eclipse.uml2.uml.Parameter p)
source
- the source operationtarget
- the target operationp
- the parameterpublic static boolean areParametersEquals(org.eclipse.uml2.uml.Operation source, org.eclipse.uml2.uml.Operation target)
source
- the sourcetarget
- the targetpublic static boolean isOperationEquals(org.eclipse.uml2.uml.Operation source, org.eclipse.uml2.uml.Operation target)
source
- one operationtarget
- the otherpublic static boolean isOperationContained(org.eclipse.uml2.uml.Classifier component, org.eclipse.uml2.uml.Operation operation)
component
- the componentoperation
- the operationpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.NamedElement> getInterfaceClients(org.eclipse.uml2.uml.Interface interfce)
Interface
.interfce
- the interfacepublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Component> getComponentImplementations(org.eclipse.uml2.uml.Component comp)
ComponentImplementation
of a given Component.comp
- the componentComponentImplementation
public static boolean isComponentType(java.lang.Object el)
ComponentType
.el
- the elementComponentType
public static boolean isComponentImplementation(java.lang.Object el)
ComponentImplementation
.el
- the elementComponentImplementation
public static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_DesignModel.GCM.ClientServerPort> getComponentClientServerPorts(org.eclipse.uml2.uml.Component component)
ClientServerPort
of a given Component.component
- the componentClientServerPort
public static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Dependency> computeDependenciesToRemove(org.eclipse.uml2.uml.Component comp)
Dependency
of a given Component.comp
- the componentDependency
public static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InterfaceRealization> computeRealizationsToRemove(org.eclipse.uml2.uml.Component comp)
InterfaceRealization
of a given Component.comp
- the componentInterfaceRealization
public static boolean isClientServerPort(java.lang.Object el)
el
- the elementpublic static org.eclipse.uml2.uml.Stereotype getCHRtSpecification(java.lang.Object el)
el
- the elementpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Comment> getCHRtSpecificationComments(org.eclipse.uml2.uml.Package pkg, org.eclipse.uml2.uml.Port portFilter)
Comment
s given a Package and a Port.
If the Port is not given it retrieves all the comments.pkg
- the packageportFilter
- the port, can be nullpublic static <T extends org.eclipse.emf.ecore.EObject> T getStereotypeApplication(org.eclipse.uml2.uml.Element element, java.lang.Class<T> stereotypeClass)
T
- the generic typeelement
- the elementstereotypeClass
- the stereotype classpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Component> getAllInterfaceComponents(org.eclipse.uml2.uml.Interface interfce)
Component
implementing the given interface.interfce
- the Interface
public static org.eclipse.uml2.uml.Stereotype getStereotype(org.eclipse.uml2.uml.Element element, java.lang.String qualifiedName)
Stereotype
of a given element based on the qualified name, or null.element
- the elementqualifiedName
- the qualified namepublic static org.eclipse.uml2.uml.Stereotype applyStereotype(org.eclipse.uml2.uml.Element element, java.lang.String qualifiedName)
Stereotype
to a given element based on the qualified name.
It returns the applied stereotype or null.element
- the elementqualifiedName
- the qualified namepublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getAll2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getComponent2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getAllPartitionAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getPartitionAssignments(org.eclipse.uml2.uml.Model umlModel, org.polarsys.chess.chessmlprofile.ComponentModel.FunctionalPartition functPart) throws ModelError
umlModel
- the uml modelfunctPart
- the funct partModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getPartition2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getTask2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getComponentAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.uml2.uml.Component getResourcePlatformComponent(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.uml2.uml.Component getResourcePlatformComponentInPackage(org.eclipse.uml2.uml.Model umlModel, org.eclipse.uml2.uml.Package pack) throws ModelError
umlModel
- the uml modelpack
- the packModelError
- the model errorpublic static boolean elementIsProcessorInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean isProcessorInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static boolean elementIsComponentInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean isComponentInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static int isAssigned2HowManyProcessingUnits(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.uml2.uml.Element theDeploymentElem, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the instance specificationtheDeploymentElem
- the deployment for which the count is performedassignments
- the assignmentspublic static int isAssigned2HowManyProcessingUnitsOrPartitions(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.uml2.uml.Element theDeploymentElem, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the instance specificationtheDeploymentElem
- the deployment for which the count is performedassignments
- the assignmentspublic static int isAssigned2HowManyPartitions(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> getAllPartitionInstances(org.eclipse.uml2.uml.Model umlModel) throws ModelError
umlModel
- the uml modelModelError
- the model errorpublic static org.eclipse.uml2.uml.Package getResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
cmpv
- the cmpvpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Package> getAllResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
cmpv
- the cmpvpublic static boolean isPartitionInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static boolean elementIsPartitionInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static boolean hasComponentAssigned(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static boolean elementIsSlotInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean elementIsCHRtPortSlot(org.eclipse.uml2.uml.Element elem)
elem
- the elempublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> getAllComponentInstances(org.eclipse.uml2.uml.Model umlModel, boolean onlyTerminal) throws ModelError
umlModel
- the uml modelonlyTerminal
- the only terminalModelError
- the model errorpublic static boolean isLeafComponentInstance(org.eclipse.uml2.uml.InstanceSpecification instSpec)
instSpec
- the inst specpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getComponent2PartitionAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static org.eclipse.uml2.uml.InstanceSpecification getRootInstanceInPackage(org.eclipse.uml2.uml.Package thePack)
thePack
- is the Package owning the set of InstanceSpecificationpublic static java.lang.String getValue(java.lang.String s, java.lang.String match)
s
- the smatch
- the matchpublic static java.lang.String getBlockingTimeString(java.lang.String rldlUnit, org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SaStep opSaStep)
rldlUnit
- the rldl unitopSaStep
- the op sa steppublic static java.util.List<AnalysisResultData> getAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
contextClass
- the context classpublic static java.util.List<HWAnalysisResultData> getHWAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
contextClass
- the context classpublic static java.util.List<EndToEndResultData> getEndtoEndAnalysisResults(org.eclipse.uml2.uml.Class contextClass)
contextClass
- <public static org.eclipse.emf.ecore.EObject getSelectedElement()
Get the selected element, the first selected element if several are selected or null
if no selection or the selection is not an EObject
.
EObject
or null
public static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getTwoSelectedElements()
Get the selected element, the first selected element if several are selected or null
if no selection or the selection is not an EObject
.
EObject
or null
public static java.util.List<ValueNFP> getAllNfpValues(java.lang.String str, java.lang.String toSearch)
str
- The string to be parsed.toSearch
- Name of the field whose value and unit are to be returnedpublic static ValueNFP getNfpValue(java.lang.String str, java.lang.String toSearch)
str
- The string to be parsed.toSearch
- Name of the field whose value and unit are to be returnedpublic static java.lang.String setNfpValue(java.lang.String str, java.lang.String toSearch, java.lang.Double value, java.lang.String units)
str
- The NFPValue string to be updatedtoSearch
- The name of the fieldvalue
- The value to be setunits
- The unit to be setpublic static ValueNFP getValueNFP(java.lang.String value)
value
- The string to be parsedpublic static java.lang.Double toSeconds(java.lang.Double value, java.lang.String units)
value
- The value to be convertedunits
- The unit in which the value to be converted is originally expressedpublic static org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification getArincProcessSpecification(org.eclipse.uml2.uml.InstanceSpecification instSpec, org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification arincFunctionSpec) throws ModelError
instSpec
- the inst specarincFunctionSpec
- the CHRtSpecification referring the ARINCFunctionModelError
- the model errorpublic static org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification getUpdatedArincFunChrtSpec(org.eclipse.uml2.uml.InstanceSpecification instance, org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification arincFunctChrtspec) throws ModelError
instance
- The InstanceSpecification instance of ARINCComponentImpl owning the given ARINCFunctionarincFunctChrtspec
- the arinc funct chrtspecModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> getAllChrtSpecs(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws ModelError
umlModel
- the uml modelviewName
- the view nameModelError
- the model errorpublic static boolean checkPlatformsInContext(org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SaAnalysisContext saAnalysisContext, org.eclipse.uml2.uml.Model umlModel)
saAnalysisContext
- the sa analysis contextumlModel
- the uml modelpublic static boolean checkAllocationToCores(java.util.List<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> chHwProcList, org.eclipse.uml2.uml.Model umlModel) throws ModelError
chHwProcList
- the ch hw proc listumlModel
- the uml modelModelError
- the model error