Code Duplication    Length = 15-15 lines in 6 locations

src/ocrd_models/ocrd_page_generateds.py 6 locations

@@ 10713-10727 (lines=15) @@
10710
        return self.conf
10711
    def set_conf(self, conf):
10712
        self.conf = conf
10713
    def validate_ConfSimpleType(self, value):
10714
        # Validate type pc:ConfSimpleType, a restriction on float.
10715
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
10716
            if not isinstance(value, float):
10717
                lineno = self.gds_get_node_lineno_()
10718
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
10719
                return False
10720
            if value < 0:
10721
                lineno = self.gds_get_node_lineno_()
10722
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
10723
                result = False
10724
            if value > 1:
10725
                lineno = self.gds_get_node_lineno_()
10726
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
10727
                result = False
10728
    def has__content(self):
10729
        if (
10730
@@ 8928-8942 (lines=15) @@
8925
                    self.validate_PointsType_patterns_, value):
8926
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_PointsType_patterns_, ))
8927
    validate_PointsType_patterns_ = [['^(([0-9]+,[0-9]+ )+([0-9]+,[0-9]+))$']]
8928
    def validate_ConfSimpleType(self, value):
8929
        # Validate type pc:ConfSimpleType, a restriction on float.
8930
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
8931
            if not isinstance(value, float):
8932
                lineno = self.gds_get_node_lineno_()
8933
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
8934
                return False
8935
            if value < 0:
8936
                lineno = self.gds_get_node_lineno_()
8937
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
8938
                result = False
8939
            if value > 1:
8940
                lineno = self.gds_get_node_lineno_()
8941
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
8942
                result = False
8943
    def has__content(self):
8944
        if (
8945
@@ 6394-6408 (lines=15) @@
6391
        return self.conf
6392
    def set_conf(self, conf):
6393
        self.conf = conf
6394
    def validate_ConfSimpleType(self, value):
6395
        # Validate type pc:ConfSimpleType, a restriction on float.
6396
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
6397
            if not isinstance(value, float):
6398
                lineno = self.gds_get_node_lineno_()
6399
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
6400
                return False
6401
            if value < 0:
6402
                lineno = self.gds_get_node_lineno_()
6403
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
6404
                result = False
6405
            if value > 1:
6406
                lineno = self.gds_get_node_lineno_()
6407
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
6408
                result = False
6409
    def has__content(self):
6410
        if (
6411
            self.OrderedGroup is not None or
@@ 5783-5797 (lines=15) @@
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:
5786
            if not isinstance(value, float):
5787
                lineno = self.gds_get_node_lineno_()
5788
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
5789
                return False
5790
            if value < 0:
5791
                lineno = self.gds_get_node_lineno_()
5792
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
5793
                result = False
5794
            if value > 1:
5795
                lineno = self.gds_get_node_lineno_()
5796
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
5797
                result = False
5798
    def validate_TextDataTypeSimpleType(self, value):
5799
        # Validate type pc:TextDataTypeSimpleType, a restriction on string.
5800
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
@@ 4030-4044 (lines=15) @@
4027
                    self.validate_PointsType_patterns_, value):
4028
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_PointsType_patterns_, ))
4029
    validate_PointsType_patterns_ = [['^(([0-9]+,[0-9]+ )+([0-9]+,[0-9]+))$']]
4030
    def validate_ConfSimpleType(self, value):
4031
        # Validate type pc:ConfSimpleType, a restriction on float.
4032
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
4033
            if not isinstance(value, float):
4034
                lineno = self.gds_get_node_lineno_()
4035
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
4036
                return False
4037
            if value < 0:
4038
                lineno = self.gds_get_node_lineno_()
4039
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
4040
                result = False
4041
            if value > 1:
4042
                lineno = self.gds_get_node_lineno_()
4043
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
4044
                result = False
4045
    def has__content(self):
4046
        if (
4047
@@ 3215-3229 (lines=15) @@
3212
                lineno = self.gds_get_node_lineno_()
3213
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TextLineOrderSimpleType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
3214
                result = False
3215
    def validate_ConfSimpleType(self, value):
3216
        # Validate type pc:ConfSimpleType, a restriction on float.
3217
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
3218
            if not isinstance(value, float):
3219
                lineno = self.gds_get_node_lineno_()
3220
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, })
3221
                return False
3222
            if value < 0:
3223
                lineno = self.gds_get_node_lineno_()
3224
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
3225
                result = False
3226
            if value > 1:
3227
                lineno = self.gds_get_node_lineno_()
3228
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ConfSimpleType' % {"value": value, "lineno": lineno} )
3229
                result = False
3230
    def has__content(self):
3231
        if (
3232
            self.AlternativeImage or