Class EndNoteConverter


  • public class EndNoteConverter
    extends java.lang.Object
    Converts EndNote references to CSL citation items
    Author:
    Michel Kraemer
    • Constructor Detail

      • EndNoteConverter

        public EndNoteConverter()
    • Method Detail

      • loadLibrary

        public EndNoteLibrary loadLibrary​(java.io.InputStream is)
                                   throws java.io.IOException,
                                          org.jbibtex.ParseException

        Loads a EndNote library from a stream.

        This method does not close the given stream. The caller is responsible for closing it.

        Parameters:
        is - the input stream to read from
        Returns:
        the EndNote library
        Throws:
        java.io.IOException - if the library could not be read
        org.jbibtex.ParseException - if the library is invalid
      • toItemData

        public java.util.Map<java.lang.String,​CSLItemData> toItemData​(EndNoteLibrary lib)
        Converts the given library to a map of CSL citation items
        Parameters:
        lib - the library
        Returns:
        a map consisting of citation keys and citation items
      • toItemData

        public CSLItemData toItemData​(EndNoteReference ref)
        Converts an EndNote reference to a citation item
        Parameters:
        ref - the reference to convert
        Returns:
        the citation item
      • toType

        public CSLType toType​(EndNoteType type)
        Converts a EndNote reference type to a CSL type
        Parameters:
        type - the type to convert
        Returns:
        the converted type (never null, falls back to CSLType.ARTICLE)