Java Doc for BasicProcessor.java in  » Science » Cougaar12_4 » org » cougaar » glm » plugins » 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.glm.plugins 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.glm.plugins.BasicProcessor

All known Subclasses:   org.cougaar.glm.plugins.inventory.InventoryProcessor,  org.cougaar.glm.plugins.projection.GenerateDemandExpander,  org.cougaar.mlm.construction.ConstructionGenerateDemandProjector,
BasicProcessor
abstract public class BasicProcessor (Code)
BasicProcessor supplies generic methods for connecting to the 'owner' plugin and to record objects as they are published by this processor to the logplan.
See Also:   DecorationPlugin
See Also:   PluginDecorator

Inner Class :public class UnlikeTaskARA implements AllocationResultAggregator

Field Summary
final protected static  longMSEC_PER_DAY
    
final protected static  longMSEC_PER_HOUR
    
final protected static  longMSEC_PER_MIN
    
public  AllocationResultAggregatorUnlikeTaskARA_
    
protected  Calendarcalendar_
    
protected  StringclassName_
    
protected  MessageAddressclusterId_
    
protected  PluginDelegatedelegate_
    
public static  NumberFormatdemandFormat
    
protected  PlanningFactoryldmFactory_
    
protected  StringmyOrgName_
    
protected  OrganizationmyOrganization_
    
protected  DecorationPluginplugin_
    

Constructor Summary
public  BasicProcessor(DecorationPlugin pi, Organization org)
    

Method Summary
public  StringarDesc(AllocationResult ar)
    
public  AllocationResultbuildExpansionResult(Expansion expansion)
    
public  AllocationResultbuildExpansionResult(Expansion expansion, boolean like_tasks)
    
public  NewTaskbuildNewTask(Task input_task, String output_verb, Asset direct_object)
    
public  TaskbuildTask(Task input_task, String output_verb, Asset direct_object, PrepositionalPhrase pp)
    
public  TaskbuildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases)
    
public  TaskbuildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Preference pref)
    
public  TaskbuildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Enumeration prefs)
    
public  TaskbuildTask(Task input_task, String output_verb, Asset direct_object, Enumeration prefs)
    
public  WorkflowbuildWorkflow(Task parent, Vector subtasks)
     Build a workflow from a vector of tasks.
public  WorkflowbuildWorkflow(Task parent, Task task)
     Build a workflow with a single task.
protected  TaskchangeTask(Task prev_task, Task new_task)
     Create String defining task identity.
public  PreferencecreateDateAfterPreference(int aspect, long value)
    
public  PreferencecreateDateBeforePreference(int aspect, long value)
    
public  AllocationResultcreateEstimatedAllocationResult(Task t)
    
public  PreferencecreatePreference(int aspect, double value)
    
public  PreferencecreateQuantityPreference(int aspect, double value)
    
protected  EnumerationdiffProjections(Schedule published_schedule, Schedule newtask_schedule)
     Reconcile an intended schedule of projections with the currently published schedule of projections so as to reuse as many of the existing projection tasks as possible. Generally as elements from the published schedule are used they are removed from the schedule.
public  longgetAlpTime()
    
public  booleanisSubscriptionChanged(IncrementalSubscription sub)
    
public static  SchedulenewObjectSchedule(Enumeration tasks)
    
public  PrepositionalPhrasenewPrepositionalPhrase(String preposition, Object io)
    
public  PrepositionalPhrasenewPrepositionalPhrase(String preposition)
    
public  NewWorkflownewWorkflow(Task parent)
    
protected  StringprintProjection(String msg, Task task)
    
protected  voidpublishAddTask(Task task)
    
protected  booleanpublishAllocation(Task task, Asset asset, org.cougaar.planning.ldm.plan.Role role)
    
protected  booleanpublishAllocation(Task task, Asset asset, Role role, AllocationResult ar)
    
protected  booleanpublishAllocation(Task task, Asset asset, Role role, AllocationResult ar, boolean needAR)
    
protected  voidpublishAsset(Asset asset)
    
protected  voidpublishChangeAsset(Asset asset)
    
protected  voidpublishChangeTask(Task task)
    
protected  voidpublishExpansion(Task parent, Vector tasks)
     The goal of this code is to replace any existing expansion of the parent into the new set of subtasks, but to do so in a way that maximizes the reuse of existing subtasks of the parent. This is done by putting all the existing subtasks into a hashtable using a key characterizing the ways that the subtask cannot be changed (verb, etc.).
protected  voidpublishFailedDisposition(Task task, AllocationResult ar)
    
protected  voidpublishRemoveAllocation(Allocation alloc)
    
protected  voidpublishRemoveAsset(Asset asset)
    
protected  voidpublishRemoveExpansion(Expansion exp)
    
protected  voidpublishRemoveTask(Task task)
    
public  StringqseString(QuantityScheduleElement qse)
    
protected  voidsetEndTimePreference(NewTask task, long end)
    
protected  voidsetStartTimePreference(NewTask task, long start)
    
protected  IncrementalSubscriptionsubscribe(UnaryPredicate predicate)
    
protected  StringtaskKey(Task t)
     Create String defining task identity.
abstract public  voidupdate()
    
public  voidupdateAllocationResult(PlanElement pe)
    
protected  voidupdateExpansionResult(Enumeration planelements)
     When the published sub-tasks of an expansion get the allocation result updated, try to update the allocation result on the whole expansion.

Field Detail
MSEC_PER_DAY
final protected static long MSEC_PER_DAY(Code)
number of msec per day



MSEC_PER_HOUR
final protected static long MSEC_PER_HOUR(Code)



MSEC_PER_MIN
final protected static long MSEC_PER_MIN(Code)



UnlikeTaskARA_
public AllocationResultAggregator UnlikeTaskARA_(Code)



calendar_
protected Calendar calendar_(Code)



className_
protected String className_(Code)



clusterId_
protected MessageAddress clusterId_(Code)
organization cluster identifier



delegate_
protected PluginDelegate delegate_(Code)
'hook' to plugin's methods



demandFormat
public static NumberFormat demandFormat(Code)



ldmFactory_
protected PlanningFactory ldmFactory_(Code)



myOrgName_
protected String myOrgName_(Code)



myOrganization_
protected Organization myOrganization_(Code)



plugin_
protected DecorationPlugin plugin_(Code)




Constructor Detail
BasicProcessor
public BasicProcessor(DecorationPlugin pi, Organization org)(Code)




Method Detail
arDesc
public String arDesc(AllocationResult ar)(Code)



buildExpansionResult
public AllocationResult buildExpansionResult(Expansion expansion)(Code)



buildExpansionResult
public AllocationResult buildExpansionResult(Expansion expansion, boolean like_tasks)(Code)



buildNewTask
public NewTask buildNewTask(Task input_task, String output_verb, Asset direct_object)(Code)



buildTask
public Task buildTask(Task input_task, String output_verb, Asset direct_object, PrepositionalPhrase pp)(Code)



buildTask
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases)(Code)



buildTask
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Preference pref)(Code)



buildTask
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Enumeration prefs)(Code)



buildTask
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Enumeration prefs)(Code)



buildWorkflow
public Workflow buildWorkflow(Task parent, Vector subtasks)(Code)
Build a workflow from a vector of tasks.
Parameters:
  parent - parent task of workflow
Parameters:
  subtasks - workflow tasks Workflow



buildWorkflow
public Workflow buildWorkflow(Task parent, Task task)(Code)
Build a workflow with a single task.
Parameters:
  parent - parent task of workflow
Parameters:
  task - single workflow task Workflow



changeTask
protected Task changeTask(Task prev_task, Task new_task)(Code)
Create String defining task identity. Defaults to comparing preferences.
Parameters:
  prev_task - previously published task.
Parameters:
  new_task - already defined to have the same taskKey as task a. null if the two tasks are the same,or returns task a modified for a publishChange.
See Also:   BasicProcessor.taskKey(Task t)



createDateAfterPreference
public Preference createDateAfterPreference(int aspect, long value)(Code)



createDateBeforePreference
public Preference createDateBeforePreference(int aspect, long value)(Code)



createEstimatedAllocationResult
public AllocationResult createEstimatedAllocationResult(Task t)(Code)
create an AllocationResult that assumes the 'best' possible result (taken from GLSAllocatorPlugin)



createPreference
public Preference createPreference(int aspect, double value)(Code)
Create a preference with the Strict scoring function at 'value' for the given aspect type



createQuantityPreference
public Preference createQuantityPreference(int aspect, double value)(Code)
Create a preference with the scoring NearOrAbove function at 'value' for the given aspect type



diffProjections
protected Enumeration diffProjections(Schedule published_schedule, Schedule newtask_schedule)(Code)
Reconcile an intended schedule of projections with the currently published schedule of projections so as to reuse as many of the existing projection tasks as possible. Generally as elements from the published schedule are used they are removed from the schedule. Tasks remaining in the schedule are rescinded. There are three regions of interest: before now, around now and after now. These are each handled separately. In the region before now, already published tasks are unconditionally retained and new tasks are unconditionally ignored. In the region around now, tasks may start before now and end after. If both a published task and a new task spanning now exist, then there are two cases: If the demand rates are the same, then the published task is changed to look like the new task (by changing its end time preference). The start time of the published task is unchanged. Think of the existing task ending now and the new task starting now and then splicing the two together into one task. If the rates are different, then the existing task must end when the new task starts. The current code accomplishes this by setting the end time preference of the existing task to the start time of the new. This is not exactly correct since we shouldn't change the past. The times of the tasks should be no less than now. In the region after now, we try to match up the tasks. When a match is possible, the existing task is changed if necessary (and republished) otherwise it is rescinded and the new task added.



getAlpTime
public long getAlpTime()(Code)



isSubscriptionChanged
public boolean isSubscriptionChanged(IncrementalSubscription sub)(Code)



newObjectSchedule
public static Schedule newObjectSchedule(Enumeration tasks)(Code)



newPrepositionalPhrase
public PrepositionalPhrase newPrepositionalPhrase(String preposition, Object io)(Code)



newPrepositionalPhrase
public PrepositionalPhrase newPrepositionalPhrase(String preposition)(Code)



newWorkflow
public NewWorkflow newWorkflow(Task parent)(Code)
Initialize workflow parent task and sets propagating
Parameters:
  parent - parent task of workflow NewWorkflow with parent task an propagating set



printProjection
protected String printProjection(String msg, Task task)(Code)



publishAddTask
protected void publishAddTask(Task task)(Code)



publishAllocation
protected boolean publishAllocation(Task task, Asset asset, org.cougaar.planning.ldm.plan.Role role)(Code)



publishAllocation
protected boolean publishAllocation(Task task, Asset asset, Role role, AllocationResult ar)(Code)



publishAllocation
protected boolean publishAllocation(Task task, Asset asset, Role role, AllocationResult ar, boolean needAR)(Code)



publishAsset
protected void publishAsset(Asset asset)(Code)



publishChangeAsset
protected void publishChangeAsset(Asset asset)(Code)



publishChangeTask
protected void publishChangeTask(Task task)(Code)



publishExpansion
protected void publishExpansion(Task parent, Vector tasks)(Code)
The goal of this code is to replace any existing expansion of the parent into the new set of subtasks, but to do so in a way that maximizes the reuse of existing subtasks of the parent. This is done by putting all the existing subtasks into a hashtable using a key characterizing the ways that the subtask cannot be changed (verb, etc.). Then the new tasks are matched against the old. Where matches are found the existing task is adjusted to match. IF a new task cannot be matched, it is added to the expansion. After matching is completed, any old tasks that were not matched are removed from the expansion.



publishFailedDisposition
protected void publishFailedDisposition(Task task, AllocationResult ar)(Code)



publishRemoveAllocation
protected void publishRemoveAllocation(Allocation alloc)(Code)



publishRemoveAsset
protected void publishRemoveAsset(Asset asset)(Code)



publishRemoveExpansion
protected void publishRemoveExpansion(Expansion exp)(Code)



publishRemoveTask
protected void publishRemoveTask(Task task)(Code)



qseString
public String qseString(QuantityScheduleElement qse)(Code)



setEndTimePreference
protected void setEndTimePreference(NewTask task, long end)(Code)



setStartTimePreference
protected void setStartTimePreference(NewTask task, long start)(Code)



subscribe
protected IncrementalSubscription subscribe(UnaryPredicate predicate)(Code)



taskKey
protected String taskKey(Task t)(Code)
Create String defining task identity.
Parameters:
  t - task String defining task identity.



update
abstract public void update()(Code)



updateAllocationResult
public void updateAllocationResult(PlanElement pe)(Code)



updateExpansionResult
protected void updateExpansionResult(Enumeration planelements)(Code)
When the published sub-tasks of an expansion get the allocation result updated, try to update the allocation result on the whole expansion. Do not update the allocation result until all subtasks have been updated.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.