com.bbn.swede.core.dom
Interface IOASTRunnable

All Known Implementing Classes:
DefaultOASTRunnable

public interface IOASTRunnable

A runnable which executes as a batch operation in an OWL abstract syntax tree. Implement this interface to execute code using IOWLAbstractSyntaxTree.run.

Author:
jlerner
See Also:
IOWLAbstractSyntaxTree.run(IOASTRunnable)

Method Summary
 OASTNode getPrimaryNode()
          Returns a node to treat as the primary node for the composite event built by the runnable.
 void run()
          Runs the operation.
 

Method Detail

run

public void run()
         throws OASTException
Runs the operation.

Throws:
OASTException - if the runnable attempts to modify a read-only OAST.

getPrimaryNode

public OASTNode getPrimaryNode()

Returns a node to treat as the primary node for the composite event built by the runnable. See OASTEvent.getPrimaryNode() for more information on primary nodes.

When runnables are nested, only the primary node of the enclosing runnable is considered. If the outermost runnable returns no primary node and an inner runnable does, the resulting event will still have no primary node.

Returns:
The node to treat as primary for the resulting composite event, or null if there is no primary node.
See Also:
DefaultOASTRunnable


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.