marc21struct

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controlfield

type Controlfield struct {
	Tag  string `xml:"tag,attr" json:"tag"`
	Text string `xml:",chardata" json:"text"`
	Type string `xml:"-" json:"-"`
}

Controlfield contains a controlfield entry

type Controlfields

type Controlfields []*Controlfield

type Datafield

type Datafield struct {
	Tag       string      `xml:"tag,attr" json:"tag"`
	Ind1      string      `xml:"ind1,attr" json:"ind1,omitempty"`
	Ind2      string      `xml:"ind2,attr" json:"ind2,omitempty"`
	Subfields []*Subfield `xml:"subfield" json:"subfield,omitempty"`
}

Datafield contains a datafield entry

type Date

type Date time.Time

type DateTime

type DateTime time.Time

type Leader

type Leader struct {
	Text string `xml:",chardata" json:"text"`
}

Leader is for containing the text string of the MARC record Leader

type MARCIJ

type MARCIJ struct {
	Leader string         `json:"leader"`
	Fields []*MARCIJField `json:"fields"`
}

func (*MARCIJ) FromMarc

func (pmr *MARCIJ) FromMarc(mr *Record) error

type MARCIJContent

type MARCIJContent struct {
	Ind1      string              `json:"ind1,omitempty"`
	Ind2      string              `json:"ind2,omitempty"`
	Subfields []map[string]string `json:"subfields"`
}

type MARCIJField

type MARCIJField struct {
	MARCIJContent
	Code string
	Text string
}

func (*MARCIJField) FromMarc

func (f *MARCIJField) FromMarc(dataField *Datafield) error

func (*MARCIJField) MarshalJSON

func (f *MARCIJField) MarshalJSON() ([]byte, error)

func (*MARCIJField) UnmarshalJSON

func (f *MARCIJField) UnmarshalJSON(data []byte) error

type QueryStruct

type QueryStruct struct {
	Name          string          `json:"name"`
	Field         *Datafield      `json:"field"`
	Datafields    []*Datafield    `json:"datafield"`
	Controlfields []*Controlfield `json:"controlfield"`
	Leader        string          `json:"LDR"`
}

type QueryStructMARCIJ

type QueryStructMARCIJ struct {
	Name   string       `json:"name"`
	Field  *MARCIJField `json:"field"`
	Object *MARCIJ      `json:"object"`
}

type Record

type Record struct {
	Leader        Leader        `xml:"leader" json:"LDR"`
	Controlfields Controlfields `xml:"controlfield" json:"controlfield"`
	Datafields    []*Datafield  `xml:"datafield" json:"datafield"`
}

Record is for containing a MARC record

type Subfield

type Subfield struct {
	Code      string `xml:"code,attr" json:"code"`
	Text      string `xml:",chardata" json:"text"`
	Datafield *Datafield
}

Subfield contains a subfield entry

Jump to

Keyboard shortcuts

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