def __init__(self, file): Group.__init__(self, 'medit-project') if file is not None: self.load_xml(file.root) self.name = file.name self.type = file.project_type self.version = file.version
def get_xml(self): xml = Group.save(self) if xml: xml = xml[0] else: xml = XMLGroup('medit-project') xml.set_attr('name', self.name) xml.set_attr('type', self.type) xml.set_attr('version', self.version) return xml
def load_xml(self, xml): Group.load(self, xml)
def copy_from(self, other): self.name = other.name self.type = other.type self.version = other.version return Group.copy_from(self, other)