Top Description Constructors Methods
de.undercouch.citeproc.endnote

public Class EndNoteConverter

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, .InputStreamReader, .Reader, java.nio.charset.StandardCharsets, java.util.ArrayList, .Arrays, .HashMap, .List, .Map, org.apache.commons.lang3.StringUtils, org.jbibtex.ParseException, de.undercouch.citeproc.bibtex.DateParser, .NameParser, de.undercouch.citeproc.csl.CSLDate, .CSLItemData, .CSLItemDataBuilder, .CSLName, .CSLType

Converts EndNote references to CSL citation items
Author
Michel Kraemer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public EndNoteLibrary

Returns:

the EndNote library
loadLibrary
(InputStream
the input stream to read from
is
)

Loads a EndNote library from a stream.

private static CSLName[]
toAuthors(String[] authors)

public Map<String, CSLItemData>

Returns:

a map consisting of citation keys and citation items
toItemData
(EndNoteLibrary
the library
lib
)

Converts the given library to a map of CSL citation items

public CSLItemData

Returns:

the citation item
toItemData
(EndNoteReference
the reference to convert
ref
)

Converts an EndNote reference to a citation item

public CSLType

Returns:

the converted type (never null, falls back to CSLType#ARTICLE)
toType
(EndNoteType
the type to convert
type
)

Converts a EndNote reference type to a CSL type

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EndNoteConverterback to summary
public EndNoteConverter()

Method Detail

loadLibraryback to summary
public EndNoteLibrary loadLibrary(InputStream is) throws IOException, 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:InputStream

the input stream to read from

Returns:EndNoteLibrary

the EndNote library

Exceptions
IOException:
if the library could not be read
ParseException:
if the library is invalid
toAuthorsback to summary
private static CSLName[] toAuthors(String[] authors)
toItemDataback to summary
public Map<String, CSLItemData> toItemData(EndNoteLibrary lib)

Converts the given library to a map of CSL citation items

Parameters
lib:EndNoteLibrary

the library

Returns:Map<String, CSLItemData>

a map consisting of citation keys and citation items

toItemDataback to summary
public CSLItemData toItemData(EndNoteReference ref)

Converts an EndNote reference to a citation item

Parameters
ref:EndNoteReference

the reference to convert

Returns:CSLItemData

the citation item

toTypeback to summary
public CSLType toType(EndNoteType type)

Converts a EndNote reference type to a CSL type

Parameters
type:EndNoteType

the type to convert

Returns:CSLType

the converted type (never null, falls back to CSLType#ARTICLE)