public abstract class BaseCollector extends Object implements Collector
Modifier and Type | Field and Description |
---|---|
protected org.jsoup.nodes.Document |
DOM
HTML Document model.
|
protected List<BasicItem> |
parsedItems
The parsed, collected data in a list of objects.
|
Constructor and Description |
---|
BaseCollector(String textBasedHTMLSource)
It makes the DOM from the source and sets it to the property.
|
Modifier and Type | Method and Description |
---|---|
protected void |
collectAttributeValueBy(String tagName,
String attributeKeyName)
It collects the values of HTML attributes by the tag name and the attribute name.
|
protected void |
collectAttributeValueBy(String tagName,
String attributeKeyName,
List<String> attributeKeyFilters,
List<String> attributeValueFilters)
It collects the values of HTML attributes by the tag name, attribute name and by filters for attribute name and
attribute value.
|
List<BasicItem> |
getItems()
It retrieves the collected, parsed data in a list of objects.
|
protected void |
resetParsedItems()
It resets the results of the parsing in the property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parse, parseByRule
protected org.jsoup.nodes.Document DOM
public BaseCollector(String textBasedHTMLSource)
textBasedHTMLSource
- Text based HTML source code.public List<BasicItem> getItems()
protected void resetParsedItems()
protected void collectAttributeValueBy(String tagName, String attributeKeyName)
tagName
- The name of the HTML tag.attributeKeyName
- The name of the attribute in the HTML tag.protected void collectAttributeValueBy(String tagName, String attributeKeyName, List<String> attributeKeyFilters, List<String> attributeValueFilters)
tagName
- The name of the HTML tag.attributeKeyName
- The name of the attribute in the HTML tag.attributeKeyFilters
- List of Strings for find by attribute names.attributeValueFilters
- List of Strings for find by attribute values.Copyright © 2015. All rights reserved.