org.netbeans.modules.bpel.model.impl
Class FindHelperImpl

java.lang.Object
  extended by org.netbeans.modules.bpel.model.impl.FindHelperImpl
All Implemented Interfaces:
FindHelper

public final class FindHelperImpl
extends java.lang.Object
implements FindHelper

Helper class for finding various elements in OM.

Author:
ads

Constructor Summary
FindHelperImpl()
           
 
Method Summary
 BpelEntity[] findModelElements(BpelModel model, java.lang.String xpath)
          Returns reference to element in model by xpath expression.
static java.util.List<BpelContainer> getObjectPathTo(BpelEntity entity)
          Collects a path from the BPEL process root to the specified entity.
 Activity getParentActivity(BpelEntity entity)
          Returns nearest Activity that enclose this element.
 java.lang.String getXPath(BpelEntity entity)
          Returns XPath expression for OM element.
 java.util.Iterator<BaseScope> scopeIterator(BpelEntity entity)
          Returns iterator that iterate over hierarchical scope parents of current element.
 java.util.Iterator<VariableDeclarationScope> varaibleDeclarationScopes(BpelEntity entity)
          Returns iterator that iterate over hierarchical VariableDeclarationScope parents of current element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindHelperImpl

public FindHelperImpl()
Method Detail

scopeIterator

public java.util.Iterator<BaseScope> scopeIterator(BpelEntity entity)
Description copied from interface: FindHelper
Returns iterator that iterate over hierarchical scope parents of current element.

Specified by:
scopeIterator in interface FindHelper
Parameters:
entity - BpelEntity object.
Returns:
iterator for iterate through BaseScope .

getParentActivity

public Activity getParentActivity(BpelEntity entity)
Description copied from interface: FindHelper
Returns nearest Activity that enclose this element.

Specified by:
getParentActivity in interface FindHelper
Parameters:
entity - BpelEntity object.
Returns:
nearest parent activity.

getXPath

public java.lang.String getXPath(BpelEntity entity)
Description copied from interface: FindHelper
Returns XPath expression for OM element.

Specified by:
getXPath in interface FindHelper
Parameters:
entity - BpelEntity object.
Returns:
xpath for entity.

findModelElements

public BpelEntity[] findModelElements(BpelModel model,
                                      java.lang.String xpath)
Description copied from interface: FindHelper
Returns reference to element in model by xpath expression. Runtime exception can be thrown if xpath is bad XPath expression.

Specified by:
findModelElements in interface FindHelper
Parameters:
model - model which will be used for search.
xpath - XPath expression.
Returns:
array of found model elements.

varaibleDeclarationScopes

public java.util.Iterator<VariableDeclarationScope> varaibleDeclarationScopes(BpelEntity entity)
Description copied from interface: FindHelper
Returns iterator that iterate over hierarchical VariableDeclarationScope parents of current element.

Specified by:
varaibleDeclarationScopes in interface FindHelper
Parameters:
entity - BpelEntity object.
Returns:
iterator for iterate through VariableDeclarationScope .

getObjectPathTo

public static java.util.List<BpelContainer> getObjectPathTo(BpelEntity entity)
Collects a path from the BPEL process root to the specified entity. The first element in the result list is the closest to the root.