Code Duplication    Length = 11-11 lines in 2 locations

src/ocrd_models/ocrd_page_generateds.py 2 locations

@@ 11103-11113 (lines=11) @@
11100
        self.comments = comments
11101
    def get_extensiontype_(self): return self.extensiontype_
11102
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
11103
    def validate_indexType2(self, value):
11104
        # Validate type indexType2, a restriction on int.
11105
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
11106
            if not isinstance(value, int):
11107
                lineno = self.gds_get_node_lineno_()
11108
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
11109
                return False
11110
            if value < 0:
11111
                lineno = self.gds_get_node_lineno_()
11112
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on indexType2' % {"value": value, "lineno": lineno} )
11113
                result = False
11114
    def validate_charTypeType(self, value):
11115
        # Validate type charTypeType, a restriction on string.
11116
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
@@ 5776-5786 (lines=11) @@
5773
        return self.comments
5774
    def set_comments(self, comments):
5775
        self.comments = comments
5776
    def validate_indexType(self, value):
5777
        # Validate type indexType, a restriction on integer.
5778
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
5779
            if not isinstance(value, int):
5780
                lineno = self.gds_get_node_lineno_()
5781
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
5782
                return False
5783
            if value < 0:
5784
                lineno = self.gds_get_node_lineno_()
5785
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on indexType' % {"value": value, "lineno": lineno} )
5786
                result = False
5787
    def validate_ConfSimpleType(self, value):
5788
        # Validate type pc:ConfSimpleType, a restriction on float.
5789
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: