eu.semaine.components.dialogue.actionproposers
Class ContextTemplate

java.lang.Object
  extended by eu.semaine.components.dialogue.actionproposers.ContextTemplate

public class ContextTemplate
extends java.lang.Object

This class serves as a container for conversation model elements. It includes a response and a list of all required and all optional features that are linked to this response.

Version:
0.1 - dummy class
Author:
Mark tM

Field Summary
static int ABOUT_CURRENT_CHARACTER
           
static int ABOUT_OTHER_CHARACTER
           
static int ABOUT_OTHER_PEOPLE
           
static int ABOUT_OWN_FEELINGS
           
static int AGREE
           
static int ANGRY
           
static int DISAGREE
           
static int FUTURE_ACTION
           
static int FUTURE_EVENT
           
static int HAPPY
           
static int LAUGH
           
static int NEGATIVE
           
static int OBADIAH
           
static int PAST_ACTION
           
static int PAST_EVENT
           
static int POPPY
           
static int POSITIVE
           
static int PRAGMATIC
           
static int PRUDENCE
           
static int SAD
           
static int SPIKE
           
static int TALK_ABOUT_SELF
           
 
Constructor Summary
ContextTemplate(java.lang.String reaction)
          Creates a new ContextTemplate with the given reaction
 
Method Summary
 void addExtraFeature(int feature)
          Adds an optional feature to this template
 void addRequiredFeature(int feature)
          Adds a required feature to this template
 boolean equals(ContextTemplate template)
          Overrides the Object-equals method to compare to ContextTemplates with each other
 java.lang.String feature2String(java.lang.Integer i)
          Returns a String representation of the given feature-integer
 java.util.ArrayList<java.lang.Integer> getExtraFeatures()
           
 java.lang.String getReaction()
           
 java.util.ArrayList<java.lang.Integer> getRequiredFeatures()
           
 void setNewReaction(java.lang.String reaction)
          Sets a new response
 java.lang.String toString()
          Creates a String representation of this template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POPPY

public static final int POPPY
See Also:
Constant Field Values

OBADIAH

public static final int OBADIAH
See Also:
Constant Field Values

PRUDENCE

public static final int PRUDENCE
See Also:
Constant Field Values

SPIKE

public static final int SPIKE
See Also:
Constant Field Values

HAPPY

public static final int HAPPY
See Also:
Constant Field Values

SAD

public static final int SAD
See Also:
Constant Field Values

ANGRY

public static final int ANGRY
See Also:
Constant Field Values

POSITIVE

public static final int POSITIVE
See Also:
Constant Field Values

NEGATIVE

public static final int NEGATIVE
See Also:
Constant Field Values

AGREE

public static final int AGREE
See Also:
Constant Field Values

DISAGREE

public static final int DISAGREE
See Also:
Constant Field Values

ABOUT_OTHER_PEOPLE

public static final int ABOUT_OTHER_PEOPLE
See Also:
Constant Field Values

ABOUT_OTHER_CHARACTER

public static final int ABOUT_OTHER_CHARACTER
See Also:
Constant Field Values

ABOUT_CURRENT_CHARACTER

public static final int ABOUT_CURRENT_CHARACTER
See Also:
Constant Field Values

ABOUT_OWN_FEELINGS

public static final int ABOUT_OWN_FEELINGS
See Also:
Constant Field Values

PRAGMATIC

public static final int PRAGMATIC
See Also:
Constant Field Values

TALK_ABOUT_SELF

public static final int TALK_ABOUT_SELF
See Also:
Constant Field Values

PAST_EVENT

public static final int PAST_EVENT
See Also:
Constant Field Values

FUTURE_EVENT

public static final int FUTURE_EVENT
See Also:
Constant Field Values

PAST_ACTION

public static final int PAST_ACTION
See Also:
Constant Field Values

FUTURE_ACTION

public static final int FUTURE_ACTION
See Also:
Constant Field Values

LAUGH

public static final int LAUGH
See Also:
Constant Field Values
Constructor Detail

ContextTemplate

public ContextTemplate(java.lang.String reaction)
Creates a new ContextTemplate with the given reaction

Parameters:
reaction -
Method Detail

addRequiredFeature

public void addRequiredFeature(int feature)
Adds a required feature to this template

Parameters:
feature -

addExtraFeature

public void addExtraFeature(int feature)
Adds an optional feature to this template

Parameters:
feature -

getReaction

public java.lang.String getReaction()
Returns:
the reaction of this template

getRequiredFeatures

public java.util.ArrayList<java.lang.Integer> getRequiredFeatures()
Returns:
the required features of this template

getExtraFeatures

public java.util.ArrayList<java.lang.Integer> getExtraFeatures()
Returns:
the optional features of this template

setNewReaction

public void setNewReaction(java.lang.String reaction)
Sets a new response

Parameters:
reaction -

toString

public java.lang.String toString()
Creates a String representation of this template

Overrides:
toString in class java.lang.Object

equals

public boolean equals(ContextTemplate template)
Overrides the Object-equals method to compare to ContextTemplates with each other

Parameters:
template -
Returns:

feature2String

public java.lang.String feature2String(java.lang.Integer i)
Returns a String representation of the given feature-integer

Parameters:
i -
Returns: