kbart

package
v0.1.156 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2017 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 licensing.FilterFunc) (result []licensing.Entry)

Filter finds entries with certain characteristics. This will be 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 a tab separated CSV with a single header line.

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 do fast lookups per ISSN.

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