Package org.intermine.web.struts
Class TreeController
- java.lang.Object
-
- org.apache.struts.action.Action
-
- org.apache.struts.tiles.actions.TilesAction
-
- org.intermine.web.struts.TreeController
-
public class TreeController extends org.apache.struts.tiles.actions.TilesAction
Perform initialisation steps for displaying a tree- Author:
- Mark Woodbridge, Kim Rutherford
-
-
Constructor Summary
Constructors Constructor Description TreeController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.struts.action.ActionForward
execute(org.apache.struts.tiles.ComponentContext context, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected java.util.List<TreeNode>
makeNodes(ClassDescriptor parent, java.util.Set<java.lang.String> openClasses, int depth, java.util.Map<?,?> classCounts, java.util.List<java.lang.String> structure, boolean last)
Produce a list of tree nodes for a class and its children, marking as 'open' and recursing on any that appear on the openClasses list.-
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
-
-
-
Method Detail
-
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.tiles.ComponentContext context, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
- Overrides:
execute
in classorg.apache.struts.tiles.actions.TilesAction
- Throws:
java.lang.Exception
-
makeNodes
protected java.util.List<TreeNode> makeNodes(ClassDescriptor parent, java.util.Set<java.lang.String> openClasses, int depth, java.util.Map<?,?> classCounts, java.util.List<java.lang.String> structure, boolean last)
Produce a list of tree nodes for a class and its children, marking as 'open' and recursing on any that appear on the openClasses list.- Parameters:
parent
- the root classopenClasses
- the Set of open classesdepth
- the current depth from the rootclassCounts
- the classCounts attribute from the ServletContextstructure
- a list of Strings - for definition see TreeNode.getStructurelast
- true if this is the last sibling- Returns:
- a List of nodes
-
-