|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.utils.tree.ResultPathTreeBuilder
Builds a tree from a set of Paths contained in an IResultSet.
<TreeBuilder class="com.raritantechnologies.utils.tree.ResultPathTreeBuilder"
searchSourceName="[ name of search source - OR 'CURRENT_RESULTS' ]"
cachedResultsName="[ name of cached result set ]"
treePathField="[result path to get tree paths from]"
pathValueDelimiter="[ delimiter for packed multi-value result fields ]"
treeName="[name of root node]"
treeRootClass="[optional class name of root node]"
treeNodeClass="[optional class name of nodes]"
addNodeCounts="[true|false(default)]"
pathSeparator="[ separator of path default = '/' ]"
useRootPath="[ true(default)|false - use Root path ]"
refreshCommand="[ command=value in request that will cause the tree to be refreshed ]"
requestPathField='[ request path used to add tree paths in refresh Mode ]" >
<!-- ================================================================= -->
<!-- Additional query fields for search (if using a SearchSource) -->
<!-- ================================================================= -->
<Query>
<Field ID="[a search field]" value="[value to search]" />
<Field ID="[another field]" value="[value to search]" />
<!-- Alternatively: can build query from request parameters -->
<Field ID="[ a search field ]" requestParam="[ name of request parameter ]" />
<Field ID="[ a search field ]" requestParam="[ name of request parameter ]" exactMatch="true" />
<!-- Can also use user properties -->
<Field ID="[ a search field ]" userParam="[ name of user parameter ]" />
</Query>
<!-- ================================================================= -->
<!-- Alternatively: Use an ICollectionGateway -->
<!-- ================================================================= -->
<CollectionGateway class="[ class of com.raritantechnologies.searchApp.dataCollection.ICollectionGateway ]" >
</CollectionGateway>
<!-- ================================================================= -->
<!-- Map of result fields to tree node attributes -->
<!-- ================================================================= -->
<ResultAttributeMap>
<Field resultField="[ fieldID in result ]" attribute="[ tree node attribute ]" />
</ResultAttributeMap>
</TreeBuilder>
| Field Summary |
| Fields inherited from interface com.raritantechnologies.utils.tree.ITreeBuilder |
TEMPLATE |
| Constructor Summary | |
ResultPathTreeBuilder()
|
|
ResultPathTreeBuilder(java.lang.String treeRootClass,
java.lang.String treeNodeClass)
|
|
| Method Summary | |
void |
addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal)
|
void |
addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal,
IResult res)
|
void |
addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal,
IResult res,
java.util.Set countSet)
|
void |
addNodes(TreeRoot theTree,
java.lang.String[] treePaths)
|
TreeRoot |
buildTree(RaritanPageContext pContext)
Builds the tree from "scratch" - starting with a SearchSource and a Query, acquires all of the results from the query and builds a tree. |
TreeRoot |
buildTree(java.lang.String treeName,
java.util.Map pathCountMap)
builds a tree from a set of paths. |
TreeRoot |
buildTree(java.lang.String treeName,
java.lang.String[] treePaths)
|
TreeRoot |
buildTree(java.lang.String treeName,
java.lang.String pathField,
IResultSet results)
|
void |
dataComplete()
Data feed is complete. |
boolean |
getAddNodeCounts()
|
java.lang.String |
getConfigurationXML()
|
java.lang.String |
getConfigurationXML(java.lang.String configurationTemplate)
|
void |
getConfigurationXML(java.io.Writer writer)
|
java.lang.String |
getNodeClass()
|
java.lang.String |
getPathField()
|
java.lang.String |
getPathSeparator()
|
java.lang.String |
getSearchSourceName()
|
java.lang.String |
getTreeClass()
|
java.lang.String |
getTreeName()
|
void |
initialize(org.w3c.dom.Element elem)
Initialize the from XML Element. |
void |
initialize(java.util.Map initParams)
Dynamic initialization. |
void |
processResults(TreeRoot theTree,
IResultSet results)
|
void |
processResults(TreeRoot theTree,
IResultSet results,
java.lang.String pathField)
|
void |
processResults(TreeRoot theTree,
IResultSet results,
java.lang.String pathField,
java.util.HashSet nodeSet)
|
void |
processResultSet(java.lang.String sessionID,
IResultSet data)
processes the IResultSet (somehow) |
TreeRoot |
refreshTree(TreeRoot theTree,
RaritanPageContext pContext)
Method to enable dynamic or refreshable trees. |
void |
setAddNodeCounts(boolean addNodeCounts)
determines whether leaf nodes will have counts added |
void |
setAddResultsToNode(boolean addResultsToNode)
|
void |
setNodeClass(java.lang.String nodeClass)
|
void |
setPathField(java.lang.String pathField)
|
void |
setPathSeparator(java.lang.String pathSep)
|
void |
setPathValueDelimiter(java.lang.String delimiter)
|
void |
setResultAttributeMap(java.util.Map resultAttributeMap)
|
void |
setSearchSourceName(java.lang.String searchSourceName)
|
void |
setTreeClass(java.lang.String treeClass)
|
void |
setTreeName(java.lang.String treeName)
|
void |
setUseRootPath(boolean useRootPath)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ResultPathTreeBuilder()
public ResultPathTreeBuilder(java.lang.String treeRootClass,
java.lang.String treeNodeClass)
| Method Detail |
public TreeRoot buildTree(RaritanPageContext pContext)
buildTree in interface ITreeBuilder
public void processResultSet(java.lang.String sessionID,
IResultSet data)
IResultSetProcessor
processResultSet in interface IResultSetProcessorpublic void dataComplete()
IResultSetProcessor
dataComplete in interface IResultSetProcessorpublic void initialize(java.util.Map initParams)
initialize in interface IResultSetProcessor
public TreeRoot refreshTree(TreeRoot theTree,
RaritanPageContext pContext)
ITreeBuilderMethod to enable dynamic or refreshable trees. Static tree builders should implement this by returning the passed in tree object. Dynamic tree builders should implement this by returning the output of their buildTree( ) method or by pruning/growing the given tree as appropriate.
ITreeBuilders that support "lazy tree node evaluation" should use this method to determine which nodes in the tree need to be updated (TreeNode.needsUpdate( ) method returns true.
refreshTree in interface ITreeBuilder
public TreeRoot buildTree(java.lang.String treeName,
java.lang.String pathField,
IResultSet results)
buildTree in interface IResultSetTreeBuilder
public void processResults(TreeRoot theTree,
IResultSet results)
public void processResults(TreeRoot theTree,
IResultSet results,
java.lang.String pathField)
public void processResults(TreeRoot theTree,
IResultSet results,
java.lang.String pathField,
java.util.HashSet nodeSet)
public TreeRoot buildTree(java.lang.String treeName,
java.lang.String[] treePaths)
public TreeRoot buildTree(java.lang.String treeName,
java.util.Map pathCountMap)
public void addNodes(TreeRoot theTree,
java.lang.String[] treePaths)
public void addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal)
public void addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal,
IResult res)
public void addNode(TreeRoot theTree,
TreeNode tNode,
java.lang.String pathVal,
IResult res,
java.util.Set countSet)
public void initialize(org.w3c.dom.Element elem)
IResultSetProcessor
initialize in interface IConfigurablepublic void setAddNodeCounts(boolean addNodeCounts)
setAddNodeCounts in interface IResultSetTreeBuilderpublic boolean getAddNodeCounts()
public void setSearchSourceName(java.lang.String searchSourceName)
public java.lang.String getSearchSourceName()
public void setPathField(java.lang.String pathField)
public java.lang.String getPathField()
public void setPathValueDelimiter(java.lang.String delimiter)
setPathValueDelimiter in interface IResultSetTreeBuilderpublic void setAddResultsToNode(boolean addResultsToNode)
setAddResultsToNode in interface IResultSetTreeBuilderpublic void setTreeName(java.lang.String treeName)
public java.lang.String getTreeName()
public void setTreeClass(java.lang.String treeClass)
public java.lang.String getTreeClass()
public void setNodeClass(java.lang.String nodeClass)
public java.lang.String getNodeClass()
public void setPathSeparator(java.lang.String pathSep)
public java.lang.String getPathSeparator()
public void setResultAttributeMap(java.util.Map resultAttributeMap)
setResultAttributeMap in interface IResultSetTreeBuilderpublic void setUseRootPath(boolean useRootPath)
setUseRootPath in interface IResultSetTreeBuilder
public void getConfigurationXML(java.io.Writer writer)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getConfigurationXML()
public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||