def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("department") xml_obj.add("name", self.name) xml_obj.add("website", self.website) xml_obj.add("course_prefix", self.course_prefix) xml_obj.add("faculty_id", self.faculty_id) xml_obj.add("id", self.id) return xml_obj
def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("teaching_staff") xml_obj.add('position', self.position) xml_obj.add('department_id', self.department_id) xml_obj.add('net_id', self.id) xml_obj.add('is_ta', "0") return xml_obj
def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("person") xml_obj.add("first_name", self.first_name) xml_obj.add("last_name", self.last_name) xml_obj.add("net_id", self.id) xml_obj.add("salutation", self.salutation) return xml_obj
def to_xml_obj(self): xml_obj = XmlObject("web_links") xml_obj.add("name", self.name) xml_obj.add("link_url", self.link_url) xml_obj.add("link_name", self.link_name) xml_obj.add("service_id", self.service_id) return xml_obj
def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("faculty") xml_obj.add("name", self.name) xml_obj.add("website", self.website) xml_obj.add("dean_id", self.dean_id) xml_obj.add("id", self.id) return xml_obj
def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("program") xml_obj.add('name', self.name) xml_obj.add('level', self.level) xml_obj.add("web_page", self.web_page) xml_obj.add("faculty_id", self.faculty_id) xml_obj.add("department_id", self.department_id) xml_obj.add('campus_id', self.department_id) xml_obj.add('id', self.id) return xml_obj
def to_xml_obj(self): xml_obj = XmlObject("event") xml_obj.add("id", self.id) xml_obj.add("name", self.name) start_date_time = "" end_date_time = "" try: dt_obj = datetime.strptime(self.start_date_time, "%A %B %d, %Y - %I:%M %p") start_date_time = dt_obj.strftime("%Y-%m-%d %H:%M:%S") except Exception: pass try: dt_obj = datetime.strptime(self.end_date_time, "%A %B %d, %Y - %I:%M %p") end_date_time = dt_obj.strftime("%Y-%m-%d %H:%M:%S") except Exception: pass xml_obj.add("start_date_time", start_date_time) xml_obj.add("end_date_time", end_date_time) xml_obj.add("web_link", self.link) xml_obj.add("location", self.location) xml_obj.add("category", self.category) xml_obj.add("description", self.description) xml_obj.add("cost", self.cost) xml_obj.add("building_id", self.building_id) return xml_obj
def to_xml_obj(self) -> XmlObject: obj = XmlObject("building") obj.add("name", self.name) obj.add("id", self.id) obj.add("campus_id", self.campus_id) obj.add("address", self.address) obj.add("description", self.description) obj.add("image_url", self.image_url) for key in self.amenities: new_key = key.replace(" ", "_").lower() obj.add(new_key, self.amenities.get(key)) return obj
def to_xml_obj(self): xml_obj = XmlObject("campus_service") xml_obj.add("name", self.name) xml_obj.add("web_page_url", self.web_page_url) xml_obj.add("id", self.id) return xml_obj
def to_xml_obj(self) -> XmlObject: xml_obj = XmlObject("library") xml_obj.add("name", self.name) xml_obj.add("website", self.website) xml_obj.add("note", self.note) xml_obj.add("address", self.address) xml_obj.add("id", self.id) xml_obj.add("building_id", self.building_id) return xml_obj