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+>
Index ¶
- Constants
- type Document
- func (doc Document) Authors() (authors []finc.Author)
- func (doc Document) Date() (time.Time, error)
- func (doc Document) FincID() string
- func (doc Document) Headings() []string
- func (doc Document) ISSNList() []string
- func (doc Document) Languages() []string
- func (doc Document) SourceAndID() string
- func (doc Document) ToIntermediateSchema() (*finc.IntermediateSchema, error)
- func (doc Document) URL() string
Constants ¶
const ( // SourceID for internal bookkeeping. SourceID = "48" // Format is mapped per site later. Format = "ElectronicArticle" // Collection is the base name of the collection. Collection = "Genios" // Genre default. Genre = "article" // DefaultRefType is the default ris.type. DefaultRefType = "EJOUR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { ID string `xml:"ID,attr"` DB string `xml:"DB,attr"` IDNAME string `xml:"IDNAME,attr"` ISSN string `xml:"ISSN"` Source string `xml:"Source"` PublicationTitle string `xml:"Publication-Title"` Title string `xml:"Title"` Year string `xml:"Year"` RawDate string `xml:"Date"` Volume string `xml:"Volume"` Issue string `xml:"Issue"` RawAuthors []string `xml:"Authors>Author"` Language string `xml:"Language"` Abstract string `xml:"Abstract"` Descriptors string `xml:"Descriptors>Descriptor"` Text string `xml:"Text"` Modules []string `xml:"Modules>Module"` }
Document represents a Genios document.
func (Document) Authors ¶
Authors returns a list of authors. Formatting is not cleaned up, so you'll get any combination of surname and given names.
func (Document) Date ¶
Date returns the date as noted in the document. There might be two values: Date and Year. Defaults to Year, fallback to Date, refs #12193.
func (Document) Languages ¶
Languages returns the given and guessed languages found in abstract and fulltext. Note: This is slow. Skip detection on too short strings.
func (Document) SourceAndID ¶
SourceAndID will probably be a unique identifier. An ID alone might not be enough.
func (Document) ToIntermediateSchema ¶
func (doc Document) ToIntermediateSchema() (*finc.IntermediateSchema, error)
ToIntermediateSchema converts a genios document into an intermediate schema document. Will fail/skip records with unusable dates.