org.apache.nutch.parse
Class ParseData

java.lang.Object
  extended byorg.apache.nutch.io.VersionedWritable
      extended byorg.apache.nutch.parse.ParseData
All Implemented Interfaces:
Writable

public final class ParseData
extends VersionedWritable

Data extracted from a page's content.

See Also:
Parse.getData()

Field Summary
static String DIR_NAME
           
 
Constructor Summary
ParseData()
           
ParseData(ParseStatus status, String title, Outlink[] outlinks, Properties metadata)
           
 
Method Summary
 boolean equals(Object o)
           
 String get(String name)
          Return the value of a metadata property.
 Properties getMetadata()
          Other page properties.
 Outlink[] getOutlinks()
          The outlinks of the page.
 ParseStatus getStatus()
          The status of parsing the page.
 String getTitle()
          The title of the page.
 byte getVersion()
          Return the version number of the current implementation.
static void main(String[] argv)
           
static ParseData read(DataInput in)
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 String toString()
           
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIR_NAME

public static final String DIR_NAME
See Also:
Constant Field Values
Constructor Detail

ParseData

public ParseData()

ParseData

public ParseData(ParseStatus status,
                 String title,
                 Outlink[] outlinks,
                 Properties metadata)
Method Detail

getStatus

public ParseStatus getStatus()
The status of parsing the page.


getTitle

public String getTitle()
The title of the page.


getOutlinks

public Outlink[] getOutlinks()
The outlinks of the page.


getMetadata

public Properties getMetadata()
Other page properties. This is the place to find format-specific properties. Different parser implementations for different content types will populate this differently.


get

public String get(String name)
Return the value of a metadata property.


getVersion

public byte getVersion()
Description copied from class: VersionedWritable
Return the version number of the current implementation.

Specified by:
getVersion in class VersionedWritable

readFields

public final 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
Overrides:
readFields in class VersionedWritable
Throws:
IOException

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
Overrides:
write in class VersionedWritable
Throws:
IOException

read

public static ParseData read(DataInput in)
                      throws IOException
Throws:
IOException

equals

public boolean equals(Object o)

toString

public String toString()

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


Copyright © 2006 The Apache Software Foundation