This documentation is part of the Link Checker Library project.

de.tw.website.linkchecker
Class HtmlReport

java.lang.Object
  |
  +--de.tw.website.linkchecker.HtmlReport
All Implemented Interfaces:
Report

public class HtmlReport
extends java.lang.Object
implements Report

Reporting functionality in HTML.

Version:
1.0
Author:
Thomas Weinbrenner

Inner Class Summary
protected  class HtmlReport.Info
          Reported information.
 
Constructor Summary
HtmlReport(WebSiteInfo webSiteInfo)
          Constructor.
 
Method Summary
 void fileNotFoundUrl(java.lang.String startUrl, java.lang.String targetUrl)
          Reference to a file which does not exist.
 void fileNotReferenced(java.lang.String fileName)
          Unreferenced file.
 void javaScriptInReference(java.lang.String startUrl, java.lang.String targetUrl)
          Found javascript code in a <a href=""> reference.
 void noFileProtocol(java.lang.String startUrl, java.lang.String targetUrl)
          A reference which is not a file protocol.
 void normalReference(java.lang.String startUrl, java.lang.String targetUrl, ReferenceType referenceType)
          An ordinary reference.
 void noUrlMappedForFile(java.lang.String fileName)
          The file found in the file system could not be mapped to a URL.
 void parseException(java.lang.String url, java.lang.Exception e)
          Exception when parsing HTML.
 void referenceWithWrongCase(java.lang.String startUrl, java.lang.String wrongTargetUrl, java.lang.String correctTargetUrl, ReferenceType referenceType)
          A reference contains characters with wrong cases.
 void relativeUrlOutsideMapping(java.lang.String startUrl, java.lang.String targetUrl)
          A relative URL has been found which does not map to a file.
 void setReportDirectory(java.lang.String reportDirectory)
          Sets the reportdirectory.
 void setReportNormalReferences(boolean reportNormalReferences)
          Reporting of common references may be very tedious and time consuming.
 void urlConnectionException(java.lang.String url, java.lang.Exception e)
          Problem when trying to make a HTTP-Request to a URL.
 void urlToOtherWebSite(java.lang.String startUrl, java.lang.String targetUrl)
          URL to another web site.
 void writeReports()
          Writes the reports in the reportdirectory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlReport

public HtmlReport(WebSiteInfo webSiteInfo)
Constructor. The webSiteInfo is used to shorten things for display.
Method Detail

setReportDirectory

public void setReportDirectory(java.lang.String reportDirectory)
                        throws java.io.IOException
Sets the reportdirectory.
Throws:
java.io.IOException - If the directory does not exist and could not be created.

setReportNormalReferences

public void setReportNormalReferences(boolean reportNormalReferences)
Reporting of common references may be very tedious and time consuming. It can be switched off.

writeReports

public void writeReports()
                  throws java.io.IOException
Writes the reports in the reportdirectory.

urlToOtherWebSite

public void urlToOtherWebSite(java.lang.String startUrl,
                              java.lang.String targetUrl)
Description copied from interface: Report
URL to another web site.
Specified by:
urlToOtherWebSite in interface Report
See Also:
Report.urlToOtherWebSite(java.lang.String, java.lang.String)

relativeUrlOutsideMapping

public void relativeUrlOutsideMapping(java.lang.String startUrl,
                                      java.lang.String targetUrl)
Description copied from interface: Report
A relative URL has been found which does not map to a file.
Specified by:
relativeUrlOutsideMapping in interface Report
See Also:
Report.relativeUrlOutsideMapping(java.lang.String, java.lang.String)

referenceWithWrongCase

public void referenceWithWrongCase(java.lang.String startUrl,
                                   java.lang.String wrongTargetUrl,
                                   java.lang.String correctTargetUrl,
                                   ReferenceType referenceType)
Description copied from interface: Report
A reference contains characters with wrong cases.
Specified by:
referenceWithWrongCase in interface Report
See Also:
Report.referenceWithWrongCase(java.lang.String, java.lang.String, java.lang.String, de.tw.website.linkchecker.ReferenceType)

normalReference

public void normalReference(java.lang.String startUrl,
                            java.lang.String targetUrl,
                            ReferenceType referenceType)
Description copied from interface: Report
An ordinary reference.
Specified by:
normalReference in interface Report
See Also:
Report.normalReference(java.lang.String, java.lang.String, de.tw.website.linkchecker.ReferenceType)

fileNotFoundUrl

public void fileNotFoundUrl(java.lang.String startUrl,
                            java.lang.String targetUrl)
Description copied from interface: Report
Reference to a file which does not exist.
Specified by:
fileNotFoundUrl in interface Report
See Also:
Report.fileNotFoundUrl(java.lang.String, java.lang.String)

urlConnectionException

public void urlConnectionException(java.lang.String url,
                                   java.lang.Exception e)
Description copied from interface: Report
Problem when trying to make a HTTP-Request to a URL.
Specified by:
urlConnectionException in interface Report
See Also:
Report.urlConnectionException(java.lang.String, java.lang.Exception)

parseException

public void parseException(java.lang.String url,
                           java.lang.Exception e)
Description copied from interface: Report
Exception when parsing HTML.
Specified by:
parseException in interface Report
See Also:
Report.parseException(java.lang.String, java.lang.Exception)

noFileProtocol

public void noFileProtocol(java.lang.String startUrl,
                           java.lang.String targetUrl)
Description copied from interface: Report
A reference which is not a file protocol.
Specified by:
noFileProtocol in interface Report
See Also:
Report.noFileProtocol(java.lang.String, java.lang.String)

fileNotReferenced

public void fileNotReferenced(java.lang.String fileName)
Description copied from interface: Report
Unreferenced file. These notifications occur after all references beginning at a given start page have been analysed.
Specified by:
fileNotReferenced in interface Report
See Also:
Report.fileNotReferenced(java.lang.String)

noUrlMappedForFile

public void noUrlMappedForFile(java.lang.String fileName)
Description copied from interface: Report
The file found in the file system could not be mapped to a URL.
Specified by:
noUrlMappedForFile in interface Report
See Also:
Report.noUrlMappedForFile(java.lang.String)

javaScriptInReference

public void javaScriptInReference(java.lang.String startUrl,
                                  java.lang.String targetUrl)
Description copied from interface: Report
Found javascript code in a <a href=""> reference.
Specified by:
javaScriptInReference in interface Report
See Also:
Report.javaScriptInReference(java.lang.String, java.lang.String)

This documentation is part of the Link Checker Library project.