org.hops.dm.app
Class HopsDM

java.lang.Object
  extended by org.hops.dm.app.HopsDM
All Implemented Interfaces:
java.io.Serializable

public class HopsDM
extends java.lang.Object
implements java.io.Serializable

Maintains the User Information State and process each interaction

Version:
3.0
Author:
Meritxell Gonzalez
See Also:
Serialized Form

Constructor Summary
HopsDM(og_util.NLPParameters param, java.lang.String _channelId, java.lang.String _planfile, java.lang.String _dependfile, java.lang.String _paramvaluesfile, dbcall _dbase, java.lang.String _dbfile)
          Creates a new instance of HopsDM with real OG
HopsDM(java.lang.String _planfile, java.lang.String _dependfile, java.lang.String _paramvaluesfile)
          Creates a new instance of HopsDM for DM test and DMParser test
HopsDM(java.lang.String _channelId, java.lang.String _planfile, java.lang.String _dependfile, java.lang.String _paramvaluesfile, ogcall ogcall_remoteOG, dbcall _dbase, java.lang.String _dbfile)
          Creates a new instance of HopsDM with Remote BE and Real OG
 
Method Summary
 void actualize_counters()
          actualitza els contadors sense tornar a processar la resposta de l'usuari.
 java.lang.String currentService()
          returns the serviceid currently loaded
 ResponseData Get_ResponseData()
          returns the last xml document created
 java.lang.String getCurrentPlanName()
          gets the user language
 java.lang.String getIS()
          returns the Information State String
 java.lang.String getLang()
          gets the user language
 ResponseData getLanguageSelectorPage(UserModel um)
          returns an special xml document that allows the user to choose the system language
 PlanSet getPlans()
           
 statisticsData getStatistics()
          Returns the statistics object
 ResponseData init()
          init() This function initializes a new dialogue.
 ResponseData init(UserModel _um)
           
 void loadStatistics(java.lang.String pathfile)
          Returns the statistics object
 ResponseData process(utterance usr_ut, UserModel um)
          process() The dialogue core process the user utterance interpretation.
 sys_state program_state()
          returns the system state: run or stop
 void setLang(java.lang.String _langId, java.lang.String langAttrName)
          sets the user language
 boolean task_covered_once()
          returns the system task covered: true or false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HopsDM

public HopsDM(java.lang.String _planfile,
              java.lang.String _dependfile,
              java.lang.String _paramvaluesfile)
Creates a new instance of HopsDM for DM test and DMParser test

Parameters:
_planfile - the pDM plans file
_dependfile - the DM dependents file
_paramvaluesfile - the parameters allowed values file

HopsDM

public HopsDM(og_util.NLPParameters param,
              java.lang.String _channelId,
              java.lang.String _planfile,
              java.lang.String _dependfile,
              java.lang.String _paramvaluesfile,
              dbcall _dbase,
              java.lang.String _dbfile)
Creates a new instance of HopsDM with real OG

Parameters:
param - the OG parameters
_channelId - the channel identification
_planfile - the DM plan file
_dependfile - the DM dependents file
_paramvaluesfile - the parameters allowed values file

HopsDM

public HopsDM(java.lang.String _channelId,
              java.lang.String _planfile,
              java.lang.String _dependfile,
              java.lang.String _paramvaluesfile,
              ogcall ogcall_remoteOG,
              dbcall _dbase,
              java.lang.String _dbfile)
Creates a new instance of HopsDM with Remote BE and Real OG

Method Detail

program_state

public sys_state program_state()
returns the system state: run or stop


currentService

public java.lang.String currentService()
returns the serviceid currently loaded


task_covered_once

public boolean task_covered_once()
returns the system task covered: true or false


Get_ResponseData

public ResponseData Get_ResponseData()
returns the last xml document created


setLang

public void setLang(java.lang.String _langId,
                    java.lang.String langAttrName)
sets the user language


getLang

public java.lang.String getLang()
gets the user language


getCurrentPlanName

public java.lang.String getCurrentPlanName()
gets the user language


getPlans

public PlanSet getPlans()
Returns:
the plans loaded

getLanguageSelectorPage

public ResponseData getLanguageSelectorPage(UserModel um)
returns an special xml document that allows the user to choose the system language


getIS

public java.lang.String getIS()
returns the Information State String


getStatistics

public statisticsData getStatistics()
Returns the statistics object


loadStatistics

public void loadStatistics(java.lang.String pathfile)
Returns the statistics object


init

public ResponseData init()
init() This function initializes a new dialogue. It is supposes that the langId and serviceId is already set!

Returns:
new xml document

init

public ResponseData init(UserModel _um)

process

public ResponseData process(utterance usr_ut,
                            UserModel um)
process() The dialogue core process the user utterance interpretation. Creates new system moves The system moves generates a new xml document The dialogue core is also updated with the system moves

Parameters:
usr_ut - the user interpreted utterance
Returns:
new xml document

actualize_counters

public void actualize_counters()
actualitza els contadors sense tornar a processar la resposta de l'usuari. Quan la interpretació de l'usuari falla i el fron-end disposa de missatges alternatius