12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- class Filter(object):
-
- def getTitle (self, csvRow):
- return csvRow[self.getTitleField()]
-
- def getAbstract (self, csvRow):
- return csvRow[self.getAbstractField()]
-
- def getAuthors (self, csvRow):
- return csvRow[self.getAuthorsField()]
-
- def getKeywordExtra (self, csvRow):
- if self.getKeywordExtraField() in csvRow:
- return csvRow[self.getKeywordExtraField()]
- else:
- return ''
-
- def getKeyword (self, csvRow):
- return csvRow[self.getKeywordField()]
-
- def getDOI (self, csvRow):
- return csvRow[self.getDOIField()]
-
- def getCSVData (self, csvRow):
- title = self.getTitle(csvRow)
- authors = self.getAuthors(csvRow)
- abstract = self.getAbstract(csvRow)
- keyword = self.getKeyword(csvRow)
- doi = self.getDOI(csvRow)
- keywordExtra = self.getKeywordExtra(csvRow)
- return [title, abstract, authors, doi, keyword, keywordExtra]
-
- def getAbstractField (self):
- raise NotImplementedError
-
- def getTitleField (self):
- raise NotImplementedError
-
- def getAuthorsField (self):
- raise NotImplementedError
-
- def getKeywordField (self):
- raise NotImplementedError
-
- def getKeywordExtraField (self):
- raise NotImplementedError
-
- def getDOIField (self):
- raise NotImplementedError
|