com.kpro.ui
Class UserIO_Simple

java.lang.Object
  extended by com.kpro.ui.UserIO
      extended by com.kpro.ui.UserIO_Simple

public class UserIO_Simple
extends UserIO

This is a very simple commandline version of a user interface. It doesn't permit user configuration (of running options), it has a ugly database display, but it works.

Author:
ngerstle, ulfnore

Constructor Summary
UserIO_Simple()
           
 
Method Summary
 void closeResources()
          nothing to close
 java.util.ArrayList<PolicyObject> loadHistory()
          does nothing
private  java.lang.String parseAcceptedToString(boolean accepted)
          converts a boolean to an 'accept'/'reject' suggestion.
 void showDatabase(PolicyDatabase pdb)
          does nothing
 void user_init(java.util.Properties genProps)
          This user interface doesn't actually let the user reconfigure anything.
 PolicyObject userResponse(PolicyObject n)
          A super simple, static user display of the result on command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserIO_Simple

public UserIO_Simple()
Method Detail

showDatabase

public void showDatabase(PolicyDatabase pdb)
does nothing

Specified by:
showDatabase in class UserIO
Parameters:
pdb - the database to display
See Also:
UserIO.showDatabase(PolicyDatabase)

loadHistory

public java.util.ArrayList<PolicyObject> loadHistory()
does nothing

Specified by:
loadHistory in class UserIO
Returns:
an arraylist of policy objects to be added to history prior to the CBR run.
See Also:
UserIO.loadHistory()

userResponse

public PolicyObject userResponse(PolicyObject n)
A super simple, static user display of the result on command line. does not wait for user response

Specified by:
userResponse in class UserIO
Parameters:
n - the policy display
Returns:
the policy given
See Also:
UserIO.userResponse(PolicyObject)

parseAcceptedToString

private java.lang.String parseAcceptedToString(boolean accepted)
converts a boolean to an 'accept'/'reject' suggestion.

Parameters:
accepted - true for result 'Accept', otherwise 'Reject'
Returns:
a string of 'Accept' or 'Reject'

closeResources

public void closeResources()
nothing to close

Specified by:
closeResources in class UserIO

user_init

public void user_init(java.util.Properties genProps)
This user interface doesn't actually let the user reconfigure anything. Would do so through the reference to Gio if necessary.

Specified by:
user_init in class UserIO
Parameters:
genProps - the default values for all commandline arguments