hyspirit.engines
Class HyMDS2FreqEngine

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

public class HyMDS2FreqEngine
extends HyAnalysisEngine

Author:
Ingo Frommholz

Created on 12-Feb-2006 01:07:06


Field Summary
 
Fields inherited from class hyspirit.engines.HyEngine
argumentString, LOG, stdin, TIME_PREFIX
 
Constructor Summary
HyMDS2FreqEngine()
          This constructor tries to determine the HySpirit environment automatically
HyMDS2FreqEngine(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)
          Adds a column forming the frequency key.
 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 countTuples()
          Count tuples.
 void countValues()
          Count values.
 void reset()
          Resets all parameters of the engine after destroying a possibly running process.
 void setAvg(boolean avg)
          Whether or not to print the average frequency.
 void setGroup(int group)
          Sets the group parameter.
 void setPriFile(java.lang.String priFile)
          Sets the pri file to process large input streams.
 void setProbabilistic(boolean probabilistic)
          Whether or not to take into account the tuple probabilities specified in the inut file.
 void setStream(boolean stream)
          Sets or unsets the -stream option.
 void windowSize(long windowSize)
          Sets the window size.
 
Methods inherited from class hyspirit.engines.HyAnalysisEngine
addFile, context, context, runAndWait
 
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

HyMDS2FreqEngine

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

Throws:
HySpiritException - if the HySiprit envirnoment cannot be determined

HyMDS2FreqEngine

public HyMDS2FreqEngine(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

addColumn

public void addColumn(int column)
Adds a column forming the frequency key. Note that the order of adding columns does matter. See hy_mds2freq manual for further details.

Parameters:
column - the column

countValues

public void countValues()
Count values. Sets the -values parameter. See hy_mds2freq manual for further details.


countTuples

public void countTuples()
Count tuples. Sets the -tuples parameter. See hy_mds2freq manual for further details.


setProbabilistic

public void setProbabilistic(boolean probabilistic)
Whether or not to take into account the tuple probabilities specified in the inut file. See hy_mds2freq manual for further details.

Parameters:
probabilistic -

setAvg

public void setAvg(boolean avg)
Whether or not to print the average frequency. See hy_mds2freq manual for further details.

Parameters:
avg -

setStream

public void setStream(boolean stream)
Sets or unsets the -stream option. See hy_mds2freq manual for further details.

Parameters:
stream - true if stream option should be set, false for nostream option

windowSize

public void windowSize(long windowSize)
Sets the window size. See hy_mds2freq manual for further details.

Parameters:
windowSize -

setPriFile

public void setPriFile(java.lang.String priFile)
Sets the pri file to process large input streams. See hy_mds2freq manual for further details.

Parameters:
priFile - the filename

setGroup

public void setGroup(int group)
Sets the group parameter. See hy_mds2freq manual for further details.

Parameters:
group - the value of the group parameter.

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

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

buildCommand

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

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