ScopusRecord(ExtendedRecord)¶
-
class
metaknowledge.scopus.
ScopusRecord
(inRecord, sFile='', sLine=0, header=None)¶ Class for full Scopus entries.
This class is an ExtendedRecord capable of generating its own id number. You should not create them directly, but instead use scopusParser() on a scopus CSV file.
-
__init__
(inRecord, sFile='', sLine=0, header=None)¶ Base constructor for Records
fieldDict : is the unpared entry dict with tags as keys and their lines as a list of strings
idValue : is the unique ID of the Record, e.g. the WOS number
titleKey : is the tag giving the title of the Record, e.g. the WOS tag is
'TI'
bad : is the bool to flag the Record as having encountered an errror
error : is the error that bad indicates
sFile : is the name of the source file
sLine : is the line number of the start of the Record entry
altNames : is a dict that maps the names of tags to an alternative name, i.e. the long names dict. It must be bidirectional: map long to short and short to long
proccessingFuncs : is a dict of functions to proccess the tags. It has the short names as keys and their proccessing fucntions as values. Missing tags will result in the unparsed value to be returned.
The Records inheting from this must implement, calling the implementations in Record with super() will not cause errors:
- writeRecord
- tagProcessingFunc
- encoding
- titleTag
- getAltName
-
createCitation
(multiCite=False)¶ Overwriting the general citation creator to deal with scopus weirdness.
Creates a citation string, using the same format as other WOS citations, for the Record by reading the relevant special tags (
'year'
,'J9'
,'volume'
,'beginningPage'
,'DOI'
) and using it to create a Citation object.Parameters¶
multiCite :
optional [bool]
DefaultFalse
, ifTrue
a tuple of Citations is returned with each having a different one of the records authors as the author
-
encoding
()¶ An
abstractmethod
, gives the encoding string of the record.
-
static
getAltName
(tag)¶ An
abstractmethod
, gives the alternate name of tag orNone
-
specialFuncs
(key)¶ An
abstractmethod
, process the special tag, key using the wholeRecord
Parameters¶
key :
str
One of the special tags:'authorsFull'
,'keywords'
,'grants'
,'j9'
,'authorsShort'
,'volume'
,'selfCitation'
,'citations'
,'address'
,'abstract'
,'title'
,'month'
,'year'
,'journal'
,'beginningPage'
and'DOI'
Returns¶
The processed value of key
-
static
tagProcessingFunc
(tag)¶ An
abstractmethod
, gives the function for processing tag
-
writeRecord
(f)¶ An
abstractmethod
, writes the record in its original form to infile
-