java.io.Serializable
public class LinkBean
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected java.net.URL[] |
mLinks |
The strings extracted from the URL.
|
protected Parser |
mParser |
The parser used to extract strings.
|
protected java.beans.PropertyChangeSupport |
mPropertySupport |
Bound property support.
|
static java.lang.String |
PROP_LINKS_PROPERTY |
Property name in event where the URL contents changes.
|
static java.lang.String |
PROP_URL_PROPERTY |
Property name in event where the URL changes.
|
Constructor | Description |
---|---|
LinkBean() |
Creates new LinkBean
|
Modifier and Type | Method | Description |
---|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
Add a PropertyChangeListener to the listener list.
|
protected boolean |
equivalent(java.net.URL[] array1,
java.net.URL[] array2) |
Determine if two arrays of URL's are the same.
|
protected java.net.URL[] |
extractLinks() |
Internal routine to extract all the links from the parser.
|
java.net.URLConnection |
getConnection() |
Getter for property Connection.
|
java.net.URL[] |
getLinks() |
Getter for property links.
|
java.lang.String |
getURL() |
Getter for property URL.
|
static void |
main(java.lang.String[] args) |
Unit test.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
Remove a PropertyChangeListener from the listener list.
|
void |
setConnection(java.net.URLConnection connection) |
Setter for property Connection.
|
void |
setURL(java.lang.String url) |
Setter for property URL.
|
public static final java.lang.String PROP_LINKS_PROPERTY
public static final java.lang.String PROP_URL_PROPERTY
protected java.beans.PropertyChangeSupport mPropertySupport
protected java.net.URL[] mLinks
protected Parser mParser
protected java.net.URL[] extractLinks() throws ParserException
ParserException
- If the parse fails.protected boolean equivalent(java.net.URL[] array1, java.net.URL[] array2)
array1
- One array of URL'sarray2
- Another array of URL'strue
if the URL's match in number and value,
false
otherwise.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.public java.net.URL[] getLinks()
public java.lang.String getURL()
public void setURL(java.lang.String url)
url
- New value of property URL.public java.net.URLConnection getConnection()
public void setConnection(java.net.URLConnection connection)
connection
- New value of property Connection.public static void main(java.lang.String[] args)
args
- Pass arg[0] as the URL to process.HTML Parser is an open source library released under LGPL.