org.openanzo.glitter.query
Interface TreeRewriter
- All Known Implementing Classes:
- ConjunctiveRewriter, FunctionalPredicateRewriter, NormalFormRewriter, VariableRewriter
public interface TreeRewriter
A TreeRewriter gets handed the nodes of a Glitter abstract syntax tree
in a post-order traversal and can rewrite it as it sees fit.
- Author:
- Lee
rewriteTreeNode
TreeNode rewriteTreeNode(TreeNode node)
- Rewrites the given node from a SPARQL abstract syntax tree.
- Parameters:
node - the node in question
- Returns:
- A tree node to replace the passed in tree node. Returning
node leaves this spot in the AST unchanged. Returning null
removes this node from the tree. (Note that it is possible that removing the
node will leave the tree in an invalid state. Behavior in this case is undefined.)
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.