oaiscrape

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Creators     []string `json:"creators"`
	Datestamp    string   `json:"datestamp"`
	Descriptions []string `json:"descriptions"`
	IDs          []string `json:"ids"`
	Languages    []string `json:"languages"`
	OAI          string   `json:"oai"`
	Rights       []string `json:"rights"`
	Sets         []string `json:"sets"`
	Titles       []string `json:"titles"`
	Types        []string `json:"types"`
	URLs         []string `json:"urls"`
}

Document is a minimal JSON document already converted from XML through other means.

func (*Document) DOI

func (doc *Document) DOI() string

DOI returns the first DOI, will attempt slight guessing at various strings.

func (*Document) ISSN

func (doc *Document) ISSN() string

ISSN returns the first ISSN found.

func (*Document) URL

func (doc *Document) URL() string

URL returns the first URL found.

type Record

type Record struct {
	XMLName xml.Name `xml:"record"`
	Text    string   `xml:",chardata"`
	Xmlns   string   `xml:"xmlns,attr"`
	Header  struct {
		Text       string   `xml:",chardata"`
		Status     string   `xml:"status,attr"`
		Identifier string   `xml:"identifier"` // oai:arXiv.org:1007.4032, ...
		Datestamp  string   `xml:"datestamp"`  // 2011-04-12, 2011-04-04, 2...
		SetSpec    []string `xml:"setSpec"`    // physics:physics, physics:...
	} `xml:"header"`
	Metadata struct {
		Text string `xml:",chardata"`
		Dc   struct {
			Text           string   `xml:",chardata"`
			OaiDc          string   `xml:"oai_dc,attr"`
			Dc             string   `xml:"dc,attr"`
			Xsi            string   `xml:"xsi,attr"`
			SchemaLocation string   `xml:"schemaLocation,attr"`
			Title          string   `xml:"title"`       // Cascading of Liquid Cryst...
			Creator        []string `xml:"creator"`     // Dawson, Nathan J., Kuzyk,...
			Subject        []string `xml:"subject"`     // Physics - Optics, Quantum...
			Description    []string `xml:"description"` // Photomechanical actuation...
			Date           []string `xml:"date"`        // 2010-07-22, 2010-12-08, 2...
			Type           string   `xml:"type"`        // text, text, text, text, t...
			Identifier     []string `xml:"identifier"`  // http://arxiv.org/abs/1007...
			Language       string   `xml:"language"`    // ru, pt, pt, fr, ru, fr, r...
		} `xml:"dc"`
	} `xml:"metadata"`
	About string `xml:"about"`
}

func (*Record) DOI

func (record *Record) DOI() string

func (*Record) URL

func (record *Record) URL() (result []string)

URL returns the first URL found.

Jump to

Keyboard shortcuts

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