hyspirit.engines
Class HyMDS2PRIEngine

java.lang.Object
  extended by hyspirit.engines.HyEngine
      extended by hyspirit.engines.HyMDS2PRIEngine
All Implemented Interfaces:
java.lang.Runnable

public class HyMDS2PRIEngine
extends HyEngine

This engine creates a probabilistic relational index (PRI) file from a multi-dimesional space (MDS) file. See hy_mds2pri manual for further details.

Author:
Ingo Frommholz

Created on 16-Jul-2006 17:46:10


Field Summary
 
Fields inherited from class hyspirit.engines.HyEngine
argumentString, LOG, stdin, TIME_PREFIX
 
Constructor Summary
HyMDS2PRIEngine()
          This constructor tries to determine the HySpirit environment automatically
HyMDS2PRIEngine(HySpiritProperties hyspirit)
          This constructor must be used if you are going to start your own engine process (client/server mode).
 
Method Summary
 void addColumn(int column)
          The columns for which the index should be created.
 void addColumn(java.lang.Integer column)
          The columns for which the index should be created.
 void addMDSFile(java.lang.String filename)
          Add a file to read the MDS data from.
protected  java.lang.String[] buildCommand()
          Builds the command from the parameters.
 void reset()
          Resets all parameters of the engine after destroying a possibly running process.
 void setOutputFile(java.lang.String outputFile)
          Sets the file name in which the PRI is stores (if not specified, it is stored in "a.pri")
static void useHy()
          Invoke this before you create a new HyMDS2PRIEngine object to use hy_mds2pri instead of hyp_mds2pri (this is the default)
static void useHyp()
          Invoke this before you create a new HyMDS2PRIEngine object to use hyp_mds2pri instead of hy_mds2pri
 
Methods inherited from class hyspirit.engines.HyEngine
closeSTDIN, destroy, echoSpecial, exitValue, getCommand, getEngineName, getInputReader, getOutputWriter, getPercentageCPU, getRealTime, getSTDERR, getSTDIN, getSTDOUT, getStreamEndMessage, getSysTime, getUserTime, hasNext, isInClientMode, isRunning, kb, kb, kb, next, readFromSTDIN, restart, run, send, send, sendAndReceive, sendFile, setArgumentString, setLogger, start, suppressSTDERR, takesTime, takeTime, waitFor, waitTillRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyMDS2PRIEngine

public HyMDS2PRIEngine()
                throws HySpiritException
This constructor tries to determine the HySpirit environment automatically

Throws:
HySpiritException - if the HySiprit envirnoment cannot be determined

HyMDS2PRIEngine

public HyMDS2PRIEngine(HySpiritProperties hyspirit)
                throws HySpiritException
This constructor must be used if you are going to start your own engine process (client/server mode).

Parameters:
hyspirit - the HySpirit properties containing the environment
Throws:
HySpiritException - if we can't determine the environment
Method Detail

useHyp

public static void useHyp()
Invoke this before you create a new HyMDS2PRIEngine object to use hyp_mds2pri instead of hy_mds2pri


useHy

public static void useHy()
Invoke this before you create a new HyMDS2PRIEngine object to use hy_mds2pri instead of hyp_mds2pri (this is the default)


reset

public void reset()
Resets all parameters of the engine after destroying a possibly running process. You have to restart the process with run().

Overrides:
reset in class HyEngine

addMDSFile

public void addMDSFile(java.lang.String filename)
Add a file to read the MDS data from.

Parameters:
filename - the name of the MDS file

addColumn

public void addColumn(int column)
The columns for which the index should be created. See hy_mds2pri manual for further details.

Parameters:
column - the column

addColumn

public void addColumn(java.lang.Integer column)
The columns for which the index should be created. See hy_mds2pri manual for further details.

Parameters:
column - the column

setOutputFile

public void setOutputFile(java.lang.String outputFile)
Sets the file name in which the PRI is stores (if not specified, it is stored in "a.pri")

Parameters:
outputFile - the name of the PRI output file

buildCommand

protected java.lang.String[] buildCommand()
Builds the command from the parameters.

Overrides:
buildCommand in class HyEngine
Returns:
the command string array