| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.mlm.plugin.generic.GenericTablePlugin
All known Subclasses: org.cougaar.mlm.plugin.generic.GenericBufferedTablePlugin,
GenericTablePlugin | public class GenericTablePlugin extends SimplePlugin (Code) | | For now this plugin only subscribes to tasks from an XMLFile.
The XMLFile to be read should be passed in as an argument.
Expected DTD is:
<!ELEMENT commands (command)*>
<!ELEMENT command (task, (expand|allocate))>
<!ELEMENT expand (task)*>
<!ELEMENT allocate (((cluster)|((role)*)),default?)>
<!ELEMENT default (((cluster)|((role)*)),default?)>
<!ELEMENT cluster EMPTY>
<!ATTLIST cluster name CDATA #REQUIRED>
<!ELEMENT role EMPTY>
<!ATTLIST role name CDATA #REQUIRED>
<!ELEMENT task (phrase)?>
<!ATTLIST task verb CDATA #REQUIRED>
<!ELEMENT phrase EMPTY>
<!ATTLIST phrase
for CDATA #REQUIRED
oftype CDATA #REQUIRED>
Here is an example. It first tries to allocate all Transport tasks
to any StrategicTransportProvider. If none of the Organizations match, it then
tries to allocate all the Transport tasks to any Superior Organization.
<commands>
<command>
<task verb="Transport"/>
<allocate>
<role name="StrategicTransportationProvider"/>
<default>
<role name="Superior"/>
<default>
<allocate>
<command>
<commands>
|
Inner Class :protected static class TaskInfo | |
Inner Class :protected static class CommandInfo | |
Inner Class :protected static class ExpandCommandInfo extends CommandInfo | |
Inner Class :protected static class AllocateCommandInfo extends CommandInfo | |
Method Summary | |
protected boolean | DEBUGisCapable(Organization org, String name, String[] roles) | protected void | allocate(AllocateCommandInfo commandInfo, Collection tasks, int subNum) | protected void | cancelSubscriptions() | protected boolean | checkForOfType(Task t, String pfor, String oftype) | protected UnaryPredicate[] | createAllocationPredicates(UnaryPredicate[] tPreds) | protected UnaryPredicate[] | createTaskPredicates(CommandInfo[] fromCommands) | protected void | doAllocation(Organization org, Task task) | protected void | doExpansion(TaskInfo toTask, Task parentTask) | public synchronized void | execute() | protected Organization | findCapableOrganization(AllocateCommandInfo allocC) | protected Element | findChildElement(Node parent, String childname) | protected Element[] | findChildElements(Node parent, String childname) | protected PlanElement | getTaskPlanElement(Task t, Collection allocs) | protected void | initializeSubscriptions() | protected void | initializeTables(String xmlFileString) | protected void | makeSubscriptions() | protected UnaryPredicate | newAllocationPredicate(UnaryPredicate taskPred) | protected static UnaryPredicate | newOrganizationPred() | protected static UnaryPredicate | newTaskPredicate(String verb) | protected UnaryPredicate | newTaskPredicate(String verb, String tfor, String oftype) | protected AllocateCommandInfo | parseAllocate(Node alloc, TaskInfo sourceTask) | protected CommandInfo[] | parseCommands(Element root) | protected ExpandCommandInfo | parseExpand(Node expand, TaskInfo sourceTask) | protected TaskInfo | parseTaskInfo(Element task) | protected void | readXMLFile(String xmlFileString) | final public void | setLoggingService(LoggingService logger) rely upon load-time introspection to set these services - don't worry about revokation. | protected void | setupSubscriptions() | protected void | updateAllocationResult(IncrementalSubscription sub) |
allCommands | protected CommandInfo[] allCommands(Code) | | |
allocate | protected void allocate(AllocateCommandInfo commandInfo, Collection tasks, int subNum)(Code) | | |
cancelSubscriptions | protected void cancelSubscriptions()(Code) | | used by subclass *
|
createTaskPredicates | protected UnaryPredicate[] createTaskPredicates(CommandInfo[] fromCommands)(Code) | | |
doExpansion | protected void doExpansion(TaskInfo toTask, Task parentTask)(Code) | | |
execute | public synchronized void execute()(Code) | | |
findCapableOrganization | protected Organization findCapableOrganization(AllocateCommandInfo allocC)(Code) | | maybe memoize? *
|
initializeSubscriptions | protected void initializeSubscriptions()(Code) | | |
initializeTables | protected void initializeTables(String xmlFileString)(Code) | | |
makeSubscriptions | protected void makeSubscriptions()(Code) | | |
parseAllocate | protected AllocateCommandInfo parseAllocate(Node alloc, TaskInfo sourceTask)(Code) | | |
parseCommands | protected CommandInfo[] parseCommands(Element root)(Code) | | |
parseExpand | protected ExpandCommandInfo parseExpand(Node expand, TaskInfo sourceTask)(Code) | | |
parseTaskInfo | protected TaskInfo parseTaskInfo(Element task)(Code) | | |
readXMLFile | protected void readXMLFile(String xmlFileString)(Code) | | |
setLoggingService | final public void setLoggingService(LoggingService logger)(Code) | | rely upon load-time introspection to set these services - don't worry about revokation.
|
setupSubscriptions | protected void setupSubscriptions()(Code) | | |
|
|