|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.htmlparser.beans.LinkBean
Extract links from a URL.
Field Summary | |
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 Summary | |
LinkBean()
Creates new LinkBean |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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
Constructor Detail |
public LinkBean()
Method Detail |
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's
true
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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |