Class BibTeXDocument

  • All Implemented Interfaces:
    OutputFile

    public class BibTeXDocument
    extends java.lang.Object
    implements OutputFile

    Class representing a BibTeX document.

    • Constructor Summary

      Constructors 
      Constructor Description
      BibTeXDocument​(java.lang.String sName, boolean bIsMaster)
      Constructs a new BibTeX Document.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.String sIdentifier)  
      java.lang.String getExportName​(java.lang.String sIdentifier)  
      static java.lang.String getFieldName​(int nField)
      Return BibTeX name of field
      java.lang.String getFileName()
      Returns the Document name with file extension.
      java.lang.String getMIMEType()
      Get the MIME type of the OutputFile.
      java.lang.String getName()
      Returns the Document name with no file extension.
      boolean isMasterDocument()
      Test whether this document is part of the main document flow (master documents) or an auxiliary document
      void put​(BibMark entry)  
      void write​(java.io.OutputStream os)
      Writes out the Document content to the specified OutputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BibTeXDocument

        public BibTeXDocument​(java.lang.String sName,
                              boolean bIsMaster)

        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 Detail

      • getName

        public java.lang.String getName()

        Returns the Document name with no file extension.

        Returns:
        The Document name with no file extension.
      • getFileName

        public java.lang.String getFileName()

        Returns the Document name with file extension.

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

        public java.lang.String getMIMEType()
        Description copied from interface: OutputFile
        Get the MIME type of the OutputFile.
        Specified by:
        getMIMEType in interface OutputFile
        Returns:
        string representation of the MIME type
      • isMasterDocument

        public boolean isMasterDocument()
        Description copied from interface: OutputFile
        Test whether this document is part of the main document flow (master documents) or an auxiliary document
        Specified by:
        isMasterDocument in interface OutputFile
        Returns:
        true if this document is a master document
      • write

        public void write​(java.io.OutputStream os)
                   throws java.io.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:
        java.io.IOException - If any I/O error occurs.
      • getFieldName

        public static final java.lang.String getFieldName​(int nField)

        Return BibTeX name of field

      • containsKey

        public boolean containsKey​(java.lang.String sIdentifier)
      • put

        public void put​(BibMark entry)
      • getExportName

        public java.lang.String getExportName​(java.lang.String sIdentifier)