Code Duplication    Length = 14-14 lines in 2 locations

src/ocrd_models/ocrd_page_generateds.py 2 locations

@@ 9863-9876 (lines=14) @@
9860
            outfile.write(' conf="%s"' % self.gds_format_float(self.conf, input_name='conf'))
9861
    def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='AlternativeImageType', fromsubclass_=False, pretty_print=True):
9862
        pass
9863
    def to_etree(self, parent_element=None, name_='AlternativeImageType', mapping_=None, nsmap_=None):
9864
        if parent_element is None:
9865
            element = etree_.Element('{http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15}' + name_, nsmap=nsmap_)
9866
        else:
9867
            element = etree_.SubElement(parent_element, '{http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15}' + name_, nsmap=nsmap_)
9868
        if self.filename is not None:
9869
            element.set('filename', self.gds_format_string(self.filename))
9870
        if self.comments is not None:
9871
            element.set('comments', self.gds_format_string(self.comments))
9872
        if self.conf is not None:
9873
            element.set('conf', self.gds_format_float(self.conf))
9874
        if mapping_ is not None:
9875
            mapping_[id(self)] = element
9876
        return element
9877
    def build(self, node, gds_collector_=None):
9878
        self.gds_collector_ = gds_collector_
9879
        if SaveElementTreeNode:
@@ 2012-2025 (lines=14) @@
2009
            outfile.write(' comments=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.comments), input_name='comments')), ))
2010
    def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='LabelType', fromsubclass_=False, pretty_print=True):
2011
        pass
2012
    def to_etree(self, parent_element=None, name_='LabelType', mapping_=None, nsmap_=None):
2013
        if parent_element is None:
2014
            element = etree_.Element('{http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15}' + name_, nsmap=nsmap_)
2015
        else:
2016
            element = etree_.SubElement(parent_element, '{http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15}' + name_, nsmap=nsmap_)
2017
        if self.value is not None:
2018
            element.set('value', self.gds_format_string(self.value))
2019
        if self.type_ is not None:
2020
            element.set('type', self.gds_format_string(self.type_))
2021
        if self.comments is not None:
2022
            element.set('comments', self.gds_format_string(self.comments))
2023
        if mapping_ is not None:
2024
            mapping_[id(self)] = element
2025
        return element
2026
    def build(self, node, gds_collector_=None):
2027
        self.gds_collector_ = gds_collector_
2028
        if SaveElementTreeNode: