mods

package
v2.5.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package mods holds data structures to simplify unmarshaling the Issue XML which holds lots of MODS structures

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	RelatedItems []RelItem    `xml:"relatedItem"`
	OriginInfos  []OriginInfo `xml:"originInfo"`
	Parts        []Part       `xml:"part"`
	Rights       string       `xml:"accessCondition"`
}

Data holds the meat of the issue XML

type DateIssued

type DateIssued struct {
	Date      string `xml:",chardata"`
	Qualifier string `xml:"qualifier,attr"`
}

DateIssued holds dates and qualifiers like "questionable"

type Detail

type Detail struct {
	Type    string `xml:"type,attr"`
	Number  string `xml:"number"`
	Caption string `xml:"caption"`
}

Detail holds numbers (which aren't really numbers) and captions. The type attribute tells us what the number and/or caption mean.

type Extent

type Extent struct {
	Unit  string `xml:"unit,attr"`
	Start string `xml:"start"`
}

Extent holds... a range maybe? I'm too lazy to look up the mods spec.

type ID

type ID struct {
	Label string `xml:",chardata"`
	Type  string `xml:"type,attr"`
}

ID represents an id label and an id type; for our uses this is primarily just the issue's LCCN

type OriginInfo

type OriginInfo struct {
	Dates []DateIssued `xml:"dateIssued"`
}

OriginInfo holds issue date and date-as-labeled

type Part

type Part struct {
	Details []Detail `xml:"detail"`
	Extents []Extent `xml:"extent"`
}

Part seems to hold a lot of very generic information that can only be made sense of in context

type RelItem

type RelItem struct {
	Type  string `xml:"type,attr"`
	IDs   []ID   `xml:"identifier"`
	Parts []Part `xml:"part"`
}

RelItem holds high-level issue metadata when in the issue metadata section; it's ignored for the page metadata

Jump to

Keyboard shortcuts

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