|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpaceTimeDataAdapter
SpaceTimeDataAdapter provides a thin abstraction to query and allows to manipulate the space-time world state. Data loaded from XML is stored in a tree structure of SpaceTimeNodes according to Space Time objects hierarchy (like room hierarchy). Lookup and modification methods are provided
Method Summary | |
---|---|
void |
AddEventListener(EventListener listener)
Binds a new EventListener to the adapter |
void |
AddGlobalChangeListener(ChangeListener listener)
Binds a new ChangeListener to the adapter |
void |
ApplyDefaultRulesToAllEvents()
Applies the default rules to all events for which the rules are allowed. |
void |
ApplyDefaultRulesToAllNodes()
Applies the default rules to all nodes (both events and rooms) for which the rules are allowed. |
void |
ApplyDefaultRulesToAllRooms()
Applies the default rules to all rooms for which the rules are allowed. |
void |
ApplyDefaultRulesToNode(SpaceTimeNode node)
Applies the default rules the node if the rules are allowed for this node. |
SpaceTimeEdge |
CreateEdge(java.lang.String target,
java.lang.String edgeType)
Creates new edge object at the server side, edge is not associated with Object node |
SpaceTimeNode |
CreateNode(java.lang.String xml)
Creates a node from an xml string and adds it to the data adapter. |
SpaceTimeProperty |
CreateProperty(java.lang.String propertyType)
Creates new propery object on the server side |
void |
FlushScores()
Clears the scores for all nodes |
java.lang.String |
GetAssociatedPropertyName(java.lang.String propertyName)
Returns associated propery name |
java.lang.String |
GetAssociatedWeightName(java.lang.String propertyName)
Returns associated weight name |
float |
GetGlobalScore()
Global score |
DMArrayList |
GetLeafNodesById(java.lang.String id)
Return only the most derrived nodes from the id specified. |
SpaceTimeNode |
GetNodeById(java.lang.String id)
Get the node that matches id |
java.lang.String |
GetNodeXml(java.lang.String nodeId)
Produces an xml fragment that represents the node reference provided. |
java.lang.String |
GetOptimizationHint()
Current optimization hint string |
OrdersManager |
GetOrdersManager()
Orders manager |
Parameters |
GetParameters()
Returns the object with parameters from params.txt file |
DMArrayList |
GetPeople()
Gets all people |
SpaceTimeProperty |
GetProperty(SpaceTimeNode node,
java.lang.String propertyType)
Gets the deepest property with the name propertyType defined in the tree. |
java.lang.String |
GetPropertyAssociationType(java.lang.String requestPref)
Returns the association type of the provided property |
DMArrayList |
GetRequests()
Gets all requests |
DMArrayList |
GetRooms()
Gets all rooms |
long |
GetScenarioDuration()
Scenario duration |
long |
GetScenarioStart()
Scenario start in unix time format |
long |
GetScenarioStop()
Scenario stop in unix time format |
VendorsManager |
GetVendorsManager()
Vendors manager |
boolean |
IsOptRecommended()
Optimization is recommended flag |
void |
IsOptRecommended(boolean value)
|
boolean |
IsPropertyAssociated(java.lang.String propertyName)
Checks if property is associated |
void |
LoadEventDefaultRules(java.lang.String filename)
Loads the set of default rules for events from the specified file or URL. |
void |
LoadRoomDefaultRules(java.lang.String filename)
Loads the set of default rules for rooms from the specified file or URL. |
void |
MergeAssignments(DMArrayList assignments)
Merge a list of assignments with the current worldstate. |
void |
MergeOptimizationResults(DMArrayList assignments,
double score)
Merge optimizer output with the current worldstate. |
void |
NotifyElicitationDone(java.lang.String url)
Generates "notification done" event and notifies event listeners |
void |
NotifyEndOfBatchLearning()
Generates "end of batch learning" event and notifies event listeners |
void |
NotifyEndOfWargames()
Generates "end of wargames" event and notifies event listeners |
void |
NotifyNodeChange(SpaceTimeNode node)
This should only be called by SpaceTimeNode |
void |
NotifyOptimizationDone()
Generates "optimization done" event and notifies event listeners |
void |
NotifySchedulePublished(java.lang.String url)
Generates "shedule published" event and notifies event listeners |
void |
NotifyVendorElicitorDone(java.lang.String url)
Generates "vendor elicitor done" event and notifies event listeners |
void |
NotifyVendorOptimizerDone(java.lang.String url)
Generates "vendor optimizer done" event and notifies event listeners |
void |
RemoveEventListener(EventListener listener)
Unbinds EventListener from the adapter |
void |
RemoveGlobalChangeListener(ChangeListener listener)
Unbinds ChangeListener from the adapter |
void |
Save(java.lang.String filename)
Save object model to xml |
java.lang.String |
SaveAsString(boolean fixAssigned,
boolean fixUnassigned)
Produces XML string for current worldstate |
void |
SaveInheritedStpToFile(java.lang.String filename,
boolean fixAssigned,
boolean fixUnassigned)
Save object model to xml propagating inherited properties, optionally fixing allocations |
void |
SaveToFile(java.lang.String filename,
boolean fixAssigned,
boolean fixUnassigned)
Save object model to xml, optionally fixing allocations |
void |
Unbind()
Fully flush all node events and bindings |
void |
UpdateScore()
Envokes the optimizer to get event scores |
boolean |
VendorOrdersInitialized()
Vendor orders initilization check |
Method Detail |
---|
Parameters GetParameters()
boolean VendorOrdersInitialized()
VendorsManager GetVendorsManager()
OrdersManager GetOrdersManager()
SpaceTimeEdge CreateEdge(java.lang.String target, java.lang.String edgeType)
SpaceTimeProperty CreateProperty(java.lang.String propertyType)
void AddGlobalChangeListener(ChangeListener listener)
void RemoveGlobalChangeListener(ChangeListener listener)
void AddEventListener(EventListener listener)
void RemoveEventListener(EventListener listener)
void Unbind()
void NotifyNodeChange(SpaceTimeNode node)
void NotifyElicitationDone(java.lang.String url)
void NotifyVendorOptimizerDone(java.lang.String url)
void NotifyVendorElicitorDone(java.lang.String url)
void NotifySchedulePublished(java.lang.String url)
void NotifyOptimizationDone()
void NotifyEndOfWargames()
void NotifyEndOfBatchLearning()
long GetScenarioStart()
long GetScenarioDuration()
long GetScenarioStop()
float GetGlobalScore()
void UpdateScore()
DMArrayList GetRooms()
DMArrayList GetPeople()
DMArrayList GetRequests()
DMArrayList GetLeafNodesById(java.lang.String id)
SpaceTimeNode GetNodeById(java.lang.String id)
SpaceTimeProperty GetProperty(SpaceTimeNode node, java.lang.String propertyType)
java.lang.String GetPropertyAssociationType(java.lang.String requestPref)
java.lang.String GetAssociatedWeightName(java.lang.String propertyName)
java.lang.String GetAssociatedPropertyName(java.lang.String propertyName)
boolean IsPropertyAssociated(java.lang.String propertyName)
void FlushScores()
void LoadRoomDefaultRules(java.lang.String filename)
void LoadEventDefaultRules(java.lang.String filename)
void ApplyDefaultRulesToAllNodes()
void ApplyDefaultRulesToAllRooms()
void ApplyDefaultRulesToAllEvents()
void ApplyDefaultRulesToNode(SpaceTimeNode node)
java.lang.String GetOptimizationHint()
void MergeOptimizationResults(DMArrayList assignments, double score)
void MergeAssignments(DMArrayList assignments)
SpaceTimeNode CreateNode(java.lang.String xml)
void Save(java.lang.String filename)
void SaveToFile(java.lang.String filename, boolean fixAssigned, boolean fixUnassigned)
void SaveInheritedStpToFile(java.lang.String filename, boolean fixAssigned, boolean fixUnassigned)
java.lang.String SaveAsString(boolean fixAssigned, boolean fixUnassigned)
java.lang.String GetNodeXml(java.lang.String nodeId)
boolean IsOptRecommended()
void IsOptRecommended(boolean value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |