marc

package
v0.1.370 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	XMLName xml.Name `xml:"record"`
	Text    string   `xml:",chardata"`
	Header  struct {
		Text       string `xml:",chardata"`
		Status     string `xml:"status,attr"`
		Identifier struct {
			Text string `xml:",chardata"` // oai:gesis.izsoz.de:docume...
		} `xml:"identifier"`
		Datestamp struct {
			Text string `xml:",chardata"` // 2012-08-29T21:40:31Z, 201...
		} `xml:"datestamp"`
		SetSpec []struct {
			Text string `xml:",chardata"` // com_community_10100, com_...
		} `xml:"setSpec"`
	} `xml:"header"`
	Metadata struct {
		Text   string `xml:",chardata"`
		Record struct {
			Text           string `xml:",chardata"`
			Xmlns          string `xml:"xmlns,attr"`
			Doc            string `xml:"doc,attr"`
			Xalan          string `xml:"xalan,attr"`
			Xsi            string `xml:"xsi,attr"`
			SchemaLocation string `xml:"schemaLocation,attr"`
			Leader         struct {
				Text string `xml:",chardata"` // 00000nam a2200000 u 4500,...
			} `xml:"leader"`
			Controlfield []struct {
				Text string `xml:",chardata"` // 20080514135900.0, cr|||||...
				Tag  string `xml:"tag,attr"`
			} `xml:"controlfield"`
			Datafield []struct {
				Text     string `xml:",chardata"`
				Ind2     string `xml:"ind2,attr"`
				Ind1     string `xml:"ind1,attr"`
				Tag      string `xml:"tag,attr"`
				Subfield []struct {
					Text string `xml:",chardata"` // b, http://www.ssoar.info/...
					Code string `xml:"code,attr"`
				} `xml:"subfield"`
			} `xml:"datafield"`
		} `xml:"record"`
	} `xml:"metadata"`
	About struct {
		Text string `xml:",chardata"`
	} `xml:"about"`
}

Record for MARC-XML data.

func (Record) GetControlField

func (r Record) GetControlField(tag string) (string, error)

func (Record) GetDataFields

func (r Record) GetDataFields(spec string) (result []string, err error)

func (Record) GetFirstDataField

func (r Record) GetFirstDataField(spec string) (string, error)

func (Record) MustGetControlField

func (r Record) MustGetControlField(tag string) string

func (Record) MustGetDataFields

func (r Record) MustGetDataFields(spec string) []string

func (Record) MustGetFirstDataField

func (r Record) MustGetFirstDataField(spec string) string

Jump to

Keyboard shortcuts

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