SysML

org.topcased.modeler.sysml.blockdefinitiondiagram.util
Class BlockTools

java.lang.Object
  extended by org.topcased.modeler.sysml.blockdefinitiondiagram.util.BlockTools

public class BlockTools
extends java.lang.Object


Constructor Summary
BlockTools()
           
 
Method Summary
static java.lang.String[] getAllAvailableTypeNames(java.util.Collection types)
          Return an array of type names.
static java.util.Collection getAllAvailableTypes(org.eclipse.uml2.uml.Element element)
          Return a collection of all types contained in the model associated to a given element
static java.util.List<?> getAvailablePortType(ModelSYSML model)
          Gets all the 'Type' objects of the model
static java.lang.String getFromNotation(org.eclipse.uml2.uml.Element element, org.eclipse.uml2.uml.Element parent)
          Get a string representation of the origin of a SysML element
static PackageSYSML getPackageSYSML(org.eclipse.uml2.uml.Element element)
          Return the block definition in which an element is contained
static java.lang.String getTypeFullName(org.eclipse.uml2.uml.Type elt)
          Return the customized type name
static java.util.Collection removeRelationship(java.util.Collection c)
          Remove relationships from a collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockTools

public BlockTools()
Method Detail

getAllAvailableTypes

public static java.util.Collection getAllAvailableTypes(org.eclipse.uml2.uml.Element element)
Return a collection of all types contained in the model associated to a given element

Parameters:
element -
Returns:
types (data type, class)

getAvailablePortType

public static java.util.List<?> getAvailablePortType(ModelSYSML model)
Gets all the 'Type' objects of the model

Parameters:
container - The start element to search in
Returns:
The list containing all the 'Type' objects referenced in the current model.

removeRelationship

public static java.util.Collection removeRelationship(java.util.Collection c)
Remove relationships from a collection

Parameters:
c - the collection
Returns:
the collection without relationships

getPackageSYSML

public static PackageSYSML getPackageSYSML(org.eclipse.uml2.uml.Element element)
Return the block definition in which an element is contained

Parameters:
element -
Returns:
the block definition

getAllAvailableTypeNames

public static java.lang.String[] getAllAvailableTypeNames(java.util.Collection types)
Return an array of type names.

Parameters:
types - a Collection of Type
Returns:
array of type names

getTypeFullName

public static java.lang.String getTypeFullName(org.eclipse.uml2.uml.Type elt)
Return the customized type name

Parameters:
type - type to customize name
Returns:
customized name

getFromNotation

public static java.lang.String getFromNotation(org.eclipse.uml2.uml.Element element,
                                               org.eclipse.uml2.uml.Element parent)
Get a string representation of the origin of a SysML element

Parameters:
element - an SysML element
parent - the element which graphically contains the SysML Type element
Returns:
a fully qualified string representation or empty string if element isn't contained in an external block definition

SysML

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.