Java Doc for GenericTablePlugin.java in  » Science » Cougaar12_4 » org » cougaar » mlm » plugin » generic » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.mlm.plugin.generic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
protected  CommandInfo[]allCommands
    
protected  UnaryPredicate[]allocPreds
    
protected  IncrementalSubscription[]allocationsSub
    
protected  LoggingServicelogger
    
protected  IncrementalSubscriptionorganizationSub
    
protected  UnaryPredicate[]taskPreds
    
protected  IncrementalSubscription[]tasksSub
    


Method Summary
protected  booleanDEBUGisCapable(Organization org, String name, String[] roles)
    
protected  voidallocate(AllocateCommandInfo commandInfo, Collection tasks, int subNum)
    
protected  voidcancelSubscriptions()
    
protected  booleancheckForOfType(Task t, String pfor, String oftype)
    
protected  UnaryPredicate[]createAllocationPredicates(UnaryPredicate[] tPreds)
    
protected  UnaryPredicate[]createTaskPredicates(CommandInfo[] fromCommands)
    
protected  voiddoAllocation(Organization org, Task task)
    
protected  voiddoExpansion(TaskInfo toTask, Task parentTask)
    
public synchronized  voidexecute()
    
protected  OrganizationfindCapableOrganization(AllocateCommandInfo allocC)
    
protected  ElementfindChildElement(Node parent, String childname)
    
protected  Element[]findChildElements(Node parent, String childname)
    
protected  PlanElementgetTaskPlanElement(Task t, Collection allocs)
    
protected  voidinitializeSubscriptions()
    
protected  voidinitializeTables(String xmlFileString)
    
protected  voidmakeSubscriptions()
    
protected  UnaryPredicatenewAllocationPredicate(UnaryPredicate taskPred)
    
protected static  UnaryPredicatenewOrganizationPred()
    
protected static  UnaryPredicatenewTaskPredicate(String verb)
    
protected  UnaryPredicatenewTaskPredicate(String verb, String tfor, String oftype)
    
protected  AllocateCommandInfoparseAllocate(Node alloc, TaskInfo sourceTask)
    
protected  CommandInfo[]parseCommands(Element root)
    
protected  ExpandCommandInfoparseExpand(Node expand, TaskInfo sourceTask)
    
protected  TaskInfoparseTaskInfo(Element task)
    
protected  voidreadXMLFile(String xmlFileString)
    
final public  voidsetLoggingService(LoggingService logger)
     rely upon load-time introspection to set these services - don't worry about revokation.
protected  voidsetupSubscriptions()
    
protected  voidupdateAllocationResult(IncrementalSubscription sub)
    

Field Detail
allCommands
protected CommandInfo[] allCommands(Code)



allocPreds
protected UnaryPredicate[] allocPreds(Code)



allocationsSub
protected IncrementalSubscription[] allocationsSub(Code)



logger
protected LoggingService logger(Code)
Everybody needs a logger



organizationSub
protected IncrementalSubscription organizationSub(Code)



taskPreds
protected UnaryPredicate[] taskPreds(Code)



tasksSub
protected IncrementalSubscription[] tasksSub(Code)





Method Detail
DEBUGisCapable
protected boolean DEBUGisCapable(Organization org, String name, String[] roles)(Code)
Ugly debug tool!



allocate
protected void allocate(AllocateCommandInfo commandInfo, Collection tasks, int subNum)(Code)



cancelSubscriptions
protected void cancelSubscriptions()(Code)
used by subclass *



checkForOfType
protected boolean checkForOfType(Task t, String pfor, String oftype)(Code)



createAllocationPredicates
protected UnaryPredicate[] createAllocationPredicates(UnaryPredicate[] tPreds)(Code)



createTaskPredicates
protected UnaryPredicate[] createTaskPredicates(CommandInfo[] fromCommands)(Code)



doAllocation
protected void doAllocation(Organization org, Task task)(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? *



findChildElement
protected Element findChildElement(Node parent, String childname)(Code)



findChildElements
protected Element[] findChildElements(Node parent, String childname)(Code)



getTaskPlanElement
protected PlanElement getTaskPlanElement(Task t, Collection allocs)(Code)



initializeSubscriptions
protected void initializeSubscriptions()(Code)



initializeTables
protected void initializeTables(String xmlFileString)(Code)



makeSubscriptions
protected void makeSubscriptions()(Code)



newAllocationPredicate
protected UnaryPredicate newAllocationPredicate(UnaryPredicate taskPred)(Code)



newOrganizationPred
protected static UnaryPredicate newOrganizationPred()(Code)



newTaskPredicate
protected static UnaryPredicate newTaskPredicate(String verb)(Code)



newTaskPredicate
protected UnaryPredicate newTaskPredicate(String verb, String tfor, String oftype)(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)



updateAllocationResult
protected void updateAllocationResult(IncrementalSubscription sub)(Code)



Methods inherited from org.cougaar.planning.plugin.legacy.SimplePlugin
public AllocationResult createEstimatedAllocationResult(Task t, double confidenceRating, boolean success)(Code)(Java Doc)
public void createPublishExpansion(Task parent)(Code)(Java Doc)
final protected void cycle()(Code)(Java Doc)
abstract protected void execute()(Code)(Java Doc)
final public void initialize() throws StateModelException(Code)(Java Doc)
public void load(Object object) throws StateModelException(Code)(Java Doc)
final protected void prerun()(Code)(Java Doc)
final public void resume() throws StateModelException(Code)(Java Doc)
protected void setExecutionDelay(long minDelay, long maxDelay)(Code)(Java Doc)
abstract protected void setupSubscriptions()(Code)(Java Doc)
final public void start() throws StateModelException(Code)(Java Doc)
final public void stop() throws StateModelException(Code)(Java Doc)
final public void suspend() throws StateModelException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.