vs.plotagent
Class BasicInspirationModule

java.lang.Object
  extended by vs.plotagent.BasicInspirationModule
All Implemented Interfaces:
IAgentModule, IInspirationModule

public class BasicInspirationModule
extends java.lang.Object
implements IInspirationModule


Constructor Summary
BasicInspirationModule(IPlotAgent ownerAgent)
          Constructor
 
Method Summary
 void addUsedSuggestion(Suggestion s)
          Mark a suggestion as having been used (the module should decide whether that means not to use it again)
 java.util.Set<InspirationRule> generateRules(java.lang.String fabulaCaseURL)
          Generates a file containing the rules, generated from a fabula case
 IPlotAgent getAgent()
          To get the Agent
 java.util.Set<Suggestion> getSuggestions()
          Retrieves a set containing suggestions given the current state of the fabula
 void loadRules(java.lang.String filename)
          Deprecated. 
 java.util.Set<OperationalizedSuggestion> operationalizeSuggestions(java.util.Set<Suggestion> suggestions)
          Operationalizes given suggestions, meaning: make them ready for use.
 void writeRules(java.util.Set<InspirationRule> rules, java.lang.String ruleFileURL)
          Generates a file containing the given rules.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicInspirationModule

public BasicInspirationModule(IPlotAgent ownerAgent)
Constructor

Parameters:
ownerAgent - the agent owning this module
Method Detail

addUsedSuggestion

public void addUsedSuggestion(Suggestion s)
Description copied from interface: IInspirationModule
Mark a suggestion as having been used (the module should decide whether that means not to use it again)

Specified by:
addUsedSuggestion in interface IInspirationModule

generateRules

public java.util.Set<InspirationRule> generateRules(java.lang.String fabulaCaseURL)
Description copied from interface: IInspirationModule
Generates a file containing the rules, generated from a fabula case

Specified by:
generateRules in interface IInspirationModule
Parameters:
fabulaCaseURL - the input file containing the fabula
Returns:
the generated rules

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

getSuggestions

public java.util.Set<Suggestion> getSuggestions()
Description copied from interface: IInspirationModule
Retrieves a set containing suggestions given the current state of the fabula

Specified by:
getSuggestions in interface IInspirationModule
Returns:
the set of suggestions

loadRules

@Deprecated
public void loadRules(java.lang.String filename)
Deprecated. 

Description copied from interface: IInspirationModule
Loads a rule file into memory

Specified by:
loadRules in interface IInspirationModule
Parameters:
filename - the name of the rule file

operationalizeSuggestions

public java.util.Set<OperationalizedSuggestion> operationalizeSuggestions(java.util.Set<Suggestion> suggestions)
Description copied from interface: IInspirationModule
Operationalizes given suggestions, meaning: make them ready for use. Creates OperationalizedSuggestions that contain: - information about which fabula elements caused the fabula element of this suggestion - information about the type of the suggested fabula element - the vs.communication object representing the operationalized suggestion

Specified by:
operationalizeSuggestions in interface IInspirationModule
Parameters:
suggestions - the suggestions to operationalize
Returns:
the operationalized suggestions

writeRules

public void writeRules(java.util.Set<InspirationRule> rules,
                       java.lang.String ruleFileURL)
Description copied from interface: IInspirationModule
Generates a file containing the given rules.

Specified by:
writeRules in interface IInspirationModule
Parameters:
rules - the rules to output
ruleFileURL - the output file containing the rules