Code Duplication    Length = 11-11 lines in 2 locations

src/ocrd_models/ocrd_page_generateds.py 2 locations

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