Documentation
¶
Overview ¶
Copyright 2015 by Leipzig University Library, http://ub.uni-leipzig.de
The Finc Authors, http://finc.info
Martin Czygan, <martin.czygan@uni-leipzig.de>
This file is part of some open source application.
Some open source application is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Some open source application is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.
@license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
Directory of open access journals.
Index ¶
- Constants
- Variables
- type Author
- type BibJSON
- type DOAJ
- func (s DOAJ) Iterate(r io.Reader) (<-chan []span.Importer, error)
- func (mj *DOAJ) MarshalJSON() ([]byte, error)
- func (mj *DOAJ) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (uj *DOAJ) UnmarshalJSON(input []byte) error
- func (uj *DOAJ) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Document
- func (doc Document) Authors() (authors []finc.Author)
- func (doc Document) DOI() string
- func (doc Document) Date() (time.Time, error)
- func (mj *Document) MarshalJSON() ([]byte, error)
- func (mj *Document) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (doc Document) ToIntermediateSchema() (*finc.IntermediateSchema, error)
- func (uj *Document) UnmarshalJSON(input []byte) error
- func (uj *Document) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Identifier
- type Index
- type Journal
- type License
- type Link
- type Response
- type Subject
Constants ¶
const ( // Internal bookkeeping. SourceID = "28" // Collection name Collection = "DOAJ Directory of Open Access Journals" // Format for all records Format = "ElectronicArticle" Genre = "article" )
Variables ¶
var ( LCCPatterns = assetutil.MustLoadRegexpMap("assets/finc/lcc.json") LanguageMap = assetutil.MustLoadStringMap("assets/doaj/language-iso-639-3.json") )
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct {
Name string `json:"name"`
}
func (*Author) MarshalJSON ¶ added in v0.1.84
func (*Author) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Author) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Author) UnmarshalJSON ¶ added in v0.1.84
func (*Author) UnmarshalJSONFFLexer ¶ added in v0.1.84
type BibJSON ¶
type BibJSON struct {
Abstract string `json:"abstract"`
Author []Author `json:"author"`
EndPage string `json:"end_page"`
Identifier []Identifier `json:"identifier"`
Journal Journal `json:"journal"`
Link []Link `json:"link"`
Month string `json:"month"`
StartPage string `json:"start_page"`
Subject []Subject `json:"subject"`
Title string `json:"title"`
Year string `json:"year"`
}
func (*BibJSON) MarshalJSON ¶ added in v0.1.84
func (*BibJSON) MarshalJSONBuf ¶ added in v0.1.84
func (mj *BibJSON) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*BibJSON) UnmarshalJSON ¶ added in v0.1.84
func (*BibJSON) UnmarshalJSONFFLexer ¶ added in v0.1.84
type DOAJ ¶
type DOAJ struct{}
func (*DOAJ) MarshalJSON ¶ added in v0.1.84
func (*DOAJ) MarshalJSONBuf ¶ added in v0.1.84
func (mj *DOAJ) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*DOAJ) UnmarshalJSON ¶ added in v0.1.84
func (*DOAJ) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Document ¶
type Document struct {
BibJson BibJSON `json:"bibjson"`
Created string `json:"created_date"`
ID string `json:"id"`
Index Index `json:"index"`
Updated string `json:"last_updated"`
// make Response.Type available here
Type string
}
func (Document) Date ¶
Date return the document date. Journals entries usually have no date, so they will err.
func (*Document) MarshalJSON ¶ added in v0.1.84
func (*Document) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Document) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (Document) ToIntermediateSchema ¶
func (doc Document) ToIntermediateSchema() (*finc.IntermediateSchema, error)
ToIntermediateSchema converts a doaj document to intermediate schema. For now any record, that has no usable date will be skipped.
func (*Document) UnmarshalJSON ¶ added in v0.1.84
func (*Document) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Identifier ¶
func (*Identifier) MarshalJSON ¶ added in v0.1.84
func (mj *Identifier) MarshalJSON() ([]byte, error)
func (*Identifier) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Identifier) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Identifier) UnmarshalJSON ¶ added in v0.1.84
func (uj *Identifier) UnmarshalJSON(input []byte) error
func (*Identifier) UnmarshalJSONFFLexer ¶ added in v0.1.84
func (uj *Identifier) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
type Index ¶
type Index struct {
Classification []string `json:"classification"`
Country string `json:"country"`
Date string `json:"date"`
ISSN []string `json:"issn"`
Language []string `json:"language"`
License []string `json:"license"`
Publishers []string `json:"publisher"`
SchemaCode []string `json:"schema_code"`
SchemaSubjects []string `json:"schema_subjects"`
Subjects []string `json:"subject"`
}
func (*Index) MarshalJSON ¶ added in v0.1.84
func (*Index) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Index) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Index) UnmarshalJSON ¶ added in v0.1.84
func (*Index) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Journal ¶
type Journal struct {
Country string `json:"country"`
Language []string `json:"language"`
License []License `json:"license"`
Number string `json:"number"`
Publisher string `json:"publisher"`
Title string `json:"title"`
Volume string `json:"volume"`
}
func (*Journal) MarshalJSON ¶ added in v0.1.84
func (*Journal) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Journal) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Journal) UnmarshalJSON ¶ added in v0.1.84
func (*Journal) UnmarshalJSONFFLexer ¶ added in v0.1.84
type License ¶
func (*License) MarshalJSON ¶ added in v0.1.84
func (*License) MarshalJSONBuf ¶ added in v0.1.84
func (mj *License) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*License) UnmarshalJSON ¶ added in v0.1.84
func (*License) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Link ¶
func (*Link) MarshalJSON ¶ added in v0.1.84
func (*Link) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Link) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Link) UnmarshalJSON ¶ added in v0.1.84
func (*Link) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Response ¶
type Response struct {
ID string `json:"_id"`
Index string `json:"_index"`
Source Document `json:"_source"`
Type string `json:"_type"`
}
func (*Response) MarshalJSON ¶ added in v0.1.84
func (*Response) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Response) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Response) UnmarshalJSON ¶ added in v0.1.84
func (*Response) UnmarshalJSONFFLexer ¶ added in v0.1.84
type Subject ¶
type Subject struct {
Code string `json:"code"`
Scheme string `json:"scheme"`
Term string `json:"term"`
}
func (*Subject) MarshalJSON ¶ added in v0.1.84
func (*Subject) MarshalJSONBuf ¶ added in v0.1.84
func (mj *Subject) MarshalJSONBuf(buf fflib.EncodingBuffer) error