1
1
package com .regula .documentreader .webclient .model .ext .authenticity ;
2
2
3
3
import com .regula .documentreader .webclient .model .AuthenticityCheckResult ;
4
+ import com .regula .documentreader .webclient .model .AuthenticityResultType ;
4
5
import javax .annotation .Nullable ;
5
6
6
7
public class Authenticity extends com .regula .documentreader .webclient .model .AuthenticityCheckList {
7
8
8
9
@ Nullable
9
- public SecurityFeature uvLuminescence () {
10
- int uvLuminescenceType = 1 ;
11
- return this .securityFeatureOrNull (uvLuminescenceType );
10
+ public SecurityFeatureChecks uvLuminescenceChecks () {
11
+ return this .securityFeatureOrNull (AuthenticityResultType .UV_LUMINESCENCE );
12
12
}
13
13
14
14
@ Nullable
15
- public SecurityFeature irB900 () {
16
- int irB900Type = 2 ;
17
- return this .securityFeatureOrNull (irB900Type );
15
+ public SecurityFeatureChecks irB900Checks () {
16
+ return this .securityFeatureOrNull (AuthenticityResultType .IR_B900 );
18
17
}
19
18
20
19
@ Nullable
21
- public Ident imagePattern () {
22
- int imagePatternType = 4 ;
23
- return this .identOrNull (imagePatternType );
20
+ public IdentChecks imagePatternChecks () {
21
+ return this .identOrNull (AuthenticityResultType .IMAGE_PATTERN );
24
22
}
25
23
26
24
@ Nullable
27
- public SecurityFeature axialProtection () {
28
- int axialProtectionType = 8 ;
29
- return this .securityFeatureOrNull (axialProtectionType );
25
+ public SecurityFeatureChecks axialProtectionChecks () {
26
+ return this .securityFeatureOrNull (AuthenticityResultType .AXIAL_PROTECTION );
30
27
}
31
28
32
29
@ Nullable
33
- public Fiber uvFiber () {
34
- int uvFiberType = 16 ;
35
- return this .fiberOrNull (uvFiberType );
30
+ public FiberChecks uvFiberChecks () {
31
+ return this .fiberOrNull (AuthenticityResultType .UV_FIBERS );
36
32
}
37
33
38
34
@ Nullable
39
- public Ident irVisibility () {
40
- int irVisibilityType = 32 ;
41
- return this .identOrNull (irVisibilityType );
35
+ public IdentChecks irVisibilityChecks () {
36
+ return this .identOrNull (AuthenticityResultType .IR_VISIBILITY );
42
37
}
43
38
44
39
@ Nullable
45
- public OCRSecurityText ocrSecurityText () {
46
- int ocrSecurityTextType = 64 ;
47
- return this .ocrSecurityTextOrNull (ocrSecurityTextType );
40
+ public OCRSecurityTextChecks ocrSecurityTextChecks () {
41
+ return this .ocrSecurityTextOrNull (AuthenticityResultType .OCR_SECURITY_TEXT );
48
42
}
49
43
50
44
@ Nullable
51
- public ImageIdent ipi () {
52
- int ipiType = 128 ;
53
- return this .imageIdentOrNull (ipiType );
45
+ public ImageIdentChecks ipiChecks () {
46
+ return this .imageIdentOrNull (AuthenticityResultType .IPI );
54
47
}
55
48
56
49
@ Nullable
57
- public ImageIdent irImage () {
58
- int irImageType = 256 ;
59
- return this .imageIdentOrNull (irImageType );
50
+ public SecurityFeatureChecks embedImageChecks () {
51
+ return this .securityFeatureOrNull (AuthenticityResultType .PHOTO_EMBED_TYPE );
60
52
}
61
53
62
54
@ Nullable
63
- public SecurityFeature embedImage () {
64
- int embedImageType = 512 ;
65
- return this .securityFeatureOrNull (embedImageType );
55
+ public SecurityFeatureChecks hologramsChecks () {
56
+ return this .securityFeatureOrNull (AuthenticityResultType .HOLOGRAMS );
66
57
}
67
58
68
59
@ Nullable
69
- public Ident ovi () {
70
- int oviType = 1024 ;
71
- return this .identOrNull (oviType );
60
+ public SecurityFeatureChecks imageAreaChecks () {
61
+ return this .securityFeatureOrNull (AuthenticityResultType .PHOTO_AREA );
72
62
}
73
63
74
64
@ Nullable
75
- public Ident irLuminescence () {
76
- int irLuminescenceType = 2048 ;
77
- return this .identOrNull (irLuminescenceType );
65
+ public IdentChecks portraitComparisonChecks () {
66
+ return this .identOrNull (AuthenticityResultType .PORTRAIT_COMPARISON );
78
67
}
79
68
80
69
@ Nullable
81
- public SecurityFeature holograms () {
82
- int hologramsType = 4096 ;
83
- return this .securityFeatureOrNull (hologramsType );
70
+ public SecurityFeatureChecks barcodeFormatCheckChecks () {
71
+ return this .securityFeatureOrNull (AuthenticityResultType .BARCODE_FORMAT_CHECK );
84
72
}
85
73
86
74
@ Nullable
87
- public SecurityFeature imageArea () {
88
- int imageAreaType = 8192 ;
89
- return this .securityFeatureOrNull (imageAreaType );
75
+ public IdentChecks kinegramChecks () {
76
+ return this .identOrNull (AuthenticityResultType .KINEGRAM );
90
77
}
91
78
92
79
@ Nullable
93
- public Fiber uvBackground () {
94
- int uvBackgroundType = 16384 ;
95
- return this .fiberOrNull (uvBackgroundType );
80
+ public IdentChecks letterScreenChecks () {
81
+ return this .identOrNull (AuthenticityResultType .LETTER_SCREEN );
96
82
}
97
83
98
84
@ Nullable
99
- public Ident portraitComparison () {
100
- int portraitComparisonType = 32768 ;
101
- return this .identOrNull (portraitComparisonType );
102
- }
103
-
104
- @ Nullable
105
- public SecurityFeature barcodeFormatCheck () {
106
- int barcodeFormatCheckType = 65536 ;
107
- return this .securityFeatureOrNull (barcodeFormatCheckType );
108
- }
109
-
110
- @ Nullable
111
- public Ident kinegram () {
112
- int kinegramType = 131072 ;
113
- return this .identOrNull (kinegramType );
114
- }
115
-
116
- @ Nullable
117
- public Ident letterScreen () {
118
- int letterScreenType = 262144 ;
119
- return this .identOrNull (letterScreenType );
120
- }
121
-
122
- @ Nullable
123
- public Ident hologramsDetection () {
124
- int hologramsDetectionType = 524288 ;
125
- return this .identOrNull (hologramsDetectionType );
126
- }
127
-
128
- @ Nullable
129
- public Ident fingerprintComparison () {
130
- int fingerprintComparisonType = 1048576 ;
131
- return this .identOrNull (fingerprintComparisonType );
132
- }
133
-
134
- @ Nullable
135
- public SecurityFeature cancellingDocumentDetector () {
136
- int cancellingDocumentDetectorType = 2097152 ;
137
- return this .securityFeatureOrNull (cancellingDocumentDetectorType );
138
- }
139
-
140
- @ Nullable
141
- public AuthenticityCheckResult resultByType (int type ) {
85
+ private AuthenticityCheckResult resultByType (int type ) {
142
86
for (AuthenticityCheckResult checkResult : this .getList ()) {
143
87
if (checkResult .getType () == type ) {
144
88
return checkResult ;
@@ -147,42 +91,42 @@ public AuthenticityCheckResult resultByType(int type) {
147
91
return null ;
148
92
}
149
93
150
- private Fiber fiberOrNull (int type ) {
94
+ private FiberChecks fiberOrNull (int type ) {
151
95
AuthenticityCheckResult result = this .resultByType (type );
152
96
if (result != null ) {
153
- return new Fiber (result );
97
+ return new FiberChecks (result );
154
98
}
155
99
return null ;
156
100
}
157
101
158
- private Ident identOrNull (int type ) {
102
+ private IdentChecks identOrNull (int type ) {
159
103
AuthenticityCheckResult result = this .resultByType (type );
160
104
if (result != null ) {
161
- return new Ident (result );
105
+ return new IdentChecks (result );
162
106
}
163
107
return null ;
164
108
}
165
109
166
- private ImageIdent imageIdentOrNull (int type ) {
110
+ private ImageIdentChecks imageIdentOrNull (int type ) {
167
111
AuthenticityCheckResult result = this .resultByType (type );
168
112
if (result != null ) {
169
- return new ImageIdent (result );
113
+ return new ImageIdentChecks (result );
170
114
}
171
115
return null ;
172
116
}
173
117
174
- private OCRSecurityText ocrSecurityTextOrNull (int type ) {
118
+ private OCRSecurityTextChecks ocrSecurityTextOrNull (int type ) {
175
119
AuthenticityCheckResult result = this .resultByType (type );
176
120
if (result != null ) {
177
- return new OCRSecurityText (result );
121
+ return new OCRSecurityTextChecks (result );
178
122
}
179
123
return null ;
180
124
}
181
125
182
- private SecurityFeature securityFeatureOrNull (int type ) {
126
+ private SecurityFeatureChecks securityFeatureOrNull (int type ) {
183
127
AuthenticityCheckResult result = this .resultByType (type );
184
128
if (result != null ) {
185
- return new SecurityFeature (result );
129
+ return new SecurityFeatureChecks (result );
186
130
}
187
131
return null ;
188
132
}
0 commit comments