org.torweg.pulse.component.core.qc
Class SearchEngineQualityControl
java.lang.Object
org.torweg.pulse.bundle.Controller
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchEngineQualityControl
public SearchEngineQualityControl()
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 checkedstopWordProvider - the stop word provider or nullpath - 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 documentstopWordProvider - the stop word provider or nullpath - 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