The Encog Project

org.encog.bot.browse.extract
Interface Extract

All Known Implementing Classes:
BasicExtract

public interface Extract

Provides the basic interface that any extractor must support. An extractor is a class that is capable of extracting certain types of data from web data. For example, the ExtractWords extractor is used to extract all of the words from a web page.

Author:
jheaton

Method Summary
 void addListener(ExtractListener listener)
          Add a listener for the extraction.
 void extract(WebPage page)
          Extract data from the web page.
 java.util.List<java.lang.Object> extractList(WebPage page)
          Extract from the web page and return the results as a list.
 java.util.Collection<ExtractListener> getListeners()
           
 void removeListener(ExtractListener listener)
          Remove the specified listener.
 

Method Detail

addListener

void addListener(ExtractListener listener)
Add a listener for the extraction.

Parameters:
listener - The listener to add.

extract

void extract(WebPage page)
Extract data from the web page.

Parameters:
page - The page to extract from.

extractList

java.util.List<java.lang.Object> extractList(WebPage page)
Extract from the web page and return the results as a list.

Parameters:
page - The web page to extract from.
Returns:
The results of the extraction as a List.

getListeners

java.util.Collection<ExtractListener> getListeners()
Returns:
A list of listeners registered with this object.

removeListener

void removeListener(ExtractListener listener)
Remove the specified listener.

Parameters:
listener - The listener to rmove.

The Encog Project