Package org.creativecommons.nutch
Class CCParseFilter
- java.lang.Object
-
- org.creativecommons.nutch.CCParseFilter
-
- All Implemented Interfaces:
Configurable
,HtmlParseFilter
,Pluggable
public class CCParseFilter extends Object implements HtmlParseFilter
Adds metadata identifying the Creative Commons license used, if any.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CCParseFilter.Walker
Walks 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 Constructor Description CCParseFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Configuration
getConf()
void
setConf(Configuration conf)
-
-
-
Method Detail
-
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:
filter
in interfaceHtmlParseFilter
- Parameters:
content
- theContent
for a given responseparseResult
- the result of running on or moreParser
's on the content.metaTags
- a populatedHTMLMetaTags
objectdoc
- aDocumentFragment
(DOM) which can be processed in the filtering process.- Returns:
- a filtered
ParseResult
- See Also:
Parser.getParse(Content)
-
setConf
public void setConf(Configuration conf)
- Specified by:
setConf
in interfaceConfigurable
-
getConf
public Configuration getConf()
- Specified by:
getConf
in interfaceConfigurable
-
-