|
HTML Parser Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.htmlparser.beans.LinkBean
public class LinkBean
Extract links from a URL.
Field Summary | |
---|---|
protected URL[] |
mLinks
The strings extracted from the URL. |
protected Parser |
mParser
The parser used to extract strings. |
protected PropertyChangeSupport |
mPropertySupport
Bound property support. |
static String |
PROP_LINKS_PROPERTY
Property name in event where the URL contents changes. |
static String |
PROP_URL_PROPERTY
Property name in event where the URL changes. |
Constructor Summary | |
---|---|
LinkBean()
Creates new LinkBean |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_LINKS_PROPERTY
public static final String PROP_URL_PROPERTY
protected PropertyChangeSupport mPropertySupport
protected URL[] mLinks
protected Parser mParser
Constructor Detail |
---|
public LinkBean()
Method Detail |
---|
protected URL[] extractLinks() throws ParserException
ParserException
- If the parse fails.protected boolean equivalent(URL[] array1, 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(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.public URL[] getLinks()
public String getURL()
public void setURL(String url)
url
- New value of property URL.public URLConnection getConnection()
public void setConnection(URLConnection connection)
connection
- New value of property Connection.public static void main(String[] args)
args
- Pass arg[0] as the URL to process.
|
© 2006 Derrick Oswald Sep 17, 2006
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
HTML Parser is an open source library released under Common Public License. |