Package de.undercouch.citeproc.ris
Class RISConverter
- java.lang.Object
-
- de.undercouch.citeproc.ris.RISConverter
-
public class RISConverter extends java.lang.ObjectConverts RIS references to CSL citation items- Author:
- Michel Kraemer
-
-
Constructor Summary
Constructors Constructor Description RISConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RISLibraryloadLibrary(java.io.InputStream is)Loads a RIS library from a stream.java.util.Map<java.lang.String,CSLItemData>toItemData(RISLibrary lib)Converts the given library to a map of CSL citation itemsCSLItemDatatoItemData(RISReference ref)Converts an RIS reference to a citation itemCSLTypetoType(RISType type)Converts a RIS reference type to a CSL type
-
-
-
Method Detail
-
loadLibrary
public RISLibrary loadLibrary(java.io.InputStream is) throws java.io.IOException, org.jbibtex.ParseException
Loads a RIS 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 RIS library
- Throws:
java.io.IOException- if the library could not be readorg.jbibtex.ParseException- if the library is invalid
-
toItemData
public java.util.Map<java.lang.String,CSLItemData> toItemData(RISLibrary 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(RISReference ref)
Converts an RIS reference to a citation item- Parameters:
ref- the reference to convert- Returns:
- the citation item
-
toType
public CSLType toType(RISType type)
Converts a RIS reference type to a CSL type- Parameters:
type- the type to convert- Returns:
- the converted type (never null, falls back to
CSLType.ARTICLE)
-
-