com.jcoverage.reporting
Class AbstractCollator

java.lang.Object
  extended bycom.jcoverage.reporting.AbstractCollator
All Implemented Interfaces:
Collator
Direct Known Subclasses:
StaticFileCollator

public abstract class AbstractCollator
extends java.lang.Object
implements Collator

This class implements a simple Collator.


Field Summary
(package private)  java.util.Map contextsByFormat
           
(package private) static org.apache.log4j.Logger logger
           
 
Constructor Summary
AbstractCollator()
           
 
Method Summary
 void addOutputter(Format format, Serializer serializer)
          Cause the pages to be output using the given format and serializer.
abstract  java.lang.String getPathToPage(FormattingContext ctx, Page page)
           
 java.lang.String getPathToResource(FormattingContext ctx, java.lang.String resource, Page from)
           
protected static java.lang.String getRelativePath(java.lang.String from, java.lang.String to)
           
 void pageClosed(Page page)
          This method is called evertime a page is closed and ready to be rendered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jcoverage.reporting.Collator
getPathToPage
 

Field Detail

logger

static org.apache.log4j.Logger logger

contextsByFormat

java.util.Map contextsByFormat
Constructor Detail

AbstractCollator

public AbstractCollator()
Method Detail

addOutputter

public void addOutputter(Format format,
                         Serializer serializer)
Description copied from interface: Collator
Cause the pages to be output using the given format and serializer.

Specified by:
addOutputter in interface Collator

pageClosed

public void pageClosed(Page page)
                throws ReportingException
Description copied from interface: Collator
This method is called evertime a page is closed and ready to be rendered.

Specified by:
pageClosed in interface Collator
Throws:
ReportingException

getPathToResource

public java.lang.String getPathToResource(FormattingContext ctx,
                                          java.lang.String resource,
                                          Page from)
Specified by:
getPathToResource in interface Collator

getRelativePath

protected static java.lang.String getRelativePath(java.lang.String from,
                                                  java.lang.String to)

getPathToPage

public abstract java.lang.String getPathToPage(FormattingContext ctx,
                                               Page page)
Specified by:
getPathToPage in interface Collator