def createDocumentWithAbstract(self, document_id, document_year, document_title, document_author, currentFile, bucketId): # Create a document document_path = self.root_path + "/nips" + bucketId document = Document(document_id, document_year, document_title, document_author, currentFile, document_path) # Create an Abstract abstract_text = self.getAbstract(document) abstract = Abstract(document.document_id, document.year, abstract_text) # Link a Document to it's abstract document.abstract = abstract # Store the Document and the abstract in memory. self.documents.append(document) self.abstracts.append(abstract)