IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.uml.core
Interface IUMLHelper


public interface IUMLHelper

Set of UML related helper functions


Method Summary
 Element findElementById(Model model, String id)
          Finds elements whose ID matches exactly the specified id.
 Set 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

public Element findElementById(Model model,
                               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

findElementByName

public Set 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/code> 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 criterions
Throws:
InterruptedException - The query operation was interrupted
IllegalArgumentException - name is an empty string
NullPointerException - One of the passed parameters was null

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.