Package cmion.storage
Class WorldModel
java.lang.Object
ion.Meta.Element
cmion.architecture.CmionComponent
cmion.storage.CmionStorageContainer
cmion.storage.WorldModel
a specific subclass of cmion storage container with convenience methods added
for handling "agent" and "object" sub containers.
-
Field Summary
FieldsFields inherited from class cmion.storage.CmionStorageContainer
persistentPropertiesFields inherited from class cmion.architecture.CmionComponent
architecture -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturns the agent storage container with the specified name or null if it does not exist in this world modelreturns a list of the names of all agentsreturns the object storage container with the specified name or null if it does not exist in this world modelreturns a list of the names of all objectsbooleanreturns whether the world model has an agent of the specified namebooleanreturns whether the world model has an object of the specified namevoidloadInitFile(String initFile) Load the initial contents for the world model from the specified fileprotected InputStreamopenInitFile(String initFileName) voidrequestAddAgent(String name) request adding an agent to the world modelvoidrequestAddAgent(String name, HashMap<String, Object> initialProperties) request adding an agent to the world modelvoidrequestAddAgent(String name, HashMap<String, Object> initialProperties, HashSet<String> persistentProperties) request adding an agent to the world modelvoidrequestAddObject(String name) request adding an object to the world modelvoidrequestAddObject(String name, HashMap<String, Object> initialProperties) request adding an object to the world modelvoidrequestAddObject(String name, HashMap<String, Object> initialProperties, HashSet<String> persistentProperties) request adding an object to the world modelvoidrequestRemoveAgent(String name) request removing an agent from the world modelvoidrequestRemoveObject(String name) request removing an object from the world modelMethods inherited from class cmion.storage.CmionStorageContainer
getContainerName, getContainerType, getParentContainer, getPropertyNames, getPropertyNames, getPropertyValue, getSubContainer, getSubContainerNames, getSubContainerNames, getTopContainer, hasProperty, hasProperty, hasSubContainer, hasSubContainer, isPropertyPersistent, registerEventHandlerWithSubContainers, registerHandlers, requestAddSubContainer, requestAddSubContainer, requestAddSubContainer, requestRemoveProperty, requestRemoveSubContainer, requestSetProperty, requestSetProperty, toStringMethods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raiseMethods inherited from class ion.Meta.Element
destroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, schedule, wasDestroyed
-
Field Details
-
AGENT_TYPE_NAME
-
OBJECT_TYPE_NAME
-
-
Constructor Details
-
WorldModel
-
-
Method Details
-
requestAddAgent
request adding an agent to the world model -
requestAddAgent
request adding an agent to the world model -
requestAddAgent
public void requestAddAgent(String name, HashMap<String, Object> initialProperties, HashSet<String> persistentProperties) request adding an agent to the world model -
requestRemoveAgent
request removing an agent from the world model -
requestAddObject
request adding an object to the world model -
requestAddObject
request adding an object to the world model -
requestAddObject
public void requestAddObject(String name, HashMap<String, Object> initialProperties, HashSet<String> persistentProperties) request adding an object to the world model -
requestRemoveObject
request removing an object from the world model -
hasAgent
returns whether the world model has an agent of the specified name -
hasObject
returns whether the world model has an object of the specified name -
getAgentNames
returns a list of the names of all agents -
getObjectNames
returns a list of the names of all objects -
getAgent
returns the agent storage container with the specified name or null if it does not exist in this world model -
getObject
returns the object storage container with the specified name or null if it does not exist in this world model -
openInitFile
- Throws:
Exception
-
loadInitFile
Load the initial contents for the world model from the specified file- Throws:
Exception
-