org.hops.og
Class FREEGen

java.lang.Object
  extended by org.hops.og.TalpGen
      extended by org.hops.og.FREEGen

public class FREEGen
extends TalpGen

This class builts a complex Object ResponseData containing the information that must be shown to the user. This is a subclass of TalpGen that concretely do not built a document, but only the list of sentences.

Version:
3.0
Author:
Meritxell Gonzalez
See Also:
ResponseData

Field Summary
 
Fields inherited from class org.hops.og.TalpGen
acro, city, logger, m_channelId, m_lang, m_messages, m_taxonomy
 
Constructor Summary
FREEGen()
          Creates a new instance of FreeGen
FREEGen(og_util.NLPParameters param, HopsLang messages, AttributesTaxonomy taxonomy)
          Creates a new instance of FreeGen.
 
Method Summary
protected  ResponseData genErrorResponse(java.lang.String message)
          Generation of error pages.
protected  ResponseData genLanguageSelectorResponse()
          Generation of language selector page.
protected  ResponseData genMessageResponse(stackact next_moves)
          Generation of End pages This is the way for generating an ending page with a message
protected  ResponseData genQueryResponse(stackact next_moves)
          Generation of simple pages.
protected  ResponseData genResultsListResponse(stackact next_moves)
          Generation of list-of-things page This is the way for matching a general not ending page with a list-of-results The next_moves stach containg a pagination action.
protected  void matchPrompts(java.lang.String attr_name, stackact next_moves, ResponseData rd)
          generate the prompts save them in the ResponseData
 
Methods inherited from class org.hops.og.TalpGen
extractPageType, genResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FREEGen

public FREEGen()
Creates a new instance of FreeGen


FREEGen

public FREEGen(og_util.NLPParameters param,
               HopsLang messages,
               AttributesTaxonomy taxonomy)
Creates a new instance of FreeGen.

Parameters:
param - the parameters
messages - the Language Generator
taxonomy - the attributes information
Method Detail

genMessageResponse

protected ResponseData genMessageResponse(stackact next_moves)
Generation of End pages This is the way for generating an ending page with a message

Overrides:
genMessageResponse in class TalpGen
Parameters:
next_moves - the stack of moves to generate
Returns:
a ResponseData containing the txml the document

genQueryResponse

protected ResponseData genQueryResponse(stackact next_moves)
Generation of simple pages. Search for the main attribute and call the matchPrompts function.

Overrides:
genQueryResponse in class TalpGen
Parameters:
next_moves - moves to generate
Returns:
ResponseData containing the txml document

genErrorResponse

protected ResponseData genErrorResponse(java.lang.String message)
Generation of error pages. Copies the message to the ResponsesData object

Overrides:
genErrorResponse in class TalpGen
Parameters:
message - the error message
Returns:
the ResponseData containing the txml page

genResultsListResponse

protected ResponseData genResultsListResponse(stackact next_moves)
Generation of list-of-things page This is the way for matching a general not ending page with a list-of-results The next_moves stach containg a pagination action.

Overrides:
genResultsListResponse in class TalpGen
Parameters:
next_moves - moves to generate
Returns:
ResponseData containing the messages with the

genLanguageSelectorResponse

protected ResponseData genLanguageSelectorResponse()
Generation of language selector page. If the subclass cannot create the document, an empty page is created.

Overrides:
genLanguageSelectorResponse in class TalpGen
Returns:
the ResponseData containing the sentences for asking the language

matchPrompts

protected void matchPrompts(java.lang.String attr_name,
                            stackact next_moves,
                            ResponseData rd)
generate the prompts save them in the ResponseData

Parameters:
attr_name - the main attribute used for help message
next_moves - the moves to generate
rd - the RespondeData object that is updated