oai

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const APIPATH string = "oai"

Variables

This section is empty.

Functions

This section is empty.

Types

type Description

type Description struct {
	Identifier Identifier `xml:"oai-identifier"`
}

<oai-identifier xmlns="http://www.openarchives.org/OAI/2.0/oai-identifier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai-identifier http://www.openarchives.org/OAI/2.0/oai-identifier.xsd">

<scheme>oai</scheme>
<repositoryIdentifier>www.research-collection.ethz.ch</repositoryIdentifier>
<delimiter>:</delimiter>
<sampleIdentifier>oai:www.research-collection.ethz.ch:20.500.11850/1234</sampleIdentifier>

</oai-identifier>

type Error

type Error struct {
	Code  ErrorCodeType `xml:"code,attr"`
	Value string        `xml:",chardata"`
}

type ErrorCodeType

type ErrorCodeType string
const (
	ErrorCodeCannotDisseminateFormat ErrorCodeType = "cannotDisseminateFormat"
	ErrorCodeIdDoesNotExist          ErrorCodeType = "idDoesNotExist"
	ErrorCodeBadArgument             ErrorCodeType = "badArgument"
	ErrorCodeBadVerb                 ErrorCodeType = "badVerb"
	ErrorCodeNoMetadataFormats       ErrorCodeType = "noMetadataFormats"
	ErrorCodeNoRecordsMatch          ErrorCodeType = "noRecordsMatch"
	ErrorCodeBadResumptionToken      ErrorCodeType = "badResumptionToken"
	ErrorCodeNoSetHierarchy          ErrorCodeType = "noSetHierarchy"
)

type GetRecord

type GetRecord struct {
	Record []*Record `xml:"record"`
}

type Identifier

type Identifier struct {
	XMLName              xml.Name `xml:"oai-identifier"`
	NS                   string   `xml:"xmlns,attr"`
	XsiType              string   `xml:"xmlns:xsi,attr"`
	XsiSchemaLocation    string   `xml:"xsi:schemaLocation,attr"`
	Scheme               string   `xml:"scheme"`
	RepositoryIdentifier string   `xml:"repositoryIdentifier"`
	Delimiter            string   `xml:"delimiter"`
	SampleIdentifier     string   `xml:"sampleIdentifier"`
}

func (*Identifier) InitNamespace

func (ident *Identifier) InitNamespace()

type Identify

type Identify struct {
	RepositoryName    string      `xml:"repositoryName"`
	BaseURL           string      `xml:"baseURL"`
	ProtocolVersion   string      `xml:"protocolVersion"`
	EarliestDatestamp string      `xml:"earliestDatestamp"`
	AdminEmail        []string    `xml:"adminEmail"`
	DeletedRecord     string      `xml:"deletedRecord"`
	Granularity       string      `xml:"granularity"`
	Compression       []string    `xml:"compression,omitempty"`
	Description       Description `xml:"description,omitempty"`
}

type ListIdentifiers

type ListIdentifiers struct {
	Header          []*RecordHeader  `xml:"header"`
	ResumptionToken *ResumptionToken `xml:"resumptionToken"`
}

type ListMetadataFormats

type ListMetadataFormats struct {
	MetadataFormat []*MetadataFormat `xml:"metadataFormat"`
}

type ListRecords

type ListRecords struct {
	Record          []*Record        `xml:"record"`
	ResumptionToken *ResumptionToken `xml:"resumptionToken"`
}

type ListSets

type ListSets struct {
	Set             []*Set           `xml:"set"`
	ResumptionToken *ResumptionToken `xml:"resumptionToken"`
}

type Metadata

type Metadata struct {
	OAIDC    interface{} `xml:"oai_dc:dc,omitempty"`
	Datacite interface{} `xml:"oai_datacite:datacite,omitempty"`
}

type MetadataFormat

type MetadataFormat struct {
	MetadataPrefix    string `xml:"metadataPrefix"`
	Schema            string `xml:"schema"`
	MetadataNamespace string `xml:"metadataNamespace"`
}

type OAIPMH

type OAIPMH struct {
	XMLName             xml.Name             `xml:"OAI-PMH"`
	NS                  string               `xml:"xmlns,attr"`
	XsiType             string               `xml:"xmlns:xsi,attr"`
	XsiSchemaLocation   string               `xml:"xsi:schemaLocation,attr"`
	ResponseDate        string               `xml:"responseDate"`
	Request             *Request             `xml:"request"`
	Error               *Error               `xml:"error,omitempty"`
	GetRecord           *GetRecord           `xml:"GetRecord,omitempty"`
	Identify            *Identify            `xml:"Identify,omitempty"`
	ListIdentifiers     *ListIdentifiers     `xml:"ListIdentifiers,omitempty"`
	ListRecords         *ListRecords         `xml:"ListRecords,omitempty"`
	ListSets            *ListSets            `xml:"ListSets,omitempty"`
	ListMetadataFormats *ListMetadataFormats `xml:"ListMetadataFormats,omitempty"`
}

func (*OAIPMH) InitNamespace

func (pmh *OAIPMH) InitNamespace()

type Record

type Record struct {
	Header   *RecordHeader `xml:"header"`
	Metadata *Metadata     `xml:"metadata"`
	About    *RecordAbout  `xml:"about,omitempty"`
}

type RecordAbout

type RecordAbout struct {
	Provenance *RecordAboutProvenance `xml:"provenance"`
}

type RecordAboutProvenance

type RecordAboutProvenance struct {
	OriginDescription []*RecordAboutProvenanceOriginDescription `xml:"originDescription"`
}

type RecordAboutProvenanceOriginDescription

type RecordAboutProvenanceOriginDescription struct {
	BaseURL           string      `xml:"baseURL"`
	Identifier        string      `xml:"identifier"`
	Datestamp         string      `xml:"datestamp"`
	MetadataNamespace string      `xml:"metadataNamespace"`
	HarvestDate       string      `xml:"harvestDate"`
	Altered           bool        `xml:"altered"`
	RepositoryId      string      `xml:"repositoryId,omitempty"`
	RepositoryName    string      `xml:"repositoryName,omitempty"`
	OriginDescription interface{} `xml:"originDescription,omitempty"`
}

type RecordHeader

type RecordHeader struct {
	Status     RecordHeaderStatusType `xml:"status,attr,omitempty"`
	Identifier string                 `xml:"identifier"`
	Datestamp  string                 `xml:"datestamp"`
	SetSpec    []string               `xml:"setSpec"`
}

type RecordHeaderStatusType

type RecordHeaderStatusType string
const (
	RecordHeaderStatusOK      RecordHeaderStatusType = ""
	RecordHeaderStatusDeleted RecordHeaderStatusType = "deleted"
)

type Request

type Request struct {
	Verb           string `xml:"verb,attr"`
	Identifier     string `xml:"identifier,attr,omitempty"`
	MetadataPrefix string `xml:"metadataPrefix,attr,omitempty"`
	Value          string `xml:",chardata"`
}

type ResumptionToken

type ResumptionToken struct {
	ExpirationDate   string `xml:"expirationDate,attr,omitempty"`
	CompleteListSize int64  `xml:"completeListSize,attr,omitempty"`
	Cursor           int64  `xml:"cursor,attr"`
	Value            string `xml:",chardata"`
}

type Set

type Set struct {
	SetSpec string `xml:"setSpec"`
	SetName string `xml:"setName"`
}

Jump to

Keyboard shortcuts

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