| java.lang.Object org.cougaar.planning.servlet.ServletWorker org.cougaar.planning.servlet.HierarchyWorker
HierarchyWorker | public class HierarchyWorker extends ServletWorker (Code) | |
Servlet worker that gathers Organizational hierarchy information
from a Cougaar society.
Takes three parameters :
- recurse, which controls whether to recurse down the hierarchy
- format, which specifies whether the response is a data stream, xml, or html.
- allRelationships, which returns all the relationships for an agent
html is in the familiar CLUSTERS_R format.
An example URL is :
http://localhost:8800/$TRANSCOM/hierarchy?recurse=true&format=xml
This says to recurse from the TRANSCOM agent and return an XML document.
Example output from this query :
TRANSCOM
TRANSCOM
GlobalAir
GlobalAir
....
NOTE : If any agent hangs, the whole request will hang...
|
Method Summary | |
public void | execute(HttpServletRequest request, HttpServletResponse response, SimpleServletSupport support) Main method. | protected HierarchyData | fetchForSubordinate(HttpServletRequest request, SimpleServletSupport support, String subOrgName, boolean allRelationships, Set visitedOrgs) | protected void | getHierarchy(OutputStream out, HttpServletRequest request, SimpleServletSupport support, int format, boolean recurse, boolean allRelationships, Set visitedOrgs) Fetch HierarchyData and write to output. | protected HierarchyData | getHierarchyData(HttpServletRequest request, SimpleServletSupport support, HasRelationships selfOrg, boolean recurse, boolean allRelationships, Set visitedOrgs) | protected String | getPrefix() | protected HasRelationships | getSelfOrg(SimpleServletSupport support) get the self organization. | protected void | getSettings(String name, String value) | protected void | recurseOnSubords(Set recurseSubOrgSet, HttpServletRequest request, SimpleServletSupport support, boolean allRelationships, Set visitedOrgs, HierarchyData hd) | public String | toString() Pretty to-String for debugging. | protected boolean | validRole(String role)
This prevents endless recursion, making it so we only follow
relationship links in one direction
Specifically, we don't follow any agents that are our superiors,
providers, converse of a role, or our self. | protected void | writeResponse(XMLable result, OutputStream out, HttpServletRequest request, SimpleServletSupport support, int format, boolean allRelationships) Writes html with the list of found agents across the
top, with links to tables below for each agent. |
ADMIN_SUBORD_ROLE | final public static Role ADMIN_SUBORD_ROLE(Code) | | |
AGENTS_IN_ROW | final protected static int AGENTS_IN_ROW(Code) | | |
CONVERSE_OF_PREFIX | final public static String CONVERSE_OF_PREFIX(Code) | | |
PROVIDER_SUFFIX | final public static String PROVIDER_SUFFIX(Code) | | |
SUBORD_ROLE | final public static Role SUBORD_ROLE(Code) | | |
SUPERIOR_SUFFIX | final public static String SUPERIOR_SUFFIX(Code) | | |
VERBOSE | public static boolean VERBOSE(Code) | | |
allRelationships | protected boolean allRelationships(Code) | | |
recurse | protected boolean recurse(Code) | | |
testing | protected boolean testing(Code) | | |
getSettings | protected void getSettings(String name, String value)(Code) | |
sets both recurse and format
recurse is either true or false
format is either data, xml, or html
see class description for what these values mean
|
toString | public String toString()(Code) | | Pretty to-String for debugging.
|
validRole | protected boolean validRole(String role)(Code) | |
This prevents endless recursion, making it so we only follow
relationship links in one direction
Specifically, we don't follow any agents that are our superiors,
providers, converse of a role, or our self.
|
writeResponse | protected void writeResponse(XMLable result, OutputStream out, HttpServletRequest request, SimpleServletSupport support, int format, boolean allRelationships)(Code) | | Writes html with the list of found agents across the
top, with links to tables below for each agent. The tables
show each agents relationships to other agents. There are links
in those tables too, to the other referenced agents.
|
|
|