xsv

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	arch.Packager

	// Load converts xSV file to coldp.NameUsage objects and feeds them to
	// a channel.
	Load(
		ctx context.Context,
		ch chan<- coldp.NameUsage,
		jobsNum int,
		nomCode nomcode.Code,
	) error

	// Write converts coldp.NameUsage entries to CSV rows, writing them to a
	// FilePath.
	Write(
		ctx context.Context,
		ch <-chan coldp.NameUsage,
		filePath string,
	) error

	// FilePath returns the path to the file with scientific names.
	FilePath() string

	// Headers returns the fields detected in the first line of the
	// xsv file.
	Headers() []string

	// ColdpHeaders return a map of a ColDP term in low caps and the
	// corresponding index of the field in the xsv file.
	ColdpHeaders() map[string]int
}

Archive provides methods to operate on an CSV/TSV/PSV (XSV) file that contains biodiversity data and with headers that correspond to either DarwinCore or CoLDP terms.

Jump to

Keyboard shortcuts

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