KRis

object KRis

RIS format processor and builder. It is capable of

  • processing lines of RIS files (Strings), converting them to RisRecords

  • building well formatted RIS files from RisRecords.

The KRis class works in non-blocking manner as default. Extension functions provide blocking alternatives for ease of use both from Kotlin or Java.

Author

Gianluca Colaianni -- g.colaianni5@gmail.com

Urs Joss - urs.joss@gmx.ch

Functions

Link copied to clipboard
fun build(recordFlow: Flow<RisRecord>, sort: List<String> = emptyList()): Flow<String>

Converts a flow of RisRecords into a flow of Strings in RIS file format. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

Link copied to clipboard
fun buildFromList(risRecords: List<RisRecord>, sort: List<String> = emptyList()): List<String>

Converts a list of RisRecords into a list of Strings in RIS file format in blocking manner. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

Link copied to clipboard
fun exportObservable(observable: Observable<RisRecord>, sort: List<String> = emptyList()): Observable<String>

Converts an observable of RisRecords into an observable of Strings in RIS file format. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

Link copied to clipboard
fun process(lineFlow: Flow<String>): Flow<RisRecord>

Converts a flow of Strings (representing lines in a RIS file) into a flow of RisRecords. May throw a KRisException if the line flow cannot be parsed successfully.

Link copied to clipboard

Converts a list of Strings (representing lines in a RIS file) into a list of RisRecords in blocking manner. May throw a KRisException if the line flow cannot be parsed successfully.

Link copied to clipboard
fun processObservables(risLineObservable: Observable<String>): Observable<RisRecord>

Converts an observable of Strings (representing lines in a RIS file) into an observable of RisRecords in non-blocking manner. May throw KRisException if the line flow cannot be parsed successfully.

Link copied to clipboard

Returns a list of the names of all available RisTags