kbart

package
v0.1.353 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kbart implements support for KBART (Knowledge Bases And Related Tools working group, http://www.uksg.org/kbart/) holding files (http://www.uksg.org/kbart/s5/guidelines/data_format).

> This is a generic format that minimizes the effort involved in receiving and loading the data, and reduces the likelihood of errors being introduced during exchange. Tab-delimited formats are preferable to comma-separated formats, as commas appear regularly within the distributed data and, though they can be "commented out", doing so leaves a greater opportunity for error than the use of a tab-delimited format. Tab-delimited formats can be easily exported from all commonly used spreadsheet programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holdings

type Holdings []licensing.Entry

Holdings contains a list of entries about licenced or available content. In addition to access to all entries, this type exposes a couple of helper methods.

func (*Holdings) Filter

func (h *Holdings) Filter(f func(licensing.Entry) bool) (result []licensing.Entry)

Filter finds entries with certain characteristics. This will be very slow for KBART files with thousands of entries.

func (*Holdings) ReadFrom

func (h *Holdings) ReadFrom(r io.Reader) (int64, error)

ReadFrom create holdings struct from a reader. Expects tab separated content with a single header row. TODO: This is not exactly what ReadFrom is for.

func (*Holdings) SerialNumberMap

func (h *Holdings) SerialNumberMap() map[string][]licensing.Entry

SerialNumberMap creates a map from ISSN to associated licensing entries. This is here for performance mostly, so we can access relevant licensing entry by ISSN. TODO: Do not replicate entries, just index into them.

func (*Holdings) TitleMap

func (h *Holdings) TitleMap() map[string][]licensing.Entry

TitleMap maps an exact title to a list of entries.

func (*Holdings) WisoDatabaseMap

func (h *Holdings) WisoDatabaseMap() map[string][]licensing.Entry

WisoDatabaseMap derives a structure from the holdings file, that maps WISO database names to the associated entries, refs. #9534.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL