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
Esempio n. 2
0
    def testsort_Otherwise(self):

        dictItem = EntryDict()
        ##. .. . . . . .
        returnme = self.ui.sort("Not Sorted")
        self.assertFalse(returnme,
                         msg="Sort failed for incorrect unsorted field")
Esempio n. 3
0
    def testsearch_Fail(self):

        dictItem = EntryDict()
        ##. .. . . . . .
        returnme = self.ui.search("Fail")
        self.assertFalse(returnme,
                         msg="DeleteEntry failed for incorrect entryId")
Esempio n. 4
0
    def testsearch_Success(self):

        dictItem = EntryDict()
        # ###. . . . . . .
        returnme = self.ui.search("Success")
        self.assertTrue(returnme,
                        msg="Search failed for incorrect matched query")
Esempio n. 5
0
 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
Esempio n. 9
0
 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
Esempio n. 10
0
    def testsort_Success(self):

        dictItem = EntryDict()
        # ###. . . . . . .
        returnme = self.ui.sort("Sorted")
        self.assertTrue(returnme, msg="Sort failed for incorrect sorted field")
Esempio n. 11
0
    def testsearch_NoResult(self):

        dictItem = EntryDict()
        ##. .. . . . . .
        returnme = self.ui.search("")
        self.assertTrue(returnme, msg="Search failed for no result query")
Esempio n. 12
0
 def getEntryPaperURL(self, entryId):
     dictItem = EntryDict()
     dictItem[EntryListColumn.ID] = entryId
     return dictItem[EntryListColumn.PAPER]
Esempio n. 13
0
 def previewEntry(self, entryId):
     dictItem = EntryDict()
     dictItem[EntryListColumn.ID] = entryId
     self.HTML_Rep_entry = ", ".join(dictItem)
     return self.HTML_Rep_entry
Esempio n. 14
0
 def getBibTeX(self, entryId):
     dictItem = EntryDict()
     dictItem[EntryListColumn.ID] = entryId
     BibTeX_Ref = list(dictItem.items())
     return BibTeX_Ref
Esempio n. 15
0
 def getEntry(self, entryId):
     dictItem = EntryDict()
     dictItem[EntryListColumn.ID] = entryId
     return dictItem