sg.edu.nus.comp.nlp.ims.io
Class CResultWriter

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.io.CResultWriter
All Implemented Interfaces:
IResultWriter
Direct Known Subclasses:
CFullResultWriter

public class CResultWriter
extends java.lang.Object
implements IResultWriter

save result to hard disk.

Author:
zhongzhi

Field Summary
protected  java.lang.String m_SaveDir
           
 
Constructor Summary
CResultWriter()
          default constructor
CResultWriter(java.lang.String p_SaveDir)
          constructor with save directory
 
Method Summary
protected  java.lang.String getFile(java.lang.String p_LexeltID)
          get the path to save lexelt
 void setOptions(java.lang.String[] p_Options)
          set options
 java.lang.String toString(java.lang.Object p_Result)
          convert result to string
 void write(java.lang.Object p_Result)
          write results
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_SaveDir

protected java.lang.String m_SaveDir
Constructor Detail

CResultWriter

public CResultWriter()
default constructor


CResultWriter

public CResultWriter(java.lang.String p_SaveDir)
constructor with save directory

Parameters:
p_SaveDir - save directory
Method Detail

write

public void write(java.lang.Object p_Result)
           throws java.io.IOException
Description copied from interface: IResultWriter
write results

Specified by:
write in interface IResultWriter
Parameters:
p_Result - result
Throws:
java.io.IOException - exception while saving result

setOptions

public void setOptions(java.lang.String[] p_Options)
Description copied from interface: IResultWriter
set options

Specified by:
setOptions in interface IResultWriter
Parameters:
p_Options - options

toString

public java.lang.String toString(java.lang.Object p_Result)
Description copied from interface: IResultWriter
convert result to string

Specified by:
toString in interface IResultWriter
Parameters:
p_Result - classification result
Returns:
string format

getFile

protected java.lang.String getFile(java.lang.String p_LexeltID)
get the path to save lexelt

Parameters:
p_LexeltID - lexelt id
Returns:
path