|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.cougaar.tutorial.booksonline.util.BolSocietyUtils
Description: Handy functions for working in all areas of the BOL society.
| Nested Class Summary | |
static class |
BolSocietyUtils.Database
|
| Field Summary | |
static int |
BOL_ASPECT_COUNT
Description: Total number of the BOL specific aspect types. |
static int |
CALENDAR_HORIZON_DAYS
Description: Maximum number of days to plan an order. |
static int |
CANCELLED_ASPECT
Description: Aspect Type number for the cancelled transaction aspect value. |
static java.lang.String |
CCINFO_PREPOSITION
Description: Keyword specifying preposition containing credit card info. |
static int |
COMPLETED_ASPECT
Description: Aspect Type number for the completed aspect value. |
static int |
DROP_SHIP_DATE_ASPECT
Description: Aspect Type number for the drop ship date aspect value. |
static java.lang.String |
DUMMY_VERB
Description: Verb for scheduling. |
static java.lang.String |
FINAL_PAYMENT_VERB
Description: Verb for transfering money after shipment, subscribed to on the Payment cluster. |
static int |
FULL_LOAD_ASPECT
Description: Aspect Type number for the cancelled transaction aspect value. |
static java.lang.String |
GENERIC_WORKFLOW_PREPOSITION
Prepositional Phrase used to tag a task to be monitored by the WorkflowExcecutionPlugin |
static java.lang.String |
IDENT_PREPOSITION
Description: Keyword specifying preposition for type of search. |
static java.lang.String |
INVENTORY_PROTOTYPE
Inventory Prototype cache name |
static java.lang.String |
ISBN_PREPOSITION
Description: Keyword specifying preposition of "isbn:quantiy;isbn:quantity" format actual on book order task. |
static double |
ISCANCELLED
Description: The book order has been cancelled, either by the user or the log plan has achieved an "illegal" state. |
static double |
ISCOMPLETED
Description: The book order has finished this task, or sub-task. |
static double |
ISNOTCANCELLED
Description: The book order not been cancelled. |
static double |
ISNOTCOMPLETED
Description: The book order has NOT finished this task, or sub-task, and is still active. |
static java.lang.String |
KEYWORD_PREPOSITION
Description: Keyword specifying preposition for a keyword search of the titles in the inventory. |
static java.lang.String |
OBJECT_PROTOTYPE
Object Prototyp cache name |
static java.lang.String |
ORDER_MANAGER_ROLE
OrderManager Role |
static java.lang.String |
ORDER_VERB
Description: Verb for ordering book, subscribed to on the OrderManager cluster. |
static java.lang.String |
ORDERDETAILS_PREPOSITION
Description: Keyword specifying preposition containing user detail information. |
static int |
PACK_DATE_ASPECT
Description: Aspect Type number for the pack date aspect value. |
static java.lang.String |
PACKER_PREPOSITION
Description: Keyword specifying preposition for packer text. |
static java.lang.String |
PACKER_PROTOTYPE
Packer Prototype cache name |
static java.lang.String |
PACKER_VERB
Description: Verb for actual packing of books at Shipper. |
static java.lang.String |
PAYMENT_ROLE
Payment Authority Role |
static java.lang.String |
PAYMENT_VERB
Description: Verb for verifying credit limit, subscribed to on the Payment cluster. |
static java.lang.String |
PUBLISHER_ROLE
Publisher role |
static java.lang.String |
PUBLISHER_VERB
Description: Verb for drop shipment or replenishing supply in Warehouse, subscribed to on the Publisher cluster. |
static java.lang.String |
PUBLISHERPACK_VERB
Description: Verb for getting books packed up at the Publisher, subscribed to on the Publisher cluster. |
static java.lang.String |
REVIEW_UPDATE_ROLE
Review update role |
static java.lang.String |
REVIEWTEXT_PREPOSITION
Description: Keyword specifying preposition for new review text. |
static java.lang.String |
SEARCH_PREPOSITION
Description: Keyword specifying preposition for type of search. |
static double |
SEARCH_SUCCESS
Seach sucess constant |
static java.lang.String |
SEARCH_VERB
Description: Verb for finding a book, used in the PSP. |
static int |
SHIP_DATE_ASPECT
Description: Aspect Type number for the shipping date aspect value. |
static java.lang.String |
SHIP_ROUTE_VERB
Description: Verb for shipment route. |
static java.lang.String |
SHIPCITY_PREPOSITION
Description: Keyword specifying preposition identifying shipping destination city. |
static java.lang.String |
SHIPDEST_PREPOSITION
Description: Keyword specifying preposition identifying shipping destination. |
static java.lang.String |
SHIPMETHOD_PREPOSITION
Description: Keyword specifying preposition of shipping preference. |
static java.lang.String |
SHIPPER_ROLE
Shipping Vendor Role |
static java.lang.String |
SHIPPER_VERB
Description: Verb for requesting shipment of books, subscribed to on the Shipper cluster. |
static java.lang.String |
UPDATE_REVIEW_VERB
Description: Verb for adding a new review to an item (book, CD, whatever), subscribed to on the Warehouse cluster. |
static java.lang.String |
USERDETAIL_PREPOSITION
Description: Keyword specifying preposition containing user detail information. |
static java.lang.String |
WAREHOUSE_PROTOTYPE
Warhouse Prototyp cache name |
static java.lang.String |
WAREHOUSE_ROLE
Warehouse role |
static java.lang.String |
WAREHOUSE_VERB
Description: Verb for requesting books, subscribed to on the Warehouse cluster. |
static java.lang.String |
WAREHOUSEPACK_VERB
Description: Verb for getting books packed up, subscribed to on the Warehouse cluster. |
static java.lang.String |
WARN_INVENTORY_COST_PHRASE
Prep phrase for cost |
static java.lang.String |
WARN_INVENTORY_ISBN_PHRASE
Prep phrase for isbn |
static java.lang.String |
WARN_INVENTORY_TITLE_PHRASE
Prep phrase for the title of the book with low inventory |
static java.lang.String |
WARN_INVENTORY_VERB
Verb Constant for inventory levels |
static java.lang.String |
WPACKER_VERB
Description: Verb for actual packing of books at Warehouse. |
| Constructor Summary | |
BolSocietyUtils()
|
|
| Method Summary | |
static org.cougaar.planning.ldm.plan.TaskScoreTable |
buildTSTfromWF(org.cougaar.planning.ldm.plan.Workflow wf)
Description: Construct a TaskScoreTable object based on this Workflow object. |
static org.cougaar.planning.ldm.plan.AllocationResult |
createAllocationResult(org.cougaar.planning.ldm.PlanningFactory factory,
boolean success,
double rating,
int[] types,
double[] values)
Utitlity Method to Create an AllocationResult |
static org.cougaar.planning.ldm.plan.Task |
createOrderTask(org.cougaar.planning.ldm.PlanningFactory pf,
java.util.Vector bo,
java.lang.String ccInfo,
UserDetails ud,
java.lang.String shipMethod,
java.lang.String verb)
Description: Create a book order task. |
static org.cougaar.planning.ldm.plan.NewPrepositionalPhrase |
createPrepPhrase(java.lang.Object indirectObj,
java.lang.String preposition,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
Description: Construct a new prepositional phrase. |
static org.cougaar.planning.ldm.plan.Task |
createUpdateReviewTask(org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF,
java.lang.String isbn,
java.lang.String review)
Description: Create a task to add a review of an item (book, CD, etc). |
static java.lang.String |
currency(double value)
Description: Converts the given value to a printable currency string. |
static java.lang.String |
currency(java.lang.String value)
Description: Converts the given value to a printable currency string. |
static org.cougaar.planning.ldm.plan.AllocationResult |
doAllocationResultAggregation(org.cougaar.planning.ldm.plan.Workflow wf)
Description: Conflate the Allocation Results of sub-tasks. |
static java.util.Vector |
getAllPreferences(org.cougaar.planning.ldm.plan.Task task)
Description: Return all preferences attached to the given task. |
static double |
getAspectScore(org.cougaar.planning.ldm.plan.Task task,
int aspectType)
Description: Get the score of the aspect type from the task. |
static double |
getPreferenceScore(org.cougaar.planning.ldm.plan.AllocationResult allocation,
org.cougaar.planning.ldm.plan.Preference preference)
Description: Based on the preference aspect type run the function to get the score. |
static void |
modifyOrderPreferences(org.cougaar.planning.ldm.plan.Task task,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
Description: Set up order preference on a book order task. |
static void |
modifySearchPreferences(org.cougaar.planning.ldm.plan.Task task,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
Description: Create a preference on search risk of success |
static java.lang.String[][] |
parseISBNPrepositions(java.lang.String prepositions)
Description: Parses the ISBN prepositional phrase string getting each ISBN number and quantity. |
static void |
setOrderPreferences(org.cougaar.planning.ldm.plan.NewTask task,
java.util.Vector boVec,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
Description: Create the preference on a book order task. |
static void |
setOrderPrepPhrases(org.cougaar.planning.ldm.plan.NewTask task,
java.util.Vector bo,
UserDetails ud,
java.lang.String ccInfo,
java.lang.String shipMethod,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
Description: Create all the prepositional phrases for a book order task and load them. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DUMMY_VERB
public static final java.lang.String ORDER_VERB
public static final java.lang.String SEARCH_VERB
public static final java.lang.String PAYMENT_VERB
public static final java.lang.String FINAL_PAYMENT_VERB
public static final java.lang.String WAREHOUSE_VERB
public static final java.lang.String PUBLISHER_VERB
public static final java.lang.String WAREHOUSEPACK_VERB
public static final java.lang.String PUBLISHERPACK_VERB
public static final java.lang.String SHIP_ROUTE_VERB
public static final java.lang.String SHIPPER_VERB
public static final java.lang.String UPDATE_REVIEW_VERB
public static final java.lang.String PACKER_VERB
public static final java.lang.String WPACKER_VERB
public static java.lang.String ORDER_MANAGER_ROLE
public static java.lang.String PAYMENT_ROLE
public static java.lang.String SHIPPER_ROLE
public static java.lang.String WAREHOUSE_ROLE
public static java.lang.String REVIEW_UPDATE_ROLE
public static java.lang.String PUBLISHER_ROLE
public static java.lang.String INVENTORY_PROTOTYPE
public static java.lang.String WAREHOUSE_PROTOTYPE
public static java.lang.String OBJECT_PROTOTYPE
public static java.lang.String PACKER_PROTOTYPE
public static final java.lang.String WARN_INVENTORY_VERB
public static final java.lang.String WARN_INVENTORY_ISBN_PHRASE
public static final java.lang.String WARN_INVENTORY_COST_PHRASE
public static final java.lang.String WARN_INVENTORY_TITLE_PHRASE
public static double SEARCH_SUCCESS
public static final java.lang.String SEARCH_PREPOSITION
public static final java.lang.String KEYWORD_PREPOSITION
public static final java.lang.String IDENT_PREPOSITION
public static final java.lang.String ISBN_PREPOSITION
public static final java.lang.String SHIPDEST_PREPOSITION
public static final java.lang.String SHIPCITY_PREPOSITION
public static final java.lang.String USERDETAIL_PREPOSITION
public static final java.lang.String ORDERDETAILS_PREPOSITION
public static final java.lang.String SHIPMETHOD_PREPOSITION
public static final java.lang.String CCINFO_PREPOSITION
public static final java.lang.String REVIEWTEXT_PREPOSITION
public static final java.lang.String PACKER_PREPOSITION
public static final double ISCOMPLETED
public static final java.lang.String GENERIC_WORKFLOW_PREPOSITION
public static final double ISNOTCOMPLETED
public static final double ISCANCELLED
public static final double ISNOTCANCELLED
public static final int COMPLETED_ASPECT
public static final int PACK_DATE_ASPECT
public static final int SHIP_DATE_ASPECT
public static final int DROP_SHIP_DATE_ASPECT
public static final int CANCELLED_ASPECT
public static final int FULL_LOAD_ASPECT
public static final int BOL_ASPECT_COUNT
public static final int CALENDAR_HORIZON_DAYS
| Constructor Detail |
public BolSocietyUtils()
| Method Detail |
public static double getPreferenceScore(org.cougaar.planning.ldm.plan.AllocationResult allocation,
org.cougaar.planning.ldm.plan.Preference preference)
allocation - The allocation result to be scoredpreference - The preference object that does the scoring.
public static java.util.Vector getAllPreferences(org.cougaar.planning.ldm.plan.Task task)
task - The task to pull the preference off of
public static java.lang.String currency(double value)
value - Number to convert
currency(String)public static java.lang.String currency(java.lang.String value)
value - String to convert
currency(double)public static java.lang.String[][] parseISBNPrepositions(java.lang.String prepositions)
prepositions - Preposition string from task
public static org.cougaar.planning.ldm.plan.Task createOrderTask(org.cougaar.planning.ldm.PlanningFactory pf,
java.util.Vector bo,
java.lang.String ccInfo,
UserDetails ud,
java.lang.String shipMethod,
java.lang.String verb)
pf - Factory object for creating cluster objectsbo - Vector of BolBookOrder objectsccInfo - Credit card dataud - Shipping address destinationshipMethod - User preferred method of shipmentverb - Verb to assign to this book order task
public static void setOrderPrepPhrases(org.cougaar.planning.ldm.plan.NewTask task,
java.util.Vector bo,
UserDetails ud,
java.lang.String ccInfo,
java.lang.String shipMethod,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
task - Book order task to load prep phrases ontobo - Vector of BolBookOrder objectsud - Shipping address destinationccInfo - Credit card datashipMethod - User preferred method of shipmenttheCOF - Factory object for creating cluster objects
public static void setOrderPreferences(org.cougaar.planning.ldm.plan.NewTask task,
java.util.Vector boVec,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
task - Book order task to load the preferences onboVec - Vector of BolBookOrder objectstheCOF - Factory object for creating cluster objects
public static org.cougaar.planning.ldm.plan.Task createUpdateReviewTask(org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF,
java.lang.String isbn,
java.lang.String review)
theCOF - Factory object for creating cluster objectsisbn - ID of item which has been newly reviewedreview - The text of the new review
public static void modifySearchPreferences(org.cougaar.planning.ldm.plan.Task task,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
task - whose preferences are to be modifiedtheCOF - from which to create preferences
public static void modifyOrderPreferences(org.cougaar.planning.ldm.plan.Task task,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
task - The task to receive the new preferencestheCOF - Factory object for creating cluster objects
public static double getAspectScore(org.cougaar.planning.ldm.plan.Task task,
int aspectType)
task - The task from which to get the aspect valueaspectType - The type number of the aspect to score
public static org.cougaar.planning.ldm.plan.AllocationResult doAllocationResultAggregation(org.cougaar.planning.ldm.plan.Workflow wf)
wf - The workflow of the expansion task to process
public static org.cougaar.planning.ldm.plan.AllocationResult createAllocationResult(org.cougaar.planning.ldm.PlanningFactory factory,
boolean success,
double rating,
int[] types,
double[] values)
factory - PlanningFactorysuccess - Result successrating - Confidence ratingtypes - Array of aspect typesvalues - Array of aspect values
public static org.cougaar.planning.ldm.plan.TaskScoreTable buildTSTfromWF(org.cougaar.planning.ldm.plan.Workflow wf)
wf - Description of any parameters goes here
public static org.cougaar.planning.ldm.plan.NewPrepositionalPhrase createPrepPhrase(java.lang.Object indirectObj,
java.lang.String preposition,
org.cougaar.planning.ldm.plan.ClusterObjectFactory theCOF)
indirectObj - The object to put into the new prepositional phrasepreposition - The keyword of this prepostiontheCOF - Factory object for creating cluster objects
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||