Demo entry 6347794

ausen

   

Submitted by ausen on Feb 16, 2017 at 21:15
Language: Python 3. Code size: 15.7 kB.

class AussenschubkastenType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Name=None, Schubkastenart=None, Auszugslaenge=None, Beschlaege=None, Front=None, Holzschubkasten=None, GlasBoxside=None, Eckblende=None, Verbindungsstueck=None, Boden=None, Rueckwand=None, EINSCHUBELEMENT_BCO=None, EINSCHUBELEMENT_antaro=None, Innenschubkasten=None, Zwischenstueck=None):
        self.original_tagname_ = None
        self.Name = _cast(None, Name)
        self.Schubkastenart = _cast(None, Schubkastenart)
        self.Auszugslaenge = _cast(float, Auszugslaenge)
        self.Beschlaege = Beschlaege
        if Front is None:
            self.Front = []
        else:
            self.Front = Front
        self.Holzschubkasten = Holzschubkasten
        if GlasBoxside is None:
            self.GlasBoxside = []
        else:
            self.GlasBoxside = GlasBoxside
        self.Eckblende = Eckblende
        if Verbindungsstueck is None:
            self.Verbindungsstueck = []
        else:
            self.Verbindungsstueck = Verbindungsstueck
        if Boden is None:
            self.Boden = []
        else:
            self.Boden = Boden
        if Rueckwand is None:
            self.Rueckwand = []
        else:
            self.Rueckwand = Rueckwand
        if EINSCHUBELEMENT_BCO is None:
            self.EINSCHUBELEMENT_BCO = []
        else:
            self.EINSCHUBELEMENT_BCO = EINSCHUBELEMENT_BCO
        if EINSCHUBELEMENT_antaro is None:
            self.EINSCHUBELEMENT_antaro = []
        else:
            self.EINSCHUBELEMENT_antaro = EINSCHUBELEMENT_antaro
        if Innenschubkasten is None:
            self.Innenschubkasten = []
        else:
            self.Innenschubkasten = Innenschubkasten
        self.Zwischenstueck = Zwischenstueck
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, AussenschubkastenType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if AussenschubkastenType.subclass:
            return AussenschubkastenType.subclass(*args_, **kwargs_)
        else:
            return AussenschubkastenType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Beschlaege(self): return self.Beschlaege
    def set_Beschlaege(self, Beschlaege): self.Beschlaege = Beschlaege
    def get_Front(self): return self.Front
    def set_Front(self, Front): self.Front = Front
    def add_Front(self, value): self.Front.append(value)
    def insert_Front_at(self, index, value): self.Front.insert(index, value)
    def replace_Front_at(self, index, value): self.Front[index] = value
    def get_Holzschubkasten(self): return self.Holzschubkasten
    def set_Holzschubkasten(self, Holzschubkasten): self.Holzschubkasten = Holzschubkasten
    def get_GlasBoxside(self): return self.GlasBoxside
    def set_GlasBoxside(self, GlasBoxside): self.GlasBoxside = GlasBoxside
    def add_GlasBoxside(self, value): self.GlasBoxside.append(value)
    def insert_GlasBoxside_at(self, index, value): self.GlasBoxside.insert(index, value)
    def replace_GlasBoxside_at(self, index, value): self.GlasBoxside[index] = value
    def get_Eckblende(self): return self.Eckblende
    def set_Eckblende(self, Eckblende): self.Eckblende = Eckblende
    def get_Verbindungsstueck(self): return self.Verbindungsstueck
    def set_Verbindungsstueck(self, Verbindungsstueck): self.Verbindungsstueck = Verbindungsstueck
    def add_Verbindungsstueck(self, value): self.Verbindungsstueck.append(value)
    def insert_Verbindungsstueck_at(self, index, value): self.Verbindungsstueck.insert(index, value)
    def replace_Verbindungsstueck_at(self, index, value): self.Verbindungsstueck[index] = value
    def get_Boden(self): return self.Boden
    def set_Boden(self, Boden): self.Boden = Boden
    def add_Boden(self, value): self.Boden.append(value)
    def insert_Boden_at(self, index, value): self.Boden.insert(index, value)
    def replace_Boden_at(self, index, value): self.Boden[index] = value
    def get_Rueckwand(self): return self.Rueckwand
    def set_Rueckwand(self, Rueckwand): self.Rueckwand = Rueckwand
    def add_Rueckwand(self, value): self.Rueckwand.append(value)
    def insert_Rueckwand_at(self, index, value): self.Rueckwand.insert(index, value)
    def replace_Rueckwand_at(self, index, value): self.Rueckwand[index] = value
    def get_EINSCHUBELEMENT_BCO(self): return self.EINSCHUBELEMENT_BCO
    def set_EINSCHUBELEMENT_BCO(self, EINSCHUBELEMENT_BCO): self.EINSCHUBELEMENT_BCO = EINSCHUBELEMENT_BCO
    def add_EINSCHUBELEMENT_BCO(self, value): self.EINSCHUBELEMENT_BCO.append(value)
    def insert_EINSCHUBELEMENT_BCO_at(self, index, value): self.EINSCHUBELEMENT_BCO.insert(index, value)
    def replace_EINSCHUBELEMENT_BCO_at(self, index, value): self.EINSCHUBELEMENT_BCO[index] = value
    def get_EINSCHUBELEMENT_antaro(self): return self.EINSCHUBELEMENT_antaro
    def set_EINSCHUBELEMENT_antaro(self, EINSCHUBELEMENT_antaro): self.EINSCHUBELEMENT_antaro = EINSCHUBELEMENT_antaro
    def add_EINSCHUBELEMENT_antaro(self, value): self.EINSCHUBELEMENT_antaro.append(value)
    def insert_EINSCHUBELEMENT_antaro_at(self, index, value): self.EINSCHUBELEMENT_antaro.insert(index, value)
    def replace_EINSCHUBELEMENT_antaro_at(self, index, value): self.EINSCHUBELEMENT_antaro[index] = value
    def get_Innenschubkasten(self): return self.Innenschubkasten
    def set_Innenschubkasten(self, Innenschubkasten): self.Innenschubkasten = Innenschubkasten
    def add_Innenschubkasten(self, value): self.Innenschubkasten.append(value)
    def insert_Innenschubkasten_at(self, index, value): self.Innenschubkasten.insert(index, value)
    def replace_Innenschubkasten_at(self, index, value): self.Innenschubkasten[index] = value
    def get_Zwischenstueck(self): return self.Zwischenstueck
    def set_Zwischenstueck(self, Zwischenstueck): self.Zwischenstueck = Zwischenstueck
    def get_Name(self): return self.Name
    def set_Name(self, Name): self.Name = Name
    def get_Schubkastenart(self): return self.Schubkastenart
    def set_Schubkastenart(self, Schubkastenart): self.Schubkastenart = Schubkastenart
    def get_Auszugslaenge(self): return self.Auszugslaenge
    def set_Auszugslaenge(self, Auszugslaenge): self.Auszugslaenge = Auszugslaenge
    def hasContent_(self):
        if (
            self.Beschlaege is not None or
            self.Front or
            self.Holzschubkasten is not None or
            self.GlasBoxside or
            self.Eckblende is not None or
            self.Verbindungsstueck or
            self.Boden or
            self.Rueckwand or
            self.EINSCHUBELEMENT_BCO or
            self.EINSCHUBELEMENT_antaro or
            self.Innenschubkasten or
            self.Zwischenstueck is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AussenschubkastenType', namespacedef_='', pretty_print=True):
        self.DrawTT() # For K3Mebel add
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AussenschubkastenType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AussenschubkastenType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
            self.GroupChildObjectK3() # For K3Mebel add
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AussenschubkastenType'):
        if self.Name is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))
        if self.Schubkastenart is not None and 'Schubkastenart' not in already_processed:
            already_processed.add('Schubkastenart')
            outfile.write(' Schubkastenart=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Schubkastenart), input_name='Schubkastenart')), ))
        if self.Auszugslaenge is not None and 'Auszugslaenge' not in already_processed:
            already_processed.add('Auszugslaenge')
            outfile.write(' Auszugslaenge="%s"' % self.gds_format_double(self.Auszugslaenge, input_name='Auszugslaenge'))
    def exportChildren(self, outfile, level, namespace_='', name_='AussenschubkastenType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Beschlaege is not None:
            self.Beschlaege.export(outfile, level, namespace_, name_='Beschlaege', pretty_print=pretty_print)
        for Front_ in self.Front:
            Front_.export(outfile, level, namespace_, name_='Front', pretty_print=pretty_print)
        if self.Holzschubkasten is not None:
            self.Holzschubkasten.export(outfile, level, namespace_, name_='Holzschubkasten', pretty_print=pretty_print)
        for GlasBoxside_ in self.GlasBoxside:
            GlasBoxside_.export(outfile, level, namespace_, name_='GlasBoxside', pretty_print=pretty_print)
        if self.Eckblende is not None:
            self.Eckblende.export(outfile, level, namespace_, name_='Eckblende', pretty_print=pretty_print)
        for Verbindungsstueck_ in self.Verbindungsstueck:
            Verbindungsstueck_.export(outfile, level, namespace_, name_='Verbindungsstueck', pretty_print=pretty_print)
        for Boden_ in self.Boden:
            Boden_.export(outfile, level, namespace_, name_='Boden', pretty_print=pretty_print)
        for Rueckwand_ in self.Rueckwand:
            Rueckwand_.export(outfile, level, namespace_, name_='Rueckwand', pretty_print=pretty_print)
        for EINSCHUBELEMENT_BCO_ in self.EINSCHUBELEMENT_BCO:
            EINSCHUBELEMENT_BCO_.export(outfile, level, namespace_, name_='EINSCHUBELEMENT_BCO', pretty_print=pretty_print)
        for EINSCHUBELEMENT_antaro_ in self.EINSCHUBELEMENT_antaro:
            EINSCHUBELEMENT_antaro_.export(outfile, level, namespace_, name_='EINSCHUBELEMENT_antaro', pretty_print=pretty_print)
        for Innenschubkasten_ in self.Innenschubkasten:
            Innenschubkasten_.export(outfile, level, namespace_, name_='Innenschubkasten', pretty_print=pretty_print)
        if self.Zwischenstueck is not None:
            self.Zwischenstueck.export(outfile, level, namespace_, name_='Zwischenstueck', pretty_print=pretty_print)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Name', node)
        if value is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            self.Name = value
        value = find_attr_value_('Schubkastenart', node)
        if value is not None and 'Schubkastenart' not in already_processed:
            already_processed.add('Schubkastenart')
            self.Schubkastenart = value
        value = find_attr_value_('Auszugslaenge', node)
        if value is not None and 'Auszugslaenge' not in already_processed:
            already_processed.add('Auszugslaenge')
            try:
                self.Auszugslaenge = float(value)
            except ValueError as exp:
                raise ValueError('Bad float/double attribute (Auszugslaenge): %s' % exp)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Beschlaege':
            obj_ = BeschlaegeType.factory()
            obj_.build(child_)
            self.Beschlaege = obj_
            obj_.original_tagname_ = 'Beschlaege'
        elif nodeName_ == 'Front':
            obj_ = FrontType.factory()
            obj_.build(child_)
            self.Front.append(obj_)
            obj_.original_tagname_ = 'Front'
        elif nodeName_ == 'Holzschubkasten':
            obj_ = HolzschubkastenType.factory()
            obj_.build(child_)
            self.Holzschubkasten = obj_
            obj_.original_tagname_ = 'Holzschubkasten'
        elif nodeName_ == 'GlasBoxside':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.GlasBoxside.append(obj_)
            obj_.original_tagname_ = 'GlasBoxside'
        elif nodeName_ == 'Eckblende':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Eckblende = obj_
            obj_.original_tagname_ = 'Eckblende'
        elif nodeName_ == 'Verbindungsstueck':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Verbindungsstueck.append(obj_)
            obj_.original_tagname_ = 'Verbindungsstueck'
        elif nodeName_ == 'Boden':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Boden.append(obj_)
            obj_.original_tagname_ = 'Boden'
        elif nodeName_ == 'Rueckwand':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Rueckwand.append(obj_)
            obj_.original_tagname_ = 'Rueckwand'
        elif nodeName_ == 'EINSCHUBELEMENT_BCO':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.EINSCHUBELEMENT_BCO.append(obj_)
            obj_.original_tagname_ = 'EINSCHUBELEMENT_BCO'
        elif nodeName_ == 'EINSCHUBELEMENT_antaro':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.EINSCHUBELEMENT_antaro.append(obj_)
            obj_.original_tagname_ = 'EINSCHUBELEMENT_antaro'
        elif nodeName_ == 'Innenschubkasten':
            obj_ = InnenschubkastenType.factory()
            obj_.build(child_)
            self.Innenschubkasten.append(obj_)
            obj_.original_tagname_ = 'Innenschubkasten'
        elif nodeName_ == 'Zwischenstueck':
            class_obj_ = self.get_class_obj_(child_, GeometryType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Zwischenstueck = obj_
            obj_.original_tagname_ = 'Zwischenstueck'
# end class AussenschubkastenType

This snippet took 0.03 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).