org.apache.nutch.parse
Class ParseImpl

java.lang.Object
  extended by org.apache.nutch.parse.ParseImpl
All Implemented Interfaces:
Configurable, Writable, Parse

public class ParseImpl
extends Object
implements Parse, Writable, Configurable

The result of parsing a page's raw content.

See Also:
Parser.getParse(Content)

Constructor Summary
ParseImpl()
           
ParseImpl(Parse parse)
           
ParseImpl(ParseText text, ParseData data)
           
ParseImpl(String text, ParseData data)
           
 
Method Summary
 Configuration getConf()
          Return the configuration used by this object.
 ParseData getData()
          Other data extracted from the page.
 String getText()
          The textual content of the page.
static ParseImpl read(DataInput in, Configuration conf)
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void setConf(Configuration conf)
          Set the configuration to be used by this object.
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseImpl

public ParseImpl()

ParseImpl

public ParseImpl(Parse parse)

ParseImpl

public ParseImpl(String text,
                 ParseData data)

ParseImpl

public ParseImpl(ParseText text,
                 ParseData data)
Method Detail

getText

public String getText()
Description copied from interface: Parse
The textual content of the page. This is indexed, searched, and used when generating snippets.

Specified by:
getText in interface Parse

getData

public ParseData getData()
Description copied from interface: Parse
Other data extracted from the page.

Specified by:
getData in interface Parse

write

public final void write(DataOutput out)
                 throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Throws:
IOException

read

public static ParseImpl read(DataInput in,
                             Configuration conf)
                      throws IOException
Throws:
IOException

setConf

public void setConf(Configuration conf)
Description copied from interface: Configurable
Set the configuration to be used by this object.

Specified by:
setConf in interface Configurable

getConf

public Configuration getConf()
Description copied from interface: Configurable
Return the configuration used by this object.

Specified by:
getConf in interface Configurable


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.