Package org.apache.nutch.parse
Class ParseData
java.lang.Object
org.apache.hadoop.io.VersionedWritable
org.apache.nutch.parse.ParseData
- All Implemented Interfaces:
Writable
Data extracted from a page's content.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe originalMetadataretrieved from contentGet a metadata single value.Outlink[]Get the outlinks of the page.Other content properties.Get the status of parsing the page.getTitle()Get the title of the page.bytestatic voidstatic ParseDatafinal voidreadFields(DataInput in) voidsetOutlinks(Outlink[] outlinks) voidsetParseMeta(Metadata parseMeta) toString()final voidwrite(DataOutput out)
-
Field Details
-
DIR_NAME
- See Also:
-
-
Constructor Details
-
ParseData
public ParseData() -
ParseData
-
ParseData
public ParseData(ParseStatus status, String title, Outlink[] outlinks, Metadata contentMeta, Metadata parseMeta)
-
-
Method Details
-
getStatus
Get the status of parsing the page.- Returns:
- the
ParseStatus
-
getTitle
Get the title of the page.- Returns:
- the title as a
String
-
getOutlinks
Get the outlinks of the page.- Returns:
- an array of
Outlink's
-
getContentMeta
The originalMetadataretrieved from content- Returns:
- the original content
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.- Returns:
- a
Metadata
-
setParseMeta
-
setOutlinks
-
getMeta
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.- Parameters:
name- the metadata key for which to retrieve a value- Returns:
- the (string) metadata value
- See Also:
-
getVersion
public byte getVersion()- Specified by:
getVersionin classVersionedWritable
-
readFields
- Specified by:
readFieldsin interfaceWritable- Overrides:
readFieldsin classVersionedWritable- Throws:
IOException
-
write
- Specified by:
writein interfaceWritable- Overrides:
writein classVersionedWritable- Throws:
IOException
-
read
- Throws:
IOException
-
equals
-
toString
-
main
- Throws:
Exception
-