vs.plotagent
Class BasicCharacterManager

java.lang.Object
  extended by vs.plotagent.BasicCharacterManager
All Implemented Interfaces:
IAgentModule, ICharacterManager

public class BasicCharacterManager
extends java.lang.Object
implements ICharacterManager

Author:
swartjes

Nested Class Summary
static class BasicCharacterManager.Status
           
 
Field Summary
static int MAX_CHAR_AGENTS
           
 
Constructor Summary
BasicCharacterManager(IPlotAgent owner)
           
 
Method Summary
 void addCharacterAgent(jade.core.AID character)
          Adds a character agent to the list of available characters
 void addSettingChange(java.util.Collection<RDFtriple> triples)
          TODO: accept StorySettingElements rather than RDFtriples.
 void addSettingChange(RDFtriple triple)
          TODO: accept StorySettingElements rather than RDFtriples.
 void addWantedCharacter(java.lang.String characterURI)
          Registers that given character URI is necessary to cast. castCharacter uses this information to decide what name to give a character.
 void castCharacter(jade.core.AID agent, java.lang.String characterURI)
          This is executed under the assumption that the character AID is already committed to character URI.
 IPlotAgent getAgent()
          To get the Agent
 jade.core.AID getAgentForStoryWorldRepresentation(java.lang.String characterURI)
          The inverse: retrieves the agent ID for a character's personality in the story, i.e. which agent 'controls' it.
 java.util.Set<jade.core.AID> getAvailableCharacters()
          Retrieves all characters that are available to play a role
 java.util.Set<jade.core.AID> getCastedCharacters()
          Retrieves all characters that are casted to play a role in the story
 java.util.Set<jade.core.AID> getCharacters()
          Retrieves all characters the character manager knows of
 java.lang.String getStoryWorldRepresentationForAgent(jade.core.AID agent)
          Retrieves the name of the character's personality in the story (i.e., how they are 'casted')
 void removeCharacterAgent(jade.core.AID character)
          Removes a character agent from the list of available characters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CHAR_AGENTS

public static int MAX_CHAR_AGENTS
Constructor Detail

BasicCharacterManager

public BasicCharacterManager(IPlotAgent owner)
Method Detail

addCharacterAgent

public void addCharacterAgent(jade.core.AID character)
Description copied from interface: ICharacterManager
Adds a character agent to the list of available characters

Specified by:
addCharacterAgent in interface ICharacterManager
Parameters:
character - the AID of an available character to add

addSettingChange

public void addSettingChange(java.util.Collection<RDFtriple> triples)
TODO: accept StorySettingElements rather than RDFtriples. (ivo)

Specified by:
addSettingChange in interface ICharacterManager
Parameters:
triples - the setting triples

addSettingChange

public void addSettingChange(RDFtriple triple)
TODO: accept StorySettingElements rather than RDFtriples. (ivo)

Specified by:
addSettingChange in interface ICharacterManager
Parameters:
triple - the setting triple

addWantedCharacter

public void addWantedCharacter(java.lang.String characterURI)
Description copied from interface: ICharacterManager
Registers that given character URI is necessary to cast. castCharacter uses this information to decide what name to give a character.

Specified by:
addWantedCharacter in interface ICharacterManager
Parameters:
characterURI - the URI of the character in the story world that we need a character agent for

castCharacter

public void castCharacter(jade.core.AID agent,
                          java.lang.String characterURI)
This is executed under the assumption that the character AID is already committed to character URI.

Specified by:
castCharacter in interface ICharacterManager
Parameters:
agent - the AID of the CharacterAgent we are casting
characterURI - the URI of the character in the story.

getAgent

public IPlotAgent getAgent()
Description copied from interface: IAgentModule
To get the Agent

Specified by:
getAgent in interface IAgentModule
Returns:
an Agent that owns this module

getAgentForStoryWorldRepresentation

public jade.core.AID getAgentForStoryWorldRepresentation(java.lang.String characterURI)
Description copied from interface: ICharacterManager
The inverse: retrieves the agent ID for a character's personality in the story, i.e. which agent 'controls' it.

Specified by:
getAgentForStoryWorldRepresentation in interface ICharacterManager
Parameters:
characterURI - the URI of the casted agent in the story
Returns:
the AID of the character agent playing that character URI in the story

getAvailableCharacters

public java.util.Set<jade.core.AID> getAvailableCharacters()
Description copied from interface: ICharacterManager
Retrieves all characters that are available to play a role

Specified by:
getAvailableCharacters in interface ICharacterManager
Returns:
a list of character AIDs

getCastedCharacters

public java.util.Set<jade.core.AID> getCastedCharacters()
Description copied from interface: ICharacterManager
Retrieves all characters that are casted to play a role in the story

Specified by:
getCastedCharacters in interface ICharacterManager
Returns:
a list of character AIDs

getCharacters

public java.util.Set<jade.core.AID> getCharacters()
Description copied from interface: ICharacterManager
Retrieves all characters the character manager knows of

Specified by:
getCharacters in interface ICharacterManager
Returns:
a set of character AIDs

getStoryWorldRepresentationForAgent

public java.lang.String getStoryWorldRepresentationForAgent(jade.core.AID agent)
Description copied from interface: ICharacterManager
Retrieves the name of the character's personality in the story (i.e., how they are 'casted')

Specified by:
getStoryWorldRepresentationForAgent in interface ICharacterManager
Parameters:
agent - the AID of the casted agent
Returns:
the URI of the character in the story world representation

removeCharacterAgent

public void removeCharacterAgent(jade.core.AID character)
Description copied from interface: ICharacterManager
Removes a character agent from the list of available characters

Specified by:
removeCharacterAgent in interface ICharacterManager
Parameters:
character - the AID of an available character to remove