de.infinityloop.upcast
Interface BCFCallback


public interface BCFCallback

This defines the interface for Java classes you may specify on run and conversion elements in BCFs.

To have your class called by the BCF processor, specify the fully qualified class name using the callback attribute on either of the above elements.

When you specify a class on each of the two (nested) elements, the two are called in the element nesting order.

Since:
4.0.0b71
Author:
Christian Roth

Method Summary
 void abort(java.lang.String reason, boolean preflight)
          This is called when a BCF is (ab-)normally aborted; any pending end...() calls will not be received after this.
 void end(boolean preflight)
          This is called at the end of the respective element where the class was specified using the callback attribute.
 void endFile(java.lang.String fileURL, boolean preflight)
          This is called before processing each file.
 void start(org.xml.sax.Attributes atts, boolean preflight)
          This is called at the beginning of the respective element where the class was specified using the callback attribute.
 void startFile(java.lang.String fileURL, org.xml.sax.Attributes atts, int fileCounter, int numberOfFiles, boolean preflight)
          This is called before processing each file.
 

Method Detail

start

void start(org.xml.sax.Attributes atts,
           boolean preflight)
This is called at the beginning of the respective element where the class was specified using the callback attribute.

Parameters:
atts - SAX Attributes on the element. Can be used to pass parameters to your implementation by specifying them on the respective element.
preflight - true when this is the preflight run, false at the actual conversion run.

end

void end(boolean preflight)
This is called at the end of the respective element where the class was specified using the callback attribute.

Parameters:
preflight - true when this is the preflight run, false at the actual conversion run.

startFile

void startFile(java.lang.String fileURL,
               org.xml.sax.Attributes atts,
               int fileCounter,
               int numberOfFiles,
               boolean preflight)
This is called before processing each file.

Parameters:
fileURL - the full path to the file about to being processed
atts - SAX Attributes object listing all attributes on that file element.
fileCounter - the number of this file (starting at 1) among all files this file element stands for.
numberOfFiles - the total number of files this file element stands for
preflight - true when this is the preflight run, false at the actual conversion run.

endFile

void endFile(java.lang.String fileURL,
             boolean preflight)
This is called before processing each file.

Parameters:
fileURL - the full path to the file about to being processed
preflight - true when this is the preflight run, false at the actual conversion run.

abort

void abort(java.lang.String reason,
           boolean preflight)
This is called when a BCF is (ab-)normally aborted; any pending end...() calls will not be received after this.

Parameters:
reason - a plain text describing the reason why the run was aborted
preflight - true when the abort happened during the preflight stage, false if at the actual conversion run.