package com.kofax.mobile.sdk.capture.id; import android.graphics.Bitmap; import com.kofax.mobile.sdk._internal.extraction.IJsonExactionHelper; import com.kofax.mobile.sdk._internal.extraction.id.IIdFieldNameConvention; import com.kofax.mobile.sdk._internal.i; import com.kofax.mobile.sdk._internal.impl.IBase64ImageDecoder; import com.kofax.mobile.sdk.capture.model.Field; import com.kofax.mobile.sdk.capture.model.Id; import java.io.IOException; import java.io.ObjectInputStream; import java.util.HashMap; import java.util.Map; /* loaded from: classes3.dex */ public class ConventionBasedJsonIdDeserializer extends Id implements i { private IJsonExactionHelper ZW; private String ZX; private IIdFieldNameConvention acl; private IBase64ImageDecoder acm; private transient Map acn = new HashMap(); public ConventionBasedJsonIdDeserializer(IIdFieldNameConvention iIdFieldNameConvention, IJsonExactionHelper iJsonExactionHelper, IBase64ImageDecoder iBase64ImageDecoder, String str) { if (str == null) { throw new IllegalArgumentException("json cannot be null"); } if (iIdFieldNameConvention == null) { throw new IllegalArgumentException("convention cannot be null"); } if (iJsonExactionHelper == null) { throw new IllegalArgumentException("helper cannot be null"); } this.ZW = iJsonExactionHelper; iJsonExactionHelper.init(str); this.acl = iIdFieldNameConvention; this.acm = iBase64ImageDecoder; setJson(str); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getDocumentType() { return this.ZW.getString(this.acl.getDocumentTypeFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getFirstName() { return this.ZW.getString(this.acl.getFirstNameFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getMiddleName() { return this.ZW.getString(this.acl.getMiddleNameFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getLastName() { return this.ZW.getString(this.acl.getLastNameFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getIdNumber() { return this.ZW.getString(this.acl.getIdNumberFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getDateOfBirth() { return this.ZW.getString(this.acl.getDateOfBirthFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress() { return this.ZW.getString(this.acl.getAddress1FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getGender() { return this.ZW.getString(this.acl.getGenderFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getZip() { return this.ZW.getString(this.acl.getZipFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getState() { return this.ZW.getString(this.acl.getStateFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getCity() { return this.ZW.getString(this.acl.getCityFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getNameSuffix() { return this.ZW.getString(this.acl.getNameSuffixFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress2() { return this.ZW.getString(this.acl.getAddress2FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress3() { return this.ZW.getString(this.acl.getAddress3FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress4() { return this.ZW.getString(this.acl.getAddress4FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress5() { return this.ZW.getString(this.acl.getAddress5FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getAddress6() { return this.ZW.getString(this.acl.getAddress6FieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getIdClass() { return this.ZW.getString(this.acl.getIdClassFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getCountryShort() { return this.ZW.getString(this.acl.getCountryShortFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getCountry() { return this.ZW.getString(this.acl.getCountryFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getExpirationDate() { return this.ZW.getString(this.acl.getDateOfExpirationFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getEyes() { return this.ZW.getString(this.acl.getEyesFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getHair() { return this.ZW.getString(this.acl.getHairFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getHeight() { return this.ZW.getString(this.acl.getHeightFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getIssueDate() { return this.ZW.getString(this.acl.getDateOfIssueFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getNationality() { return this.ZW.getString(this.acl.getNationalityFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getWeight() { return this.ZW.getString(this.acl.getWeightFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getLicense() { return this.ZW.getString(this.acl.getLicenseFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field isBarcodeRead() { return this.ZW.getString(this.acl.getIsBarcodeReadFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field isOcrRead() { return this.ZW.getString(this.acl.getIsOcrReadFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Field getDocumentVerificationConfidenceRating() { return this.ZW.getString(this.acl.getDocumentVerificationConfidenceFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Bitmap getSignatureImage() { return getBitmap(this.acl.getSignatureImageFieldName()); } @Override // com.kofax.mobile.sdk.capture.model.Id public Bitmap getFaceImage() { return getBitmap(this.acl.getFaceImageFieldName()); } Bitmap getBitmap(String str) { Bitmap bitmap; if (this.acn.containsKey(str)) { return this.acn.get(str); } Field string = this.ZW.getString(str); if (string != null) { bitmap = this.acm.decode(string.getObject()); } else { bitmap = null; } this.acn.put(str, bitmap); return bitmap; } private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { objectInputStream.defaultReadObject(); this.acn = new HashMap(); } @Override // com.kofax.mobile.sdk._internal.i public void setJson(String str) { this.ZX = str; } @Override // com.kofax.mobile.sdk.capture.model.Id public String getRawData() { return this.ZX; } }