def getBibTeX(self, entryId): """ Convert an entry into its BibTeX reference. @type entryId: L{int} @param entryId: The I{id} of the entry. @rtype: L{str} @return: The BibTeX reference. """ dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId BibTeX_Ref = list(dictItem.items()) return BibTeX_Ref
def testsort_Otherwise(self): dictItem = EntryDict() ##. .. . . . . . returnme = self.ui.sort("Not Sorted") self.assertFalse(returnme, msg="Sort failed for incorrect unsorted field")
def testsearch_Fail(self): dictItem = EntryDict() ##. .. . . . . . returnme = self.ui.search("Fail") self.assertFalse(returnme, msg="DeleteEntry failed for incorrect entryId")
def testsearch_Success(self): dictItem = EntryDict() # ###. . . . . . . returnme = self.ui.search("Success") self.assertTrue(returnme, msg="Search failed for incorrect matched query")
def toEntryDict(self): e = EntryDict() e[EntryListColumn.ID] = self.getId() e[EntryListColumn.TYPE] = self.getEntryType() for field in self.requiredFields: col = FieldName.toEntryListColumn(field) e[col] = self.requiredFields[field] for field in self.optionalFields: col = FieldName.toEntryListColumn(field) e[col] = self.optionalFields[field] return e
def getEntry(self, entryId): """ Convert an entry into an L{EntryDict}. @type entryId: L{int} @param entryId: The I{id} of the entry. @rtype: L{EntryDict} @return: The entry. """ #raise NotImplementedError() dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId return dictItem
def getEntryPaperURL(self, entryId): """ Get the URL of the paper of the selected entry. @type entryId: L{int} @param entryId: The I{id} of the entry. @rtype: L{str} @return: The URL (or path) to the file. """ #raise NotImplementedError() dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId return dictItem[EntryListColumn.PAPER]
def previewEntry(self, entryId): """ Convert an entry into its HTML representation following the bibliography style specified in L{utils.settings.Preferences}. @type entryId: L{int} @param entryId: The I{id} of the entry to preview. @rtype: L{str} @return: The HTML representation of the entry. """ dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId self.HTML_Rep_entry = ", ".join(dictItem) return self.HTML_Rep_entry
def toEntryDict(self): e = EntryDict() e[EntryListColumn.ID] = self.getId() e[EntryListColumn.TYPE] = self.getEntryType() e[EntryListColumn.KEY] = self.getKey() for field in self.iterRequiredFields(): col = FieldName.toEntryListColumn(field) e[col] = self.requiredFields[field].getValue() for field in self.iterOptionalFields(): col = FieldName.toEntryListColumn(field) e[col] = self.optionalFields[field].getValue() for field in self.iterAdditionalFields(): col = FieldName.toEntryListColumn(field) e[col] = self.additionalFields[field].getValue() return e
def testsort_Success(self): dictItem = EntryDict() # ###. . . . . . . returnme = self.ui.sort("Sorted") self.assertTrue(returnme, msg="Sort failed for incorrect sorted field")
def testsearch_NoResult(self): dictItem = EntryDict() ##. .. . . . . . returnme = self.ui.search("") self.assertTrue(returnme, msg="Search failed for no result query")
def getEntryPaperURL(self, entryId): dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId return dictItem[EntryListColumn.PAPER]
def previewEntry(self, entryId): dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId self.HTML_Rep_entry = ", ".join(dictItem) return self.HTML_Rep_entry
def getBibTeX(self, entryId): dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId BibTeX_Ref = list(dictItem.items()) return BibTeX_Ref
def getEntry(self, entryId): dictItem = EntryDict() dictItem[EntryListColumn.ID] = entryId return dictItem