com.ibm.xtools.bpmn2.util
Class ExpressionUtil

java.lang.Object
  extended by com.ibm.xtools.bpmn2.util.ExpressionUtil

public class ExpressionUtil
extends java.lang.Object


Constructor Summary
ExpressionUtil()
           
 
Method Summary
static java.lang.String extractText(Expression expression)
          Use this method to get the text from an expression.
static void setText(BaseElement baseElement, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String text)
          Use this method to set the text of an expression.
static void setText(Expression expression, java.lang.String text)
          Use this method to set the text of an expression, assuming that the incoming text is not "" or null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionUtil

public ExpressionUtil()
Method Detail

extractText

public static java.lang.String extractText(Expression expression)
Use this method to get the text from an expression. If the expression has no text (e.g., the documentation list is empty, the first doc is null, or the text is null), null is returned.

Parameters:
expression -
Returns:

setText

public static void setText(Expression expression,
                           java.lang.String text)
Use this method to set the text of an expression, assuming that the incoming text is not "" or null. If the expression does not exist, it is created. Use setText(BaseElement, EStructuralFeature, String) to ensure that the expression is deleted if the incoming string is "" or null.

Parameters:
expression -
text -

setText

public static void setText(BaseElement baseElement,
                           org.eclipse.emf.ecore.EStructuralFeature feature,
                           java.lang.String text)
Use this method to set the text of an expression. The parameters are baseElement and feature, so that the owner of the expression can be used, but the assumption is that baseElement.eGet(feature) instanceof Expression. If the expression does not yet exist, it is created. If the incoming text is "" or null, and the expression exists, the expression is deleted.

Parameters:
baseElement -
feature -
text -