UML Modeling Layer

com.ibm.xtools.uml.core
Interface IUMLHelper


public interface IUMLHelper

Set of UML related helper functions


Method Summary
 Element findElement(Element root, String id)
          Finds elements whose ID matches exactly the specified id.
 Element findElement(Element root, String id, IProgressMonitor monitor)
          Finds elements whose ID matches exactly the specified id.
 Element findElementById(Model model, String id)
          Deprecated. Since 7.5, use the IUMLHelper.findElement(Element, String, IProgressMonitor) method, instead.
 Element findElementById(Model model, String id, IProgressMonitor monitor)
          Deprecated. Since 7.5, use the IUMLHelper.findElement(Element, String, IProgressMonitor) method, instead.
 Set<Element> findElementByName(Element container, String name, EClass type, IProgressMonitor monitor)
          Finds the UML Element whose name and type match exactly the specified name and type respectively.
 

Method Detail

findElementById

@Deprecated
Element findElementById(Model model,
                                   String id)
Deprecated. Since 7.5, use the IUMLHelper.findElement(Element, String, IProgressMonitor) method, instead.

Finds elements whose ID matches exactly the specified id. The search is performed in the model specified by model

Parameters:
model - The UML model where to perform the search
id - The ID of the UML element to match
Returns:
The UML element with the specified id, null if not found
Throws:
IllegalArgumentException - is is an empty string
ClassCastException - is if the element associated with the specified id is not a UML Element
See Also:
com.ibm.xtools.emf.index.IIndexSearchManager

findElement

Element findElement(Element root,
                    String id)
Finds elements whose ID matches exactly the specified id. The search is performed in the model specified by model

Parameters:
model - The UML model where to perform the search
id - The ID of the UML element to match
Returns:
The UML element with the specified id, null if not found
Throws:
IllegalArgumentException - is is an empty string
ClassCastException - is if the element associated with the specified id is not a UML Element
Since:
7.5
See Also:
com.ibm.xtools.emf.index.IIndexSearchManager

findElementById

@Deprecated
Element findElementById(Model model,
                                   String id,
                                   IProgressMonitor monitor)
                        throws InterruptedException
Deprecated. Since 7.5, use the IUMLHelper.findElement(Element, String, IProgressMonitor) method, instead.

Finds elements whose ID matches exactly the specified id. The search is performed in the model model resource specified by its root element.

Parameters:
root - The root of the UML model where to perform the search
id - The ID of the UML element to match
monitor - The monitor to use to display progress and/or cancel operation
Returns:
The UML element with the specified id, null if not found
Throws:
IllegalArgumentException - name is an empty string or type is not a UML2 type
InterruptedException - The query operation was interrupted
ClassCastException - is if the element associated with the specified id is not a UML Element
See Also:
com.ibm.xtools.emf.index.IIndexSearchManager

findElement

Element findElement(Element root,
                    String id,
                    IProgressMonitor monitor)
                    throws InterruptedException
Finds elements whose ID matches exactly the specified id. The search is performed in the model resource specified by its root element.

Parameters:
root - The root of the UML model where to perform the search
id - The ID of the UML element to match
monitor - The monitor to use to display progress and/or cancel operation
Returns:
The UML element with the specified id, null if not found
Throws:
IllegalArgumentException - name is an empty string or type is not a UML2 type
InterruptedException - The query operation was interrupted
ClassCastException - is if the element associated with the specified id is not a UML Element
Since:
7.5
See Also:
com.ibm.xtools.emf.index.IIndexSearchManager

findElementByName

Set<Element> findElementByName(Element container,
                               String name,
                               EClass type,
                               IProgressMonitor monitor)
                               throws InterruptedException
Finds the UML Element whose name and type match exactly the specified name and type respectively. The search begins at the element specified by container and recurses within its owned elements

Parameters:
container - The root Element where to perform the search
name - The name of the Element to match
type - The type of the Element to match
monitor - The monitor to use to display progress and/or cancel operation
Returns:
The set of Element matching the specified criteria
Throws:
InterruptedException - The query operation was interrupted
IllegalArgumentException - name is an empty string or type is not a UML2 type
NullPointerException - One of the passed parameters was null
See Also:
com.ibm.xtools.emf.index.IIndexSearchManager

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.