Class BibTeXDocument

java.lang.Object
writer2latex.bibtex.BibTeXDocument
All Implemented Interfaces:
OutputFile, Document

public class BibTeXDocument extends Object implements Document

Class representing a BibTeX document.

  • Constructor Details

    • BibTeXDocument

      public BibTeXDocument(String sName)

      Constructs a new BibTeX Document.

      This new document is empty. Bibliographic data must added using the put method.

      Parameters:
      sName - The name of the BibTeXDocument.
  • Method Details

    • read

      public void read(InputStream is) throws IOException

      This method is supposed to read byte data from the InputStream. Currently it does nothing, since we don't need it.

      Specified by:
      read in interface Document
      Parameters:
      is - InputStream containing a BibTeX data file.
      Throws:
      IOException - In case of any I/O errors.
    • getName

      public String getName()

      Returns the Document name with no file extension.

      Specified by:
      getName in interface Document
      Returns:
      The Document name with no file extension.
    • getFileName

      public String getFileName()

      Returns the Document name with file extension.

      Specified by:
      getFileName in interface OutputFile
      Returns:
      The Document name with file extension.
    • write

      public void write(OutputStream os) throws IOException

      Writes out the Document content to the specified OutputStream.

      This method may not be thread-safe. Implementations may or may not synchronize this method. User code (i.e. caller) must make sure that calls to this method are thread-safe.

      Specified by:
      write in interface OutputFile
      Parameters:
      os - OutputStream to write out the Document content.
      Throws:
      IOException - If any I/O error occurs.
    • getFieldName

      public static final String getFieldName(int nField)

      Return BibTeX name of field

    • containsKey

      public boolean containsKey(String sIdentifier)
    • put

      public void put(BibMark entry)
    • getExportName

      public String getExportName(String sIdentifier)