Documentation ¶
Overview ¶
Package oai Data structure for the OAI-PMH protocol request:
Data structure for the OAI-PMH protocol responses:
Index ¶
- type About
- type Description
- type GetRecord
- type Header
- type Identify
- type ListIdentifiers
- type ListMetadataFormats
- type ListRecords
- type ListSets
- type Metadata
- type MetadataFormat
- type OAIError
- type Record
- type Request
- func (request *Request) ChannelHarvestIdentifiers(channels []chan *Header)
- func (request *Request) GetFullURL() string
- func (request *Request) Harvest(batchCallback func(*Response))
- func (request *Request) HarvestIdentifiers(callback func(*Header))
- func (request *Request) HarvestRecords(callback func(*Record))
- func (request *Request) Perform() (oaiResponse *Response)
- type RequestNode
- type Response
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Description ¶
type Description struct {
Body []byte `xml:",innerxml"`
}
func (Description) GoString ¶
func (desc Description) GoString() string
Formatter for Description content
type Identify ¶
type Identify struct { RepositoryName string `xml:"repositoryName"` BaseURL string `xml:"baseURL"` ProtocolVersion string `xml:"protocolVersion"` AdminEmail []string `xml:"adminEmail"` EarliestDatestamp string `xml:"earliestDatestamp"` DeletedRecord string `xml:"deletedRecord"` Granularity string `xml:"granularity"` Description []Description `xml:"description"` }
type ListIdentifiers ¶
type ListMetadataFormats ¶
type ListMetadataFormats struct {
MetadataFormat []MetadataFormat `xml:"metadataFormat"`
}
type ListRecords ¶
type MetadataFormat ¶
type Request ¶
type Request struct { BaseURL string Set string MetadataPrefix string Verb string Identifier string ResumptionToken string From string Until string }
Request represents a request URL and query string to an OAI-PMH service
func (*Request) ChannelHarvestIdentifiers ¶
ChannelHarvestIdentifiers harvest the identifiers of a complete OAI set send a reference of each Header to a channel
func (*Request) GetFullURL ¶
GetFullURL represents the OAI Request in a string format
func (*Request) Harvest ¶
Harvest perform a harvest of a complete OAI set, or simply one request call the batchCallback function argument with the OAI responses
func (*Request) HarvestIdentifiers ¶
HarvestIdentifiers arvest the identifiers of a complete OAI set call the identifier callback function for each Header
func (*Request) HarvestRecords ¶
HarvestRecords harvest the identifiers of a complete OAI set call the identifier callback function for each Header
type RequestNode ¶
type Response ¶
type Response struct { ResponseDate string `xml:"responseDate"` Request RequestNode `xml:"request"` Error OAIError `xml:"error"` Identify Identify `xml:"Identify"` ListMetadataFormats ListMetadataFormats `xml:"ListMetadataFormats"` ListSets ListSets `xml:"ListSets"` GetRecord GetRecord `xml:"GetRecord"` ListIdentifiers ListIdentifiers `xml:"ListIdentifiers"` ListRecords ListRecords `xml:"ListRecords"` }
The struct representation of an OAI-PMH XML response
func (*Response) ResumptionToken ¶
ResumptionToken determine the resumption token in this Response
type Set ¶
type Set struct { SetSpec string `xml:"setSpec"` SetName string `xml:"setName"` SetDescription Description `xml:"setDescription"` }