licensing

package
v0.1.155 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package licensing implements support for KBART and ISIL attachments. KBART might contains special fields, that are important in certain contexts. Example: "Aargauer Zeitung" could not be associated with a record, because there is no ISSN. However, there is a string "https://www.wiso-net.de/dosearch?&dbShortcut=AGZ" in the record, which could be parsed to yield "AGZ", which could be used to relate a record to this entry (e.g. if the record has "AGZ" in a certain field, like x.package).

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidEmbargo when embargo cannot be interpreted.
	ErrInvalidEmbargo = errors.New("invalid embargo")

	// Day is fixed number of hours.
	Day = 24 * time.Hour
	// Month is fixed number of hours.
	Month = 730 * time.Hour
	// Year is fixed number of hours.
	Year = 8760 * time.Hour

	ErrBeforeMovingWall = errors.New("before moving wall")
	ErrAfterMovingWall  = errors.New("after moving wall")
)
View Source
var (
	ErrBeforeFirstIssueDate = errors.New("before first issue date")
	ErrAfterLastIssueDate   = errors.New("after last issue date")
	ErrBeforeFirstVolume    = errors.New("before first volume")
	ErrAfterLastVolume      = errors.New("after last volume")
	ErrBeforeFirstIssue     = errors.New("before first issue")
	ErrAfterLastIssue       = errors.New("after last issue")
	ErrInvalidDate          = errors.New("invalid date")
)

Functions

func FindSerialNumbers

func FindSerialNumbers(s string) []string

FindSerialNumbers returns ISSN in standard form in a given string.

func NormalizeSerialNumber

func NormalizeSerialNumber(s string) string

NormalizeSerialNumber tries to transform the input into 1234-567X standard form.

Types

type DateGranularity

type DateGranularity byte

DateGranularity indicates how complete a date is.

const (
	GRANULARITY_YEAR DateGranularity = iota
	GRANULARITY_MONTH
	GRANULARITY_DAY
)

type Embargo

type Embargo string

Embargo holds moving wall information.

http://www.uksg.org/kbart/s5/guidelines/data_fields

The embargo field reflects limitations on when resources become available online, generally as a result of contractual limitations established between the publisher and the content provider. Presenting this information to librarians (usually via link resolver owners) is vital to ensure that link resolvers do not generate links to content that is not yet available for users to access.

One of the biggest problems facing members of this supply chain is that multiple kinds of embargoes exist—in some cases, coverage "to one year ago" means that data from 365 days ago becomes available today, while in other cases it means that the item is not available until the end of the current calendar year.

Because of the complexities of embargoes, we recommend that the ISO 8601 date syntax should be used. This is flexible enough to allow multiple types of embargoes to be described.

The following method for specifying embargoes is derived from the ISO 8601 "duration syntax" standard, making a few additional distinctions not covered in the standard. The embargo statement has three parts: type, length, and units. These three parts are written in that order in a single string with no spaces.

  • Type: All embargoes involve a "moving wall", a point in time expressed relative to the present (e.g., "12 months ago"). If access to the journal begins at the moving wall, the embargo type is "R". If access ends at the moving wall, then the embargo type is "P".
  • Length: An integer expressing the length of the embargo
  • Units: The units for the number in the "length" field: "D" for days, "M" for months, and "Y" for years. For simplicity, "365D" will always be equivalent to one year, and "30D" will always be equivalent to one month, even in leap years and months that do not have 30 days.

The "units" field also indicates the granularity of the embargo, that is, how frequently the moving wall "moves". For example, a newspaper database may have a subscription model that gives customers access to exactly one year of past content. Each day, a new issue is added, and the issue that was published exactly one year ago that day is removed from the customer’s access. In this case, the embargo statement would be "R365D", because the date of the earliest accessible issue changes each day.

Another journal may have a model that gives access to all issues in the current year, starting in January. The following January, the customer loses access to all of the previous year’s issues at once, and will only be able to access issues published in the current year. In this case, we would say that the customer has access to one "calendar year" of content. The embargo statement would be "R1Y", because the date of the earliest issue changes once a year.

Below are some common embargoes expressed according to this syntax:

  • Access to all content, except the current calendar year: P1Y
  • Access to all content in the previous and current calendar years: R2Y
  • Access to all content from exactly 6 months ago to the present: R180D
  • Access to all content, except the past 6 calendar months: P6M

In the case where there is an embargo at both the beginning and end of a coverage range, then two embargo statements should be concatenated, the starting embargo coming first. The two statements should be separated by a semicolon. For example, "R10Y;P30D" describes an archive in which the past 10 calendar years of content are available, except for the most current 30 days.

func (Embargo) AccessBeginsAtWall

func (embargo Embargo) AccessBeginsAtWall() bool

AccessBeginsAtWall returns true, if access begins at the moving wall.

func (Embargo) AccessEndsAtWall

func (embargo Embargo) AccessEndsAtWall() bool

AccessEndsAtWall returns true, if access end at the moving wall.

func (Embargo) Compatible

func (embargo Embargo) Compatible(t time.Time) error

Compatible returns true, if the given date is validated by the embargo relative to the current time.

func (Embargo) CompatibleTo

func (embargo Embargo) CompatibleTo(t time.Time, relative time.Time) error

CompatibleTo returns true, if the given date in validated by this embargo relative to another date.

func (Embargo) Duration

func (embargo Embargo) Duration() (dur time.Duration, err error)

Duration converts embargo like P12M, P1M, R10Y into a time.Duration. This duration will be positive. Time differences will have small shifts due to a month and a year being a fixed number of hours.

type Entry

type Entry struct {
	PublicationTitle                   string `csv:"publication_title"`          // "Südost-Forschungen (2014-)", "Theory of Computation"
	PrintIdentifier                    string `csv:"print_identifier"`           // "2029-8692", "9783662479841"
	OnlineIdentifier                   string `csv:"online_identifier"`          // "1533-8606", "9783834960078"
	FirstIssueDate                     string `csv:"date_first_issue_online"`    // "1901", "2008"
	FirstVolume                        string `csv:"num_first_vol_online"`       // "1",
	FirstIssue                         string `csv:"num_first_issue_online"`     // "1"
	LastIssueDate                      string `csv:"date_last_issue_online"`     // "1997", "2008"
	LastVolume                         string `csv:"num_last_vol_online"`        // "25"
	LastIssue                          string `csv:"num_last_issue_online"`      // "1"
	TitleURL                           string `csv:"title_url"`                  // "http://www.karger.com/dne", "http://link.springer.com/10.1007/978-3-658-15644-2"
	FirstAuthor                        string `csv:"first_author"`               // "Borgmann", "Wissenschaftlicher Beirat der Bundesregierung Globale Umweltveränderungen (WBGU)"
	TitleID                            string `csv:"title_id"`                   // "22540", "10.1007/978-3-658-10838-0"
	Embargo                            string `csv:"embargo_info"`               // "P12M", "P1Y", "R20Y"
	CoverageDepth                      string `csv:"coverage_depth"`             // "Volltext", "ebook"
	CoverageNotes                      string `csv:"coverage_notes"`             // ...
	PublisherName                      string `csv:"publisher_name"`             // "via Hein Online", "Springer (formerly: Kluwer)", "DUV"
	OwnAnchor                          string `csv:"own_anchor"`                 // "elsevier_2016_sax", "UNILEIP", "Wiley Custom 2015"
	PackageCollection                  string `csv:"package:collection"`         // "EBSCO:ebsco_bth", "NALAS:natli_aas2", "NALIW:sage_premier"
	InterlibraryRelevance              string `csv:"il_relevance"`               // ...
	InterlibraryNationwide             string `csv:"il_nationwide"`              // ...
	InterlibraryElectronicTransmission string `csv:"il_electronic_transmission"` // "Papierkopie an Endnutzer", "Elektronischer Versand an Endnutzer"
	InterlibraryComment                string `csv:"il_comment"`                 // "Nur im Inland", "il_nationwide"
	AllSerialNumbers                   string `csv:"all_issns"`                  // "1990-0104;1990-0090", "undefined"
	ZDBID                              string `csv:"zdb_id"`                     // "1459367-1" (see also: http://www.zeitschriftendatenbank.de/suche/zdb-katalog.html)
	Location                           string `csv:"location"`                   // ...
	TitleNotes                         string `csv:"title_notes"`                // ...
	StaffNotes                         string `csv:"staff_notes"`                // ...
	VendorID                           string `csv:"vendor_id"`                  // ...
	OCLCCollectionName                 string `csv:"oclc_collection_name"`       // "Springer German Language eBooks 2016 - Full Set", "Wiley Online Library UBCM All Obooks"
	OCLCCollectionID                   string `csv:"oclc_collection_id"`         // "springerlink.de2011fullset", "wiley.ubcmall"
	OCLCEntryID                        string `csv:"oclc_entry_id"`              // "25106066"
	OCLCLinkScheme                     string `csv:"oclc_link_scheme"`           // "wiley.book"
	OCLCNumber                         string `csv:"oclc_number"`                // "122938128"
	Action                             string `csv:"ACTION"`                     // "raw"
	// contains filtered or unexported fields
}

Entry contains fields about a licensed or available journal, book, article or other resource. First 14 columns are quite stardardized. Further columns may contain custom information:

EZB style: own_anchor, package:collection, il_relevance, il_nationwide, il_electronic_transmission, il_comment, all_issns, zdb_id

OCLC style: location, title_notes, staff_notes, vendor_id, oclc_collection_name, oclc_collection_id, oclc_entry_id, oclc_linkscheme, oclc_number, ACTION

See also: http://www.uksg.org/kbart/s5/guidelines/data_field_labels, http://www.uksg.org/kbart/s5/guidelines/data_fields

func (*Entry) Covers

func (e *Entry) Covers(date, volume, issue string) error

Covers is a generic method to determine, whether a given date, volume or issue is covered by this entry. It takes into account moving walls. If values are not defined, we mostly assume they are not constrained.

func (*Entry) ISSNList

func (e *Entry) ISSNList() []string

ISSNList returns a list of normalized ISSN from various fields.

type FilterFunc added in v0.1.153

type FilterFunc func(Entry) bool

FilterFunc is a function that can match an Entry.

Directories

Path Synopsis
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).
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).

Jump to

Keyboard shortcuts

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