[TOC]
org.apache.nutch.indexer
Class NutchField
- java.lang.Object
- org.apache.nutch.indexer.NutchField
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class NutchField extends Object implements org.apache.hadoop.io.Writable
This class represents a multi-valued field with a weight. Values are arbitrary objects.
Constructor Summary
Constructors Constructor and Description NutchField()
NutchField(Object value)
NutchField(Object value,
float weight)
Method Summary
Methods Modifier and Type Method and Description void
add(Object value)
Object
clone()
List
getValues()
float
getWeight()
void
readFields(DataInput in)
void
reset()
void
setWeight(float weight)
String
toString()
void
write(DataOutput out)
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
-
NutchField
public NutchField()
-
NutchField
public NutchField(Object value)
-
NutchField
public NutchField(Object value, float weight)
Method Detail
-
add
public void add(Object value)
-
getWeight
public float getWeight()
-
setWeight
public void setWeight(float weight)
-
getValues
public List<Object> getValues()
-
reset
public void reset()
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
- <code>clone</code> in class <code>Object</code>
- Throws:
- <code>CloneNotSupportedException</code>
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
- <code>readFields</code> in interface <code>org.apache.hadoop.io.Writable</code>
- Throws:
- <code>IOException</code>
-
write
public void write(DataOutput out) throws IOException
- Specified by:
- <code>write</code> in interface <code>org.apache.hadoop.io.Writable</code>
- Throws:
- <code>IOException</code>
-
toString
public String toString()
- Overrides:
- <code>toString</code> in class <code>Object</code>