marc

package
v0.148.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package marc is the MARC ingest provider (ARCHITECTURE §9): it reads an ISO 2709 MARC stream and yields each record as a resolvable ingest.Record, so an existing ILS's MARC flows through the same two-tier identity + clustering pipeline as any other provider (ingest.Run). Each record is crosswalked to BIBFRAME by libcodex's FromRecord; identity keys are drawn from that BIBFRAME plus the MARC control number. This is the modern, clustered path -- distinct from the legacy per-record bibframe.BuildMARC (which keys grains on the MARC 001 with no minted identity).

Index

Constants

View Source
const ProviderName = "marc"

ProviderName is the MARC provider's registry key and default provenance feed graph (feed:marc). A deployment onboarding an ILS can override the feed to name the source (e.g. feed:sierra).

Variables

This section is empty.

Functions

func FromCodexRecords

func FromCodexRecords(recs []*codex.Record) []ingest.Record

FromCodexRecords crosswalks already-parsed MARC records to ingest records -- the same shape file ingest produces, exposed for copy cataloging (tasks/050), where records arrive from Z39.50/SRU targets or staged uploads instead of a file.

func Identity

func Identity(rec *codex.Record) identity.Record

Identity derives the resolution keys for one parsed MARC record -- what the copy-cataloging match banner runs through a dry-run resolver.

func New

func New(cfg ingest.Config) (ingest.Provider, error)

New is the ingest.Factory for MARC. It takes the .mrc file path from Config.Source and the provenance feed from Config.Feed (default feed:marc).

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider reads an ISO 2709 MARC file and yields its records for ingest.Run.

func (Provider) Name

func (p Provider) Name() string

Name returns the provider's provenance feed graph name.

func (Provider) Records

func (p Provider) Records(_ context.Context) ([]ingest.Record, error)

Records reads every record from the MARC file, crosswalks each to BIBFRAME, and returns them as ingest records. ctx is accepted for the Provider contract; the file read is local and does not observe cancellation.

func (Provider) Role

func (p Provider) Role() ingest.Role

Role reports MARC as a bibliographic ingest source (feed:<name>).

Jump to

Keyboard shortcuts

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