org.hops.ext
Class dbdummy

java.lang.Object
  extended by org.hops.ext.dbdummy

public class dbdummy
extends java.lang.Object

simulates data base results without user intervention


Constructor Summary
dbdummy()
           
 
Method Summary
static attrval consultDB(attrval q, boolean userData, loc_db simdb, stackp commitments, stackp believes)
          Consults the database.
static stackp queryDBDummy(attrval q, boolean userData, java.util.HashMap focusvalues, java.util.ArrayList requestedData, ca_db simdb, PlanSet plans, java.lang.Object logger)
          Simulates the DB query
static stackp toStack(java.lang.String queryname, BackEndResult ber, PlanSet plans)
          This functions converts a HopsAttribute array to stack of attrval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

dbdummy

public dbdummy()
Method Detail

consultDB

public static attrval consultDB(attrval q,
                                boolean userData,
                                loc_db simdb,
                                stackp commitments,
                                stackp believes)
Consults the database. It is expected to receive a value for the input attribute. This attribute must be then answered to the user in the next interaction.

Parameters:
q - the attribute we are searching
userData - true if the user inserts the data, false if default system data
Returns:
the q attribute with its value

queryDBDummy

public static stackp queryDBDummy(attrval q,
                                  boolean userData,
                                  java.util.HashMap focusvalues,
                                  java.util.ArrayList requestedData,
                                  ca_db simdb,
                                  PlanSet plans,
                                  java.lang.Object logger)
Simulates the DB query

Parameters:
q - the exequery name
Returns:
the stack of results

toStack

public static stackp toStack(java.lang.String queryname,
                             BackEndResult ber,
                             PlanSet plans)
This functions converts a HopsAttribute array to stack of attrval. In case of the SearchEvent, to stack of one attrval with an arraylist with all the results!!! This is an attrval named event, with an extension of "pag", and instead of having a list of values, it has a list of results. Its value is the number of attrval in the results. This list of results is a list of attrval where each attrval is an event. Each event name is the exequery name, and has a list of result. Each result is an attrval with a property of the event: participant, title, location, etc...

Parameters:
queryname - the name of BE query
ber - the BackEndResults of HopsAttributes
Returns:
the stack of attributes