Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 def load_xml(self, xml):
     Group.load(self, xml)
Beispiel #4
0
 def copy_from(self, other):
     self.name = other.name
     self.type = other.type
     self.version = other.version
     return Group.copy_from(self, other)