org.ccnx.ccn.impl.repo.ContentTree.Search Class Reference

Implements the generic pieces of both left and right searches. More...

List of all members.

Protected Member Functions

 Search (Interest interest, InterestPreScreener ips)
ContentObject search (TreeNode node, ContentName nodeName, ContentGetter getter, int depth, boolean leftSearch)
 Do the actual search.
abstract Iterator< TreeNodeinitIterator (boolean leftSearch, byte[] interestComp)
 Return an iterator through children at this level.
abstract boolean continueSearch (boolean leftSearch, TreeNode child, byte[] component)

Protected Attributes

Interest _interest
InterestPreScreener _ips
SortedMap< TreeNode, TreeNode_children = null

Detailed Description

Implements the generic pieces of both left and right searches.


Member Function Documentation

abstract Iterator<TreeNode> org.ccnx.ccn.impl.repo.ContentTree.Search.initIterator ( boolean  leftSearch,
byte[]  interestComp 
) [protected, pure virtual]

Return an iterator through children at this level.

Parameters:
anyOK leftSearch only - if false must go "left by one" at this level
interestComp component to start search with
Returns:
the iterator

Implemented in org.ccnx.ccn.impl.repo.ContentTree.LeftSearch, and org.ccnx.ccn.impl.repo.ContentTree.RightSearch.

ContentObject org.ccnx.ccn.impl.repo.ContentTree.Search.search ( TreeNode  node,
ContentName  nodeName,
ContentGetter  getter,
int  depth,
boolean  leftSearch 
) [protected]

Do the actual search.

Use abstract method to decide how to traverse the tree

Parameters:
node the node rooting a subtree to search
nodeName the full name of this node from the root up to and its component
getter a handler to pull actual ContentObjects for final match testing
depth the length of name of node including its component (number of components)
leftSearch true if we should search down the left side of the tree at this level
Returns:
ContentObject matching the interest or null if not found

The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:39 2011 for Content-Centric Networking in Java by  doxygen 1.6.3