org.jscience.net
Class URLNode

java.lang.Object
  extended by org.jscience.net.URLNode
All Implemented Interfaces:
java.io.Serializable, javax.swing.tree.TreeNode

public class URLNode
extends java.lang.Object
implements javax.swing.tree.TreeNode, java.io.Serializable

URLNode wrapps a URL and places it into a URLTree, which determines how the URLNode calculates its children.

See Also:
URLTree, Serialized Form

Constructor Summary
URLNode(URLCache uc, URLNode parent, URLTree tree)
           
URLNode(java.net.URL url, URLNode parent, URLTree tree)
           
 
Method Summary
 java.util.Enumeration<URLNode> children()
           
 void collapse()
          reverses the effect of expand()
 void expand()
          makes this node expand beyond the crawler rules of the associated URLTree
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 java.net.URL getURL()
           
 URLCache getURLCache()
           
 boolean isLeaf()
           
 void refresh()
          refreshes the cached URL content and recursively all children
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLNode

public URLNode(java.net.URL url,
               URLNode parent,
               URLTree tree)

URLNode

public URLNode(URLCache uc,
               URLNode parent,
               URLTree tree)
Method Detail

children

public java.util.Enumeration<URLNode> children()
Specified by:
children in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

refresh

public void refresh()
refreshes the cached URL content and recursively all children


expand

public void expand()
makes this node expand beyond the crawler rules of the associated URLTree


collapse

public void collapse()
reverses the effect of expand()


getURLCache

public URLCache getURLCache()

getURL

public java.net.URL getURL()