Model Module Documentation¶
-
class
model.Model(conn, master, local)[source]¶ Creates and maintains the MongoDb and Bibtex databases
-
mongo_local= None¶ define collection where I’ll insert my master files data
-
update(is_update, list_change, list_add)[source]¶ Update the mongodb collections Args:
is_update:Flag indicates if the user made any selections to update the current local file list_change: List of properties for each record that have different values on the master file and the local file list_add: List of properties for each record that are present on the master file but not on the local
-
-
model.add_property_db(list, db_coll)[source]¶ Update the records in the database collection with the values from the list Args:
list: List of properties for each record that are present on the master file but not on the local db_coll: database collection that will to be updated
-
model.change_property_db(list, db_coll)[source]¶ Update the records in the database collection with the modified values from the list Args:
list: List of properties for each record that have different values on the master file and the local file db_coll: database collection that will to be updated
-
model.delete_duplicates_from_collection(coll)[source]¶ Deletes duplicates entries from the collection Args:
coll: Mongo Database Collection
-
model.update_bibtex_mongoDB(is_update, bibdatabase, mongodb_coll)[source]¶ Updates the bibtex database by comparing the properties for each record with records from the mongo database Args:
is_update:Flag indicates if the user made any selections to update the current local file bibdatabase: Bibtex database that needs to be updated mongodb_coll:Mongo database collection