mets

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type METS added in v0.0.7

type METS struct {
	Root *xmlquery.Node // Document root node.
	Name string         // File name.
}

METS represents an METS file.

func Open added in v0.0.7

func Open(name string) (METS, error)

Open opens a mets xml file.

func (METS) AddAgent added in v0.0.7

func (mets METS) AddAgent(pstep, agent string) error

AddAgent adds an agent to the metsHdr of the mets tree.

func (METS) FilePathsForFileGrp added in v0.0.7

func (mets METS) FilePathsForFileGrp(fg string) ([]string, error)

FilePathsForFileGrp returns the list of file paths for the given file group. The returned file paths are updated to be relative to the mets's file base directory if they are not absolute.

func (METS) FindFlocats added in v0.0.7

func (mets METS) FindFlocats(fg string) []*xmlquery.Node

FindFlocats returns the Flocat nodes for the given file group.

func (METS) FindFptr added in v0.0.7

func (mets METS) FindFptr(id string) *xmlquery.Node

FindFptr returns the Fptr node for the given (unique) id.

func (METS) FlocatGetPath added in v0.0.7

func (mets METS) FlocatGetPath(n *xmlquery.Node) string

FlocatGetPath returns the path of the flocat's link relative to the given mets file's base directory unless the stored path is absolute.

func (METS) Write added in v0.0.7

func (mets METS) Write() error

Write writes the xml file.

Jump to

Keyboard shortcuts

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