pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.qc
Class SearchEngineQualityControl

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.qc.SearchEngineQualityControl

public class SearchEngineQualityControl
extends Controller

checks the contents of a SitemapNode or a given URL for search engine optimization criteria.

Version:
$Revision: 1454 $
Author:
Thomas Weber

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
SearchEngineQualityControl()
           
 
Method Summary
 SearchEngineQualityControlResult analyze(org.jdom.Document xhtmlDocument, net.sf.classifier4J.IStopWordProvider stopWordProvider, org.jdom.xpath.XPath path)
          performs the analysis on the given document.
 SearchEngineQualityControlResult analyze(java.net.URL url, net.sf.classifier4J.IStopWordProvider stopWordProvider, org.jdom.xpath.XPath path)
          performs the analysis on the given URL.
static org.jdom.Document getXHTMLFromURL(java.net.URL url)
          connects to the given URL via GET and tries to retrieve the contents as XHTML following all redirects.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchEngineQualityControl

public SearchEngineQualityControl()
Method Detail

analyze

public final SearchEngineQualityControlResult analyze(java.net.URL url,
                                                      net.sf.classifier4J.IStopWordProvider stopWordProvider,
                                                      org.jdom.xpath.XPath path)
                                               throws java.io.IOException,
                                                      org.jdom.JDOMException
performs the analysis on the given URL.

Parameters:
url - the URL to be checked
stopWordProvider - the stop word provider or null
path - the XPath to the content part or null
Returns:
the result of the check
Throws:
java.io.IOException - on errors
org.jdom.JDOMException - on errors

analyze

public final SearchEngineQualityControlResult analyze(org.jdom.Document xhtmlDocument,
                                                      net.sf.classifier4J.IStopWordProvider stopWordProvider,
                                                      org.jdom.xpath.XPath path)
                                               throws org.jdom.JDOMException
performs the analysis on the given document.

Parameters:
xhtmlDocument - the XHTML document
stopWordProvider - the stop word provider or null
path - the XPath to the content part or null
Returns:
the result of the check
Throws:
org.jdom.JDOMException - on errors

getXHTMLFromURL

public static org.jdom.Document getXHTMLFromURL(java.net.URL url)
                                         throws java.io.IOException,
                                                org.jdom.JDOMException
connects to the given URL via GET and tries to retrieve the contents as XHTML following all redirects.

Parameters:
url - the URL to connect to
Returns:
the XHTML document
Throws:
java.io.IOException - on i/o errors
org.jdom.JDOMException - on errors parsing the document