Code Duplication    Length = 26-26 lines in 2 locations

src/ocrd_models/ocrd_page_generateds.py 2 locations

@@ 7947-7972 (lines=26) @@
7944
        if value is not None and 'comments' not in already_processed:
7945
            already_processed.add('comments')
7946
            self.comments = value
7947
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
7948
        if nodeName_ == 'UserDefined':
7949
            obj_ = UserDefinedType.factory(parent_object_=self)
7950
            obj_.build(child_, gds_collector_=gds_collector_)
7951
            self.UserDefined = obj_
7952
            obj_.original_tagname_ = 'UserDefined'
7953
        elif nodeName_ == 'Labels':
7954
            obj_ = LabelsType.factory(parent_object_=self)
7955
            obj_.build(child_, gds_collector_=gds_collector_)
7956
            self.Labels.append(obj_)
7957
            obj_.original_tagname_ = 'Labels'
7958
        elif nodeName_ == 'RegionRefIndexed':
7959
            obj_ = RegionRefIndexedType.factory(parent_object_=self)
7960
            obj_.build(child_, gds_collector_=gds_collector_)
7961
            self.RegionRefIndexed.append(obj_)
7962
            obj_.original_tagname_ = 'RegionRefIndexed'
7963
        elif nodeName_ == 'OrderedGroupIndexed':
7964
            obj_ = OrderedGroupIndexedType.factory(parent_object_=self)
7965
            obj_.build(child_, gds_collector_=gds_collector_)
7966
            self.OrderedGroupIndexed.append(obj_)
7967
            obj_.original_tagname_ = 'OrderedGroupIndexed'
7968
        elif nodeName_ == 'UnorderedGroupIndexed':
7969
            obj_ = UnorderedGroupIndexedType.factory(parent_object_=self)
7970
            obj_.build(child_, gds_collector_=gds_collector_)
7971
            self.UnorderedGroupIndexed.append(obj_)
7972
            obj_.original_tagname_ = 'UnorderedGroupIndexed'
7973
    def __hash__(self):
7974
        return hash(self.id)
7975
    # pylint: disable=invalid-name,missing-module-docstring,line-too-long
@@ 6984-7009 (lines=26) @@
6981
        if value is not None and 'comments' not in already_processed:
6982
            already_processed.add('comments')
6983
            self.comments = value
6984
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
6985
        if nodeName_ == 'UserDefined':
6986
            obj_ = UserDefinedType.factory(parent_object_=self)
6987
            obj_.build(child_, gds_collector_=gds_collector_)
6988
            self.UserDefined = obj_
6989
            obj_.original_tagname_ = 'UserDefined'
6990
        elif nodeName_ == 'Labels':
6991
            obj_ = LabelsType.factory(parent_object_=self)
6992
            obj_.build(child_, gds_collector_=gds_collector_)
6993
            self.Labels.append(obj_)
6994
            obj_.original_tagname_ = 'Labels'
6995
        elif nodeName_ == 'RegionRefIndexed':
6996
            obj_ = RegionRefIndexedType.factory(parent_object_=self)
6997
            obj_.build(child_, gds_collector_=gds_collector_)
6998
            self.RegionRefIndexed.append(obj_)
6999
            obj_.original_tagname_ = 'RegionRefIndexed'
7000
        elif nodeName_ == 'OrderedGroupIndexed':
7001
            obj_ = OrderedGroupIndexedType.factory(parent_object_=self)
7002
            obj_.build(child_, gds_collector_=gds_collector_)
7003
            self.OrderedGroupIndexed.append(obj_)
7004
            obj_.original_tagname_ = 'OrderedGroupIndexed'
7005
        elif nodeName_ == 'UnorderedGroupIndexed':
7006
            obj_ = UnorderedGroupIndexedType.factory(parent_object_=self)
7007
            obj_.build(child_, gds_collector_=gds_collector_)
7008
            self.UnorderedGroupIndexed.append(obj_)
7009
            obj_.original_tagname_ = 'UnorderedGroupIndexed'
7010
    def __hash__(self):
7011
        return hash(self.id)
7012
    # pylint: disable=invalid-name,missing-module-docstring,line-too-long