org.apache.nutch.parse

## Class ParseData

- java.lang.Object
- - org.apache.hadoop.io.VersionedWritable
  - - org.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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DIR_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParseData()`
    `ParseData(ParseStatus status, java.lang.String title, Outlink[] outlinks, Metadata contentMeta)`
    `ParseData(ParseStatus status, java.lang.String title, Outlink[] outlinks, Metadata contentMeta, Metadata parseMeta)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `Metadata` | `getContentMeta()` The original Metadata retrieved from content
    `java.lang.String` | `getMeta(java.lang.String name)` Get a metadata single value.
    `Outlink[]` | `getOutlinks()` The outlinks of the page.
    `Metadata` | `getParseMeta()` Other content properties.
    `ParseStatus` | `getStatus()` The status of parsing the page.
    `java.lang.String` | `getTitle()` The title of the page.
    `byte` | `getVersion()`
    `static void` | `main(java.lang.String[] argv)`
    `static ParseData` | `read(java.io.DataInput in)`
    `void` | `readFields(java.io.DataInput in)`
    `void` | `setOutlinks(Outlink[] outlinks)`
    `void` | `setParseMeta(Metadata parseMeta)`
    `java.lang.String` | `toString()`
    `void` | `write(java.io.DataOutput out)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DIR_NAME

          public static final java.lang.String DIR_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ParseData

          public ParseData()

    - #### ParseData

          public ParseData(ParseStatus status,
                           java.lang.String title,
                           Outlink[] outlinks,
                           Metadata contentMeta)

    - #### ParseData

          public ParseData(ParseStatus status,
                           java.lang.String title,
                           Outlink[] outlinks,
                           Metadata contentMeta,
                           Metadata parseMeta)

  - ### Method Detail

    - #### getStatus

          public ParseStatus getStatus()

      The status of parsing the page.

    - #### getTitle

          public java.lang.String getTitle()

      The title of the page.

    - #### getOutlinks

          public Outlink[] getOutlinks()

      The outlinks of the page.

    - #### getContentMeta

          public Metadata getContentMeta()

      The original Metadata retrieved from content

    - #### getParseMeta

          public Metadata getParseMeta()

      Other content properties. This is the place to find format-specific properties. Different parser implementations for different content types will populate this differently.

    - #### setParseMeta

          public void setParseMeta(Metadata parseMeta)

    - #### setOutlinks

          public void setOutlinks(Outlink[] outlinks)

    - #### getMeta

          public java.lang.String getMeta(java.lang.String name)

      Get a metadata single value. This method first looks for the metadata value in the parse metadata. If no value is found it the looks for the metadata in the content metadata.
      See Also:
        `getContentMeta()`, `getParseMeta()`

    - #### getVersion

          public byte getVersion()

      Specified by:
        `getVersion` in class `VersionedWritable`

    - #### readFields

          public final void readFields(java.io.DataInput in)
                                throws java.io.IOException

      Specified by:
        `readFields` in interface `Writable`
      Overrides:
        `readFields` in class `VersionedWritable`
      Throws:
        `java.io.IOException`

    - #### write

          public final void write(java.io.DataOutput out)
                           throws java.io.IOException

      Specified by:
        `write` in interface `Writable`
      Overrides:
        `write` in class `VersionedWritable`
      Throws:
        `java.io.IOException`

    - #### read

          public static ParseData read(java.io.DataInput in)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### main

          public static void main(java.lang.String[] argv)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation