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


java.lang.Object
   org.cougaar.glm.plugins.multiplesuppliers.Utility

Utility
final public class Utility (Code)
This Utility class consists of "public final static" methods that perform various useful Cougaar tasks. In particular, this class contains methods for cloning tasks, creating subtasks, allocation results and failed allocations. There are also methods that return specific Organization assets with desired capabilities, roles or even by name.




Method Summary
final public static  NewTaskcloneTask(PlanningFactory factory, Task task)
     Create a new Task object using the grammatical elements of the input task. For prepositional phrases with indirect objects that are instances of Vector, a new Vector is created for the clone.
final public static  NewTaskcloneTask(PlanningFactory factory, Task task, String[] prepositionsToExclude)
     Create a new Task object using the grammatical elements of the input task. For prepositional phrases with indirect objects that are instances of Vector, a new Vector is created for the clone.
final public static  AllocationcreateAllocation(PlanningFactory factory, Task task, Asset asset, double cost, double quantity)
     Create an Allocation object (incorporating COST, QUANTITY and SCHEDULE).
final public static  AllocationcreateAllocation(PlanningFactory factory, Task task, Asset asset, double cost, double quantity, Role roleOfAsset)
     Create an Allocation object (incorporating COST, QUANTITY, SCHEDULE, and associated Role).
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task being disposed of by this Allocation.
Parameters:
  asset - used to perform the task
Parameters:
  cost - the value to set the COST aspect value to
Parameters:
  quantity - the value to set the QUANTITY aspect value to
Parameters:
  roleOfAsset - the role of the asset performing this task.
final public static  AllocationResultcreateAllocationResult(PlanningFactory factory, boolean successFlag, double startTime, double endTime, double cost, double quantity)
     Create an AllocationResult object (incorporating START_TIME, END_TIME, COST and QUANTITY).
final public static  NewTaskcreateSubtaskFromTask(PlanningFactory factory, Task task)
     Create a new subtask using the grammatical elements of the input task, further establishing the input task as the parent of the new subtask.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object.
final public static  NewTaskcreateSubtaskFromTask(PlanningFactory factory, Task task, String[] prepositionsToExclude)
     Create a new subtask using the grammatical elements of the input task, further establishing the input task as the parent of the new subtask.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object.
Parameters:
  prepositionsToExclude - a list of prepositional phrases that should not be copied fromthe original task to the new task.
final public static  booleanequalResults(AllocationResult ar1, AllocationResult ar2)
     Determine if two AllocationResult objects are equal by comparing START_TIME, END_TIME, COST and QUNATITY.
Parameters:
  ar1 - 1st AllocationResult in comparison.
Parameters:
  ar2 - 2nd AllocationResult in comparison.
final public static  OrganizationfindNamedOrganization(String organizationName, Enumeration organizationAssets)
     Return Organization with the given name.
Parameters:
  organizationName - the name of the desired organization.
Parameters:
  organizationAssets - list of Organizations to choose from.
final public static  EnumerationfindOrgsWithCapability(String testCapableRole, Enumeration organizationAssets)
     Obtain a list or Organizations with a particular Role.
Parameters:
  testCapableRole - the Role to find matching Organizations for.
Parameters:
  organizationAssets - list of Organizations to choose from.
final public static  EnumerationgetAdministrativeSubordinates(Organization org)
     Obtain list of Administrative Subordinates for an organization.
final public static  EnumerationgetAdministrativeSuperiors(Organization org)
     Obtain list of Administrative Superiors for an organization.
final public static  TaskgetLastSubtaskInWorkflow(Workflow workflow)
     Obtain reference to last subtask in a workflow.
final public static  CollectiongetOrganizationRoles(Organization organization)
     Return Collection of Organization's roles.
Parameters:
  organization - the Organization to find Roles for.
final public static  TaskgetTaskWithUID(Enumeration tasks, String uid)
     Return Task with the given UID.
Parameters:
  tasks - list of Tasks to choose from.
Parameters:
  uid - the UID of the desired Task.
final public static  DispositionmakeFailedDisposition(PlanningFactory factory, Task task)
     Create an Failed Disposition object associated with a task.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task to be associated with the Disposition.
final public static  booleantestCapableRole(Organization organization, String testrole)
     Does the input Organization have the desired Role?
Parameters:
  organization - the Organization to test for desired Role.
Parameters:
  testrole - the desired Role to test for.



Method Detail
cloneTask
final public static NewTask cloneTask(PlanningFactory factory, Task task)(Code)
Create a new Task object using the grammatical elements of the input task. For prepositional phrases with indirect objects that are instances of Vector, a new Vector is created for the clone. The contents of the original Vector are copied by reference to the new Vector. This way, the new Vector's content can be changed without effecting the original Vector.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object. A newly created Task patterned from an input task.



cloneTask
final public static NewTask cloneTask(PlanningFactory factory, Task task, String[] prepositionsToExclude)(Code)
Create a new Task object using the grammatical elements of the input task. For prepositional phrases with indirect objects that are instances of Vector, a new Vector is created for the clone. The contents of the original Vector are copied by reference to the new Vector. This way, the new Vector's content can be changed without effecting the original Vector.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object.
Parameters:
  prepositionsToExclude - a list of prepositional phrases that should not be copied fromthe original task to the new task. A newly created Task patterned from an input task.



createAllocation
final public static Allocation createAllocation(PlanningFactory factory, Task task, Asset asset, double cost, double quantity)(Code)
Create an Allocation object (incorporating COST, QUANTITY and SCHEDULE).
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task being disposed of by this Allocation.
Parameters:
  asset - used to perform the task
Parameters:
  cost - the value to set the COST aspect value to
Parameters:
  quantity - the value to set the QUANTITY aspect value to an Allocation object which is the disposition of the input task



createAllocation
final public static Allocation createAllocation(PlanningFactory factory, Task task, Asset asset, double cost, double quantity, Role roleOfAsset)(Code)
Create an Allocation object (incorporating COST, QUANTITY, SCHEDULE, and associated Role).
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task being disposed of by this Allocation.
Parameters:
  asset - used to perform the task
Parameters:
  cost - the value to set the COST aspect value to
Parameters:
  quantity - the value to set the QUANTITY aspect value to
Parameters:
  roleOfAsset - the role of the asset performing this task. If roleOfAsset is null,Role.BOGUS will be used. an Allocation object which is the disposition of the input task



createAllocationResult
final public static AllocationResult createAllocationResult(PlanningFactory factory, boolean successFlag, double startTime, double endTime, double cost, double quantity)(Code)
Create an AllocationResult object (incorporating START_TIME, END_TIME, COST and QUANTITY). This method sets confidence rating to 1.0.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  successFlag - success value to associate with this allocation result.
Parameters:
  startTime - of this allocation
Parameters:
  endTime - of this allocation
Parameters:
  cost - the value to set the COST aspect value to
Parameters:
  quantity - the value to set the QUANTITY aspect value to an AllocationResult object with aspect set to input values



createSubtaskFromTask
final public static NewTask createSubtaskFromTask(PlanningFactory factory, Task task)(Code)
Create a new subtask using the grammatical elements of the input task, further establishing the input task as the parent of the new subtask.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object. A newly created Task patterned from an input task.



createSubtaskFromTask
final public static NewTask createSubtaskFromTask(PlanningFactory factory, Task task, String[] prepositionsToExclude)(Code)
Create a new subtask using the grammatical elements of the input task, further establishing the input task as the parent of the new subtask.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task whose grammatical elements will be usedto create a new Task object.
Parameters:
  prepositionsToExclude - a list of prepositional phrases that should not be copied fromthe original task to the new task. A newly created Task patterned from an input task.



equalResults
final public static boolean equalResults(AllocationResult ar1, AllocationResult ar2)(Code)
Determine if two AllocationResult objects are equal by comparing START_TIME, END_TIME, COST and QUNATITY.
Parameters:
  ar1 - 1st AllocationResult in comparison.
Parameters:
  ar2 - 2nd AllocationResult in comparison. true/false are the AllocationResults equals?



findNamedOrganization
final public static Organization findNamedOrganization(String organizationName, Enumeration organizationAssets)(Code)
Return Organization with the given name.
Parameters:
  organizationName - the name of the desired organization.
Parameters:
  organizationAssets - list of Organizations to choose from. Organization with given name.



findOrgsWithCapability
final public static Enumeration findOrgsWithCapability(String testCapableRole, Enumeration organizationAssets)(Code)
Obtain a list or Organizations with a particular Role.
Parameters:
  testCapableRole - the Role to find matching Organizations for.
Parameters:
  organizationAssets - list of Organizations to choose from. list or Organizations with a desired Role.



getAdministrativeSubordinates
final public static Enumeration getAdministrativeSubordinates(Organization org)(Code)
Obtain list of Administrative Subordinates for an organization.
Parameters:
  org - whose Administrative Subordinates to find the list of Administrative Subordinates



getAdministrativeSuperiors
final public static Enumeration getAdministrativeSuperiors(Organization org)(Code)
Obtain list of Administrative Superiors for an organization.
Parameters:
  org - whose Administrative Superiors to find the list of Administrative Superiors



getLastSubtaskInWorkflow
final public static Task getLastSubtaskInWorkflow(Workflow workflow)(Code)
Obtain reference to last subtask in a workflow. Useful if you need to add a new task to a workflow with aspects of the new task based on that last task or its allocation results.
Parameters:
  workflow - to find last subtask of. the last task in the workflow



getOrganizationRoles
final public static Collection getOrganizationRoles(Organization organization)(Code)
Return Collection of Organization's roles.
Parameters:
  organization - the Organization to find Roles for. list of Roles associated with input Organization.



getTaskWithUID
final public static Task getTaskWithUID(Enumeration tasks, String uid)(Code)
Return Task with the given UID.
Parameters:
  tasks - list of Tasks to choose from.
Parameters:
  uid - the UID of the desired Task. Task with given UID.



makeFailedDisposition
final public static Disposition makeFailedDisposition(PlanningFactory factory, Task task)(Code)
Create an Failed Disposition object associated with a task.
Parameters:
  factory - reference to cluster's PlanningFactory
Parameters:
  task - the task to be associated with the Disposition. a Failed Disposition object associated with the task



testCapableRole
final public static boolean testCapableRole(Organization organization, String testrole)(Code)
Does the input Organization have the desired Role?
Parameters:
  organization - the Organization to test for desired Role.
Parameters:
  testrole - the desired Role to test for. true/false - Does the input Organization have the desired Role?



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.