org.htmlparser.beans
Class LinkBean
Object
org.htmlparser.beans.LinkBean
- Serializable
public class LinkBean
extends Object
implements Serializable
Extract links from a URL.
void | addPropertyChangeListener(PropertyChangeListener listener) - Add a PropertyChangeListener to the listener list.
|
protected boolean | equivalent(URL[] array1, URL[] array2) - Determine if two arrays of URL's are the same.
|
protected URL[] | extractLinks() - Internal routine to extract all the links from the parser.
|
URLConnection | getConnection() - Getter for property Connection.
|
URL[] | getLinks() - Getter for property links.
|
String | getURL() - Getter for property URL.
|
static void | main(String[] args) - Unit test.
|
void | removePropertyChangeListener(PropertyChangeListener listener) - Remove a PropertyChangeListener from the listener list.
|
void | setConnection(URLConnection connection) - Setter for property Connection.
|
void | setURL(String url) - Setter for property URL.
|
PROP_LINKS_PROPERTY
public static final String PROP_LINKS_PROPERTY
Property name in event where the URL contents changes.
PROP_URL_PROPERTY
public static final String PROP_URL_PROPERTY
Property name in event where the URL changes.
mLinks
protected URL[] mLinks
The strings extracted from the URL.
mParser
protected Parser mParser
The parser used to extract strings.
mPropertySupport
protected PropertyChangeSupport mPropertySupport
Bound property support.
LinkBean
public LinkBean()
Creates new LinkBean
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
The listener is registered for all properties.
listener
- The PropertyChangeListener to be added.
equivalent
protected boolean equivalent(URL[] array1,
URL[] array2)
Determine if two arrays of URL's are the same.
array1
- One array of URL'sarray2
- Another array of URL's
true
if the URL's match in number and value,
false
otherwise.
extractLinks
protected URL[] extractLinks()
throws ParserException
Internal routine to extract all the links from the parser.
- A list of all links on the page as URLs.
getConnection
public URLConnection getConnection()
Getter for property Connection.
- Value of property Connection.
getLinks
public URL[] getLinks()
Getter for property links.
getURL
public String getURL()
Getter for property URL.
main
public static void main(String[] args)
Unit test.
args
- Pass arg[0] as the URL to process.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
This removes a registered PropertyChangeListener.
listener
- The PropertyChangeListener to be removed.
setConnection
public void setConnection(URLConnection connection)
Setter for property Connection.
connection
- New value of property Connection.
setURL
public void setURL(String url)
Setter for property URL.
url
- New value of property URL.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |