+# class to save/restore data from a BiaCV file and to export BiaCV to different
+# formats
+
+import json
+
+class BiaCVData:
+ def __init__ (self):
+ # initialize the data to an empty dictionary
+ self.data = {}
+
+ # save the data into a file
+ def save_data (self, filepath):
+ json.dump (self.data, file (filepath, "w"), indent=4)
+
+ # set the document title
+ def set_document_title (self, title):
+ self.data["title"] = title
+
+ # set personal information from gui
+ def set_personal_info (self, nametitle, firstname, lastname, dateofbirth,
+ street, area, city, areacode, countrycode_landline, landline,
+ countrycode_mobile, mobile, email, maritalstatus):
+ self.data["nametitle"] = nametitle
+ self.data["firstname"] = firstname
+ self.data["lastname"] = lastname
+ self.data["dateofbirth"] = dateofbirth
+ self.data["street"] = street
+ self.data["area"] = area
+ self.data["city"] = city
+ self.data["areacode"] = areacode
+ self.data["countrycode_landline"] = countrycode_landline
+ self.data["landline"] = landline
+ self.data["countrycode_mobile"] = countrycode_mobile
+ self.data["mobile"] = mobile
+ self.data["email"] = email
+ self.data["maritalstatus"] = maritalstatus
+
+ # set the educational qualifications
+ def set_educational_qualifications (self, listofqualifications):
+ self.data["educationalqualifications"] = listofqualifications
+
+ # set the professional history
+ def set_professional_history (self, listofprofessionalhistory):
+ self.data["professionalhistory"] = listofprofessionalhistory
+
+ # set the career objectives
+ def set_career_objectives (self, listofshortterm, listoflongterm):
+ self.data["shorttermobjectives"] = listofshortterm
+ self.data["longtermgoals"] = listoflongterm
+
+ # set the skill sets
+ def set_skillsets (self, listofskills):
+ self.data["skillsets"] = listofskills
+
+ # set the additional information
+ def set_additional_information (self, listoflanguages, additionalinformation):
+ self.data["languagesknown"] = listoflanguages
+ self.data["additionalinformation"] = additionalinformation