de.scheisseichfindemalkeinen.hoster.linkextract
Class LinkExtract

java.lang.Object
  extended by de.scheisseichfindemalkeinen.hoster.linkextract.LinkExtract

public class LinkExtract
extends java.lang.Object


Constructor Summary
LinkExtract()
           
 
Method Summary
static URL convertURLFromRelativeToAbsolute(java.lang.String absoluteURL, URL urlToConvert)
          Converts a relative URL to an absolute URL
static java.lang.String getAttributeValueFromNode(org.w3c.dom.Node node, java.lang.String attribute)
          Returns the value of an attribute from a node or null if attribute not found
static java.util.Vector<URL> getLinks(java.lang.String url, java.lang.String referrer, ILinkExtractFilter filter)
          Method to get all links from a page If the filter is null all Links are accepted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkExtract

public LinkExtract()
Method Detail

getLinks

public static java.util.Vector<URL> getLinks(java.lang.String url,
                                             java.lang.String referrer,
                                             ILinkExtractFilter filter)
                                      throws HostException
Method to get all links from a page If the filter is null all Links are accepted

Parameters:
url - URL
referrer - Referrer
filter - Filter
Returns:
Array with links
Throws:
HostException

getAttributeValueFromNode

public static java.lang.String getAttributeValueFromNode(org.w3c.dom.Node node,
                                                         java.lang.String attribute)
Returns the value of an attribute from a node or null if attribute not found

Parameters:
node - Node
attribute - Attribute
Returns:
Attribute value

convertURLFromRelativeToAbsolute

public static URL convertURLFromRelativeToAbsolute(java.lang.String absoluteURL,
                                                   URL urlToConvert)
Converts a relative URL to an absolute URL

Parameters:
absoluteURL - Absolute-URL
urlToConvert - URL to convert
Returns:
Converted URL