org.apache.hadoop.contrib.index.example
Class LineDocTextAndOp

java.lang.Object
  extended by org.apache.hadoop.contrib.index.example.LineDocTextAndOp
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class LineDocTextAndOp
extends Object
implements org.apache.hadoop.io.Writable

This class represents an operation. The operation can be an insert, a delete or an update. If the operation is an insert or an update, a (new) document, which is in the form of text, is specified.


Constructor Summary
LineDocTextAndOp()
          Constructor
 
Method Summary
 DocumentAndOp.Op getOp()
          Get the type of the operation.
 org.apache.hadoop.io.Text getText()
          Get the text that represents a document.
 void readFields(DataInput in)
           
 void setOp(DocumentAndOp.Op op)
          Set the type of the operation.
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineDocTextAndOp

public LineDocTextAndOp()
Constructor

Method Detail

setOp

public void setOp(DocumentAndOp.Op op)
Set the type of the operation.

Parameters:
op - the type of the operation

getOp

public DocumentAndOp.Op getOp()
Get the type of the operation.

Returns:
the type of the operation

getText

public org.apache.hadoop.io.Text getText()
Get the text that represents a document.

Returns:
the text that represents a document

toString

public String toString()
Overrides:
toString in class Object

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation