Package org.creativecommons.nutch
Class CCParseFilter
java.lang.Object
org.creativecommons.nutch.CCParseFilter
- All Implemented Interfaces:
Configurable,HtmlParseFilter,Pluggable
Adds metadata identifying the Creative Commons license used, if any.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWalks DOM tree, looking for RDF in comments and licenses in anchors. -
Field Summary
Fields inherited from interface org.apache.nutch.parse.HtmlParseFilter
X_POINT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter(Content content, ParseResult parseResult, HTMLMetaTags metaTags, DocumentFragment doc) Adds metadata or otherwise modifies a parse of an HTML document, given the DOM tree of a page.getConf()voidsetConf(Configuration conf)
-
Constructor Details
-
CCParseFilter
public CCParseFilter()
-
-
Method Details
-
filter
public ParseResult filter(Content content, ParseResult parseResult, HTMLMetaTags metaTags, DocumentFragment doc) Adds metadata or otherwise modifies a parse of an HTML document, given the DOM tree of a page.- Specified by:
filterin interfaceHtmlParseFilter- Parameters:
content- theContentfor a given responseparseResult- the result of running on or moreParser's on the content.metaTags- a populatedHTMLMetaTagsobjectdoc- aDocumentFragment(DOM) which can be processed in the filtering process.- Returns:
- a filtered
ParseResult - See Also:
-
setConf
- Specified by:
setConfin interfaceConfigurable
-
getConf
- Specified by:
getConfin interfaceConfigurable
-