org.norvelle.textcite.gui.action.rtf
Class CitationExporter

java.lang.Object
  extended by org.norvelle.textcite.gui.action.rtf.CitationExporter
Direct Known Subclasses:
CitationsOnlyCitationExporter, CommentariesInBodyCitationExporter, CommentariesInFootnotesCitationExporter, ExportTranslationsAction.TranslationsOnlyCitationExporter, InterwovenCitationExporter

public abstract class CitationExporter
extends java.lang.Object

This is the parent class for the various different types of RTF citation exporters


Field Summary
protected  ExportRTFAction action
           
protected  int bibCodeStyle
           
protected  Font commentaryFont
           
protected  Document document
           
protected  boolean includeBibCodes
           
protected  RtfFont pageRefFont
           
protected  RtfFont summaryFont
           
protected  Font textFont
           
protected  boolean useOnlyRefs
           
 
Constructor Summary
protected CitationExporter(ExportRTFAction action, Document document)
           
 
Method Summary
protected  java.lang.String addFinalPeriod(java.lang.String text)
          This routine adds a final period to the given text, but only if a period is not already present
abstract  void exportCitation(Citation citation)
          Output the given citation in the format associated with the subclass.
 void setBibCodeStyle(int style)
           
 void setIncludeBibCodes(boolean includeBibCodes)
           
 void setUseOnlyRefs(boolean useRefs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

protected ExportRTFAction action

document

protected Document document

useOnlyRefs

protected boolean useOnlyRefs

includeBibCodes

protected boolean includeBibCodes

bibCodeStyle

protected int bibCodeStyle

pageRefFont

protected RtfFont pageRefFont

textFont

protected Font textFont

commentaryFont

protected Font commentaryFont

summaryFont

protected RtfFont summaryFont
Constructor Detail

CitationExporter

protected CitationExporter(ExportRTFAction action,
                           Document document)
Method Detail

setUseOnlyRefs

public void setUseOnlyRefs(boolean useRefs)
Parameters:
useRefs - If true, only the citation page reference (and possibly bib codes) will be output, and not the citation text.

setIncludeBibCodes

public void setIncludeBibCodes(boolean includeBibCodes)
Parameters:
includeBibCodes - If true, include bibliographic codes in the user-specified format (e.g. EndNote, Citation)

setBibCodeStyle

public void setBibCodeStyle(int style)
Parameters:
style - Set the bibliographic code style (e.g. EndNode, Citation, etc.)

exportCitation

public abstract void exportCitation(Citation citation)
                             throws DocumentException
Output the given citation in the format associated with the subclass.

Parameters:
citation - The Citation object to output
Throws:
DocumentException - Thrown by iText in case of difficuties with document construction

addFinalPeriod

protected java.lang.String addFinalPeriod(java.lang.String text)
This routine adds a final period to the given text, but only if a period is not already present

Parameters:
text - The String to add a period to
Returns:
The same String, but with a period added if needed