Documentation ¶
Index ¶
- Constants
- type Description
- type Error
- type ErrorCodeType
- type GetRecord
- type Identifier
- type Identify
- type ListIdentifiers
- type ListMetadataFormats
- type ListRecords
- type ListSets
- type Metadata
- type MetadataFormat
- type OAIPMH
- type Record
- type RecordAbout
- type RecordAboutProvenance
- type RecordAboutProvenanceOriginDescription
- type RecordHeader
- type RecordHeaderStatusType
- type Request
- type ResumptionToken
- type Set
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 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 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 ResumptionToken ¶
Click to show internal directories.
Click to hide internal directories.