diff --git a/BlinkID/package.json b/BlinkID/package.json index 7e317bb..2ae0ae3 100644 --- a/BlinkID/package.json +++ b/BlinkID/package.json @@ -1,6 +1,6 @@ { "name": "blinkid-cordova", - "version": "4.11.1", + "version": "5.0.0", "description": "A small and powerful ID card scanning library", "cordova": { "id": "blinkid-cordova", @@ -45,7 +45,7 @@ }, { "name": "cordova-android", - "version": ">=7.0.0" + "version": ">=8.0.0" }, { "name": "cordova-ios", diff --git a/BlinkID/plugin.xml b/BlinkID/plugin.xml index 1300496..06f6870 100644 --- a/BlinkID/plugin.xml +++ b/BlinkID/plugin.xml @@ -2,7 +2,7 @@ + version="5.0.0"> BlinkIdScanner A small and powerful ID card scanning library @@ -12,7 +12,7 @@ - + @@ -57,119 +57,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -193,220 +99,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/BlinkID/scripts/initIOSFramework.sh b/BlinkID/scripts/initIOSFramework.sh index 5507627..80b3c50 100755 --- a/BlinkID/scripts/initIOSFramework.sh +++ b/BlinkID/scripts/initIOSFramework.sh @@ -4,7 +4,7 @@ HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")" pushd "${HERE}/../src/ios/" > /dev/null -LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v4.11.0/blinkid-ios_v4.11.0.zip' +LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.0.0/blinkid-ios_v5.0.0.zip' FILENAME='blinkid-ios.zip' # check if Microblink framework and bundle already exist diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/RecognizerType.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/RecognizerType.java deleted file mode 100644 index e7643d1..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/RecognizerType.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.phonegap.plugins.microblink; - -enum RecognizerType { - - DOCUMENTFACE("DocumentFace", "DocumentFace result"), - BARCODE("Barcode", "Barcode result"), - DEDL("DEDL", "DEDL result"), - DOCUMENTDETECTOR("DocumentDetector", "DocumentDetector result"), - EUDL("EUDL", "EUDL result"), - USDL("USDL", "USDL result"), - MRTD("MRTD", "MRTD result"), - PDF417("PDF417", "Barcode result"), - UKDL("UKDL", "UKDL result"), - - MYKAD_FRONT("MyKadFront", "MyKadFront result"), - MYKAD_BACK("MyKadBack", "MyKadBack result"), - IKAD("IKad", "IKad result"), - MY_TENTERA("MyTentera", "MyTentera result"), - - GERMAN_ID_BACK("GermanIDBack", "GermanBackID result"), - GERMAN_ID_FRONT("GermanIDFront", "GermanFrontID result"), - GERMAN_OLD_ID("GermanOldID", "GermanOldID result"), - GERMAN_PASSPORT("GermanPassport", "GermanPassport result"), - - SINGAPORE_ID_FRONT("SingaporeIDFront", "SingaporeFrontID result"), - SINGAPORE_ID_BACK("SingaporeIDBack", "SingaporeBackID result"), - - UAE_ID_BACK("UnitedArabEmiratesIDBack", "UnitedArabEmiratesIDBack result"), - UAE_ID_FRONT("UnitedArabEmiratesIDFront", "UnitedArabEmiratesIDFront result"), - - INDONESIA_ID("IndonesiaID", "IndonesiaID result"), - - UNKNOWN("", ""); - - public final String id; - public final String resultId; - - RecognizerType(String id, String resultId) { - this.id = id; - this.resultId = resultId; - } - - static RecognizerType fromId(String id) { - for (RecognizerType type : values()) { - if (type.id.equals(id)) { - return type; - } - } - return UNKNOWN; - } - -} diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java index 0284cf7..7679c66 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java @@ -21,10 +21,8 @@ private void registerMapping(OverlaySettingsSerialization overlaySettingsSeriali } OverlaySettingsSerializers() { - registerMapping(new BarcodeOverlaySettingsSerialization()); registerMapping(new DocumentOverlaySettingsSerialization()); registerMapping(new DocumentVerificationOverlaySettingsSerialization()); - registerMapping(new BlinkCardOverlaySettingsSerialization()); registerMapping(new BlinkIdOverlaySettingsSerialization()); } diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BarcodeOverlaySettingsSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BarcodeOverlaySettingsSerialization.java deleted file mode 100644 index 5e70f68..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BarcodeOverlaySettingsSerialization.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.phonegap.plugins.microblink.overlays.serialization; - -import android.content.Context; - -import com.microblink.entities.recognizers.RecognizerBundle; -import com.microblink.uisettings.BarcodeUISettings; -import com.microblink.uisettings.UISettings; -import com.phonegap.plugins.microblink.overlays.OverlaySettingsSerialization; - -import org.json.JSONObject; - -public final class BarcodeOverlaySettingsSerialization implements OverlaySettingsSerialization { - @Override - public UISettings createUISettings(Context context, JSONObject jsonUISettings, RecognizerBundle recognizerBundle) { - // no settings deserialized at the moment - return new BarcodeUISettings(recognizerBundle); - } - - @Override - public String getJsonName() { - return "BarcodeOverlaySettings"; - } -} diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkCardOverlaySettingsSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkCardOverlaySettingsSerialization.java deleted file mode 100644 index af27933..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkCardOverlaySettingsSerialization.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.phonegap.plugins.microblink.overlays.serialization; - -import android.content.Context; - -import com.microblink.entities.recognizers.RecognizerBundle; -import com.microblink.fragment.overlay.blinkcard.scanlineui.ScanLineOverlayStrings; -import com.microblink.uisettings.BlinkCardUISettings; -import com.microblink.uisettings.UISettings; -import com.phonegap.plugins.microblink.overlays.OverlaySettingsSerialization; - -import org.json.JSONObject; - -public final class BlinkCardOverlaySettingsSerialization implements OverlaySettingsSerialization { - @Override - public UISettings createUISettings(Context context, JSONObject jsonUISettings, RecognizerBundle recognizerBundle) { - BlinkCardUISettings settings = new BlinkCardUISettings(recognizerBundle); - - ScanLineOverlayStrings.Builder overlayStringsBuilder = new ScanLineOverlayStrings.Builder(context); - String firstSideInstructions = getStringFromJSONObject(jsonUISettings, "firstSideInstructions"); - if (firstSideInstructions != null) { - overlayStringsBuilder.setFrontSideInstructions(firstSideInstructions); - } - String secondSideInstructions = getStringFromJSONObject(jsonUISettings, "secondSideInstructions"); - if (secondSideInstructions != null) { - overlayStringsBuilder.setBackSideInstructions(secondSideInstructions); - } - - settings.setStrings(overlayStringsBuilder.build()); - return settings; - } - - private String getStringFromJSONObject(JSONObject map, String key) { - String value = map.optString(key, null); - if ("null".equals(value)) { - value = null; - } - return value; - } - - @Override - public String getJsonName() { - return "BlinkCardOverlaySettings"; - } -} diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java index b1b3fd9..48f5092 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java @@ -23,103 +23,12 @@ private void registerMapping( RecognizerSerialization recognizerSerialization ) RecognizerSerializers() { registerMapping(new SuccessFrameGrabberRecognizerSerialization()); - registerMapping(new AustraliaDlBackRecognizerSerialization()); - registerMapping(new AustraliaDlFrontRecognizerSerialization()); - registerMapping(new AustriaCombinedRecognizerSerialization()); - registerMapping(new AustriaDlFrontRecognizerSerialization()); - registerMapping(new AustriaIdBackRecognizerSerialization()); - registerMapping(new AustriaIdFrontRecognizerSerialization()); - registerMapping(new AustriaPassportRecognizerSerialization()); - registerMapping(new BarcodeRecognizerSerialization()); - registerMapping(new BelgiumCombinedRecognizerSerialization()); - registerMapping(new BelgiumIdBackRecognizerSerialization()); - registerMapping(new BelgiumIdFrontRecognizerSerialization()); - registerMapping(new BlinkCardEliteRecognizerSerialization()); - registerMapping(new BlinkCardRecognizerSerialization()); registerMapping(new BlinkIdCombinedRecognizerSerialization()); registerMapping(new BlinkIdRecognizerSerialization()); - registerMapping(new BruneiIdBackRecognizerSerialization()); - registerMapping(new BruneiIdFrontRecognizerSerialization()); - registerMapping(new BruneiMilitaryIdBackRecognizerSerialization()); - registerMapping(new BruneiMilitaryIdFrontRecognizerSerialization()); - registerMapping(new BruneiResidencePermitBackRecognizerSerialization()); - registerMapping(new BruneiResidencePermitFrontRecognizerSerialization()); - registerMapping(new BruneiTemporaryResidencePermitBackRecognizerSerialization()); - registerMapping(new BruneiTemporaryResidencePermitFrontRecognizerSerialization()); - registerMapping(new ColombiaDlFrontRecognizerSerialization()); - registerMapping(new ColombiaIdBackRecognizerSerialization()); - registerMapping(new ColombiaIdFrontRecognizerSerialization()); - registerMapping(new CroatiaCombinedRecognizerSerialization()); - registerMapping(new CroatiaIdBackRecognizerSerialization()); - registerMapping(new CroatiaIdFrontRecognizerSerialization()); - registerMapping(new CyprusIdBackRecognizerSerialization()); - registerMapping(new CyprusIdFrontRecognizerSerialization()); - registerMapping(new CyprusOldIdBackRecognizerSerialization()); - registerMapping(new CyprusOldIdFrontRecognizerSerialization()); - registerMapping(new CzechiaCombinedRecognizerSerialization()); - registerMapping(new CzechiaIdBackRecognizerSerialization()); - registerMapping(new CzechiaIdFrontRecognizerSerialization()); registerMapping(new DocumentFaceRecognizerSerialization()); - registerMapping(new EgyptIdFrontRecognizerSerialization()); - registerMapping(new EudlRecognizerSerialization()); - registerMapping(new GermanyCombinedRecognizerSerialization()); - registerMapping(new GermanyDlBackRecognizerSerialization()); - registerMapping(new GermanyDlFrontRecognizerSerialization()); - registerMapping(new GermanyIdBackRecognizerSerialization()); - registerMapping(new GermanyIdFrontRecognizerSerialization()); - registerMapping(new GermanyIdOldRecognizerSerialization()); - registerMapping(new GermanyPassportRecognizerSerialization()); - registerMapping(new HongKongIdFrontRecognizerSerialization()); - registerMapping(new IndonesiaIdFrontRecognizerSerialization()); - registerMapping(new IrelandDlFrontRecognizerSerialization()); - registerMapping(new ItalyDlFrontRecognizerSerialization()); - registerMapping(new JordanCombinedRecognizerSerialization()); - registerMapping(new JordanIdBackRecognizerSerialization()); - registerMapping(new JordanIdFrontRecognizerSerialization()); - registerMapping(new KuwaitIdBackRecognizerSerialization()); - registerMapping(new KuwaitIdFrontRecognizerSerialization()); - registerMapping(new MalaysiaDlFrontRecognizerSerialization()); - registerMapping(new MalaysiaIkadFrontRecognizerSerialization()); - registerMapping(new MalaysiaMyKadBackRecognizerSerialization()); - registerMapping(new MalaysiaMyKadFrontRecognizerSerialization()); - registerMapping(new MalaysiaMyKasFrontRecognizerSerialization()); - registerMapping(new MalaysiaMyPrFrontRecognizerSerialization()); - registerMapping(new MalaysiaMyTenteraFrontRecognizerSerialization()); - registerMapping(new MexicoVoterIdFrontRecognizerSerialization()); - registerMapping(new MoroccoIdBackRecognizerSerialization()); - registerMapping(new MoroccoIdFrontRecognizerSerialization()); registerMapping(new MrtdCombinedRecognizerSerialization()); registerMapping(new MrtdRecognizerSerialization()); - registerMapping(new NewZealandDlFrontRecognizerSerialization()); - registerMapping(new NigeriaVoterIdBackRecognizerSerialization()); registerMapping(new PassportRecognizerSerialization()); - registerMapping(new Pdf417RecognizerSerialization()); - registerMapping(new PolandCombinedRecognizerSerialization()); - registerMapping(new PolandIdBackRecognizerSerialization()); - registerMapping(new PolandIdFrontRecognizerSerialization()); - registerMapping(new RomaniaIdFrontRecognizerSerialization()); - registerMapping(new SimNumberRecognizerSerialization()); - registerMapping(new SingaporeChangiEmployeeIdRecognizerSerialization()); - registerMapping(new SingaporeCombinedRecognizerSerialization()); - registerMapping(new SingaporeDlFrontRecognizerSerialization()); - registerMapping(new SingaporeIdBackRecognizerSerialization()); - registerMapping(new SingaporeIdFrontRecognizerSerialization()); - registerMapping(new SlovakiaCombinedRecognizerSerialization()); - registerMapping(new SlovakiaIdBackRecognizerSerialization()); - registerMapping(new SlovakiaIdFrontRecognizerSerialization()); - registerMapping(new SloveniaCombinedRecognizerSerialization()); - registerMapping(new SloveniaIdBackRecognizerSerialization()); - registerMapping(new SloveniaIdFrontRecognizerSerialization()); - registerMapping(new SpainDlFrontRecognizerSerialization()); - registerMapping(new SwedenDlFrontRecognizerSerialization()); - registerMapping(new SwitzerlandDlFrontRecognizerSerialization()); - registerMapping(new SwitzerlandIdBackRecognizerSerialization()); - registerMapping(new SwitzerlandIdFrontRecognizerSerialization()); - registerMapping(new SwitzerlandPassportRecognizerSerialization()); - registerMapping(new UnitedArabEmiratesDlFrontRecognizerSerialization()); - registerMapping(new UnitedArabEmiratesIdBackRecognizerSerialization()); - registerMapping(new UnitedArabEmiratesIdFrontRecognizerSerialization()); - registerMapping(new VinRecognizerSerialization()); registerMapping(new VisaRecognizerSerialization()); registerMapping(new UsdlRecognizerSerialization()); registerMapping(new UsdlCombinedRecognizerSerialization()); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java deleted file mode 100644 index 8d0138f..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustraliaDlBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractLicenceNumber(jsonRecognizer.optBoolean("extractLicenceNumber", true)); - recognizer.setExtractLicenseExpiry(jsonRecognizer.optBoolean("extractLicenseExpiry", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("licenceExpiry", SerializationUtils.serializeDate(result.getLicenceExpiry())); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustraliaDlBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java deleted file mode 100644 index ef75ae5..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustraliaDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractLicenseExpiry(jsonRecognizer.optBoolean("extractLicenseExpiry", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("licenceExpiry", SerializationUtils.serializeDate(result.getLicenceExpiry())); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("licenceType", result.getLicenceType()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustraliaDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java deleted file mode 100644 index 39f478c..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustriaCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssuance(jsonRecognizer.optBoolean("extractDateOfIssuance", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", false)); - recognizer.setExtractPassportNumber(jsonRecognizer.optBoolean("extractPassportNumber", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractPrincipalResidence(jsonRecognizer.optBoolean("extractPrincipalResidence", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssuance", SerializationUtils.serializeDate(result.getDateOfIssuance())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("eyeColour", result.getEyeColour()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("height", result.getHeight()); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("mrtdVerified", result.isMrtdVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("principalResidence", result.getPrincipalResidence()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustriaCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java deleted file mode 100644 index 40dbdea..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustriaDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractVehicleCategories(jsonRecognizer.optBoolean("extractVehicleCategories", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("vehicleCategories", result.getVehicleCategories()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustriaDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java deleted file mode 100644 index 7769a0c..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustriaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfIssuance(jsonRecognizer.optBoolean("extractDateOfIssuance", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractPrincipalResidence(jsonRecognizer.optBoolean("extractPrincipalResidence", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfIssuance", SerializationUtils.serializeDate(result.getDateOfIssuance())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("eyeColour", result.getEyeColour()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("height", result.getHeight()); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("principalResidence", result.getPrincipalResidence()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustriaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java deleted file mode 100644 index c81130f..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustriaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustriaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java deleted file mode 100644 index 30ef269..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class AustriaPassportRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", false)); - recognizer.setExtractPassportNumber(jsonRecognizer.optBoolean("extractPassportNumber", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("height", result.getHeight()); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("passportNumber", result.getPassportNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "AustriaPassportRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java deleted file mode 100644 index a2ac2f0..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BarcodeRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer(); - recognizer.setAutoScaleDetection(jsonRecognizer.optBoolean("autoScaleDetection", true)); - recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", false)); - recognizer.setReadCode39AsExtendedData(jsonRecognizer.optBoolean("readCode39AsExtendedData", false)); - recognizer.setScanAztecCode(jsonRecognizer.optBoolean("scanAztecCode", false)); - recognizer.setScanCode128(jsonRecognizer.optBoolean("scanCode128", false)); - recognizer.setScanCode39(jsonRecognizer.optBoolean("scanCode39", false)); - recognizer.setScanDataMatrix(jsonRecognizer.optBoolean("scanDataMatrix", false)); - recognizer.setScanEan13(jsonRecognizer.optBoolean("scanEan13", false)); - recognizer.setScanEan8(jsonRecognizer.optBoolean("scanEan8", false)); - recognizer.setScanInverse(jsonRecognizer.optBoolean("scanInverse", false)); - recognizer.setScanItf(jsonRecognizer.optBoolean("scanItf", false)); - recognizer.setScanPdf417(jsonRecognizer.optBoolean("scanPdf417", false)); - recognizer.setScanQrCode(jsonRecognizer.optBoolean("scanQrCode", false)); - recognizer.setScanUncertain(jsonRecognizer.optBoolean("scanUncertain", true)); - recognizer.setScanUpca(jsonRecognizer.optBoolean("scanUpca", false)); - recognizer.setScanUpce(jsonRecognizer.optBoolean("scanUpce", false)); - recognizer.setSlowerThoroughScan(jsonRecognizer.optBoolean("slowerThoroughScan", true)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("barcodeType", SerializationUtils.serializeEnum(result.getBarcodeType())); - jsonResult.put("rawData", SerializationUtils.encodeByteArrayToBase64(result.getRawData())); - jsonResult.put("stringData", result.getStringData()); - jsonResult.put("uncertain", result.isUncertain()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BarcodeRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumCombinedRecognizerSerialization.java deleted file mode 100644 index 6fe6edb..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumCombinedRecognizerSerialization.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BelgiumCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.belgium.BelgiumCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.belgium.BelgiumCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("cardNumber", result.getCardNumber()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BelgiumCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.belgium.BelgiumCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdBackRecognizerSerialization.java deleted file mode 100644 index d6c88ec..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdBackRecognizerSerialization.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BelgiumIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BelgiumIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdFrontRecognizerSerialization.java deleted file mode 100644 index a53c889..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BelgiumIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BelgiumIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("cardNumber", result.getCardNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BelgiumIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.belgium.BelgiumIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java deleted file mode 100644 index c0fd421..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BlinkCardEliteRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer recognizer = new com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer(); - recognizer.setAnonymizeCardNumber(jsonRecognizer.optBoolean("anonymizeCardNumber", false)); - recognizer.setAnonymizeCvv(jsonRecognizer.optBoolean("anonymizeCvv", false)); - recognizer.setAnonymizeOwner(jsonRecognizer.optBoolean("anonymizeOwner", false)); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractInventoryNumber(jsonRecognizer.optBoolean("extractInventoryNumber", true)); - recognizer.setExtractOwner(jsonRecognizer.optBoolean("extractOwner", true)); - recognizer.setExtractValidThru(jsonRecognizer.optBoolean("extractValidThru", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer.Result result = ((com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("cardNumber", result.getCardNumber()); - jsonResult.put("cvv", result.getCvv()); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("inventoryNumber", result.getInventoryNumber()); - jsonResult.put("owner", result.getOwner()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("validThru", SerializationUtils.serializeDate(result.getValidThru())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BlinkCardEliteRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java deleted file mode 100644 index 8906e85..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BlinkCardRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer recognizer = new com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer(); - recognizer.setAnonymizeCardNumber(jsonRecognizer.optBoolean("anonymizeCardNumber", false)); - recognizer.setAnonymizeCvv(jsonRecognizer.optBoolean("anonymizeCvv", false)); - recognizer.setAnonymizeOwner(jsonRecognizer.optBoolean("anonymizeOwner", false)); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCvv(jsonRecognizer.optBoolean("extractCvv", true)); - recognizer.setExtractInventoryNumber(jsonRecognizer.optBoolean("extractInventoryNumber", true)); - recognizer.setExtractOwner(jsonRecognizer.optBoolean("extractOwner", false)); - recognizer.setExtractValidThru(jsonRecognizer.optBoolean("extractValidThru", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer.Result result = ((com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("cardNumber", result.getCardNumber()); - jsonResult.put("cvv", result.getCvv()); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("inventoryNumber", result.getInventoryNumber()); - jsonResult.put("issuer", SerializationUtils.serializeEnum(result.getIssuer())); - jsonResult.put("owner", result.getOwner()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("validThru", SerializationUtils.serializeDate(result.getValidThru())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BlinkCardRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java index 067fef0..75704e5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java @@ -16,7 +16,6 @@ public Recognizer createRecognizer(JSONObject jsonRecognizer) { recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); return recognizer; } @@ -26,20 +25,34 @@ public JSONObject serializeResult(Recognizer recognizer) { JSONObject jsonResult = new JSONObject(); try { SerializationUtils.addCommonResultData(jsonResult, result); + jsonResult.put("additionalAddressInformation", result.getAdditionalAddressInformation()); + jsonResult.put("additionalNameInformation", result.getAdditionalNameInformation()); jsonResult.put("address", result.getAddress()); + jsonResult.put("conditions", result.getConditions()); jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); + jsonResult.put("documentAdditionalNumber", result.getDocumentAdditionalNumber()); + jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch())); jsonResult.put("documentNumber", result.getDocumentNumber()); jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); + jsonResult.put("employer", result.getEmployer()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); + jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); + jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); jsonResult.put("fullName", result.getFullName()); + jsonResult.put("issuingAuthority", result.getIssuingAuthority()); jsonResult.put("lastName", result.getLastName()); + jsonResult.put("maritalStatus", result.getMaritalStatus()); + jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); + jsonResult.put("nationality", result.getNationality()); + jsonResult.put("personalIdNumber", result.getPersonalIdNumber()); + jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); + jsonResult.put("profession", result.getProfession()); + jsonResult.put("race", result.getRace()); + jsonResult.put("religion", result.getReligion()); + jsonResult.put("residentialStatus", result.getResidentialStatus()); jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); jsonResult.put("sex", result.getSex()); } catch (JSONException e) { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java index b202ae1..e6b182f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java @@ -25,17 +25,32 @@ public JSONObject serializeResult(Recognizer recognizer) { JSONObject jsonResult = new JSONObject(); try { SerializationUtils.addCommonResultData(jsonResult, result); + jsonResult.put("additionalAddressInformation", result.getAdditionalAddressInformation()); + jsonResult.put("additionalNameInformation", result.getAdditionalNameInformation()); jsonResult.put("address", result.getAddress()); + jsonResult.put("conditions", result.getConditions()); jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); + jsonResult.put("documentAdditionalNumber", result.getDocumentAdditionalNumber()); jsonResult.put("documentNumber", result.getDocumentNumber()); jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); + jsonResult.put("employer", result.getEmployer()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("firstName", result.getFirstName()); jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); jsonResult.put("fullName", result.getFullName()); + jsonResult.put("issuingAuthority", result.getIssuingAuthority()); jsonResult.put("lastName", result.getLastName()); + jsonResult.put("maritalStatus", result.getMaritalStatus()); + jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); + jsonResult.put("nationality", result.getNationality()); + jsonResult.put("personalIdNumber", result.getPersonalIdNumber()); + jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); + jsonResult.put("profession", result.getProfession()); + jsonResult.put("race", result.getRace()); + jsonResult.put("religion", result.getReligion()); + jsonResult.put("residentialStatus", result.getResidentialStatus()); jsonResult.put("sex", result.getSex()); } catch (JSONException e) { // see https://developer.android.com/reference/org/json/JSONException diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java deleted file mode 100644 index 95e32c3..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractRace(jsonRecognizer.optBoolean("extractRace", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("race", result.getRace()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java deleted file mode 100644 index 65dc2ae..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java deleted file mode 100644 index 0ce407e..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiMilitaryIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("armyNumber", result.getArmyNumber()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiMilitaryIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java deleted file mode 100644 index 6fbf536..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiMilitaryIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractRank(jsonRecognizer.optBoolean("extractRank", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("rank", result.getRank()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiMilitaryIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java deleted file mode 100644 index 341f35e..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiResidencePermitBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractRace(jsonRecognizer.optBoolean("extractRace", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("race", result.getRace()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiResidencePermitBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java deleted file mode 100644 index 1e47dd4..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiResidencePermitFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiResidencePermitFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java deleted file mode 100644 index 967a1eb..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiTemporaryResidencePermitBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractPassportNumber(jsonRecognizer.optBoolean("extractPassportNumber", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("passportNumber", result.getPassportNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiTemporaryResidencePermitBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java deleted file mode 100644 index 77d984e..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class BruneiTemporaryResidencePermitFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "BruneiTemporaryResidencePermitFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java deleted file mode 100644 index 8f32af5..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class ColombiaDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDriverRestrictions(jsonRecognizer.optBoolean("extractDriverRestrictions", true)); - recognizer.setExtractIssuingAgency(jsonRecognizer.optBoolean("extractIssuingAgency", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("driverRestrictions", result.getDriverRestrictions()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAgency", result.getIssuingAgency()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("name", result.getName()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "ColombiaDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java deleted file mode 100644 index 6e07683..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class ColombiaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", true)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setScanUncertain(jsonRecognizer.optBoolean("scanUncertain", true)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("bloodGroup", result.getBloodGroup()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("fingerprint", SerializationUtils.encodeByteArrayToBase64(result.getFingerprint())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "ColombiaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java deleted file mode 100644 index f340f3e..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class ColombiaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "ColombiaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java deleted file mode 100644 index dae7c18..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CroatiaCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCitizenship(jsonRecognizer.optBoolean("extractCitizenship", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractResidence(jsonRecognizer.optBoolean("extractResidence", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("citizenship", result.getCitizenship()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentBilingual", result.isDocumentBilingual()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentForNonResident", result.isDocumentForNonResident()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("oib", result.getOib()); - jsonResult.put("residence", result.getResidence()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CroatiaCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java deleted file mode 100644 index 55b5a74..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CroatiaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractResidence(jsonRecognizer.optBoolean("extractResidence", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("documentForNonResident", result.isDocumentForNonResident()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("residence", result.getResidence()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CroatiaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java deleted file mode 100644 index 36cfcbe..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CroatiaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCitizenship(jsonRecognizer.optBoolean("extractCitizenship", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("citizenship", result.getCitizenship()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("documentBilingual", result.isDocumentBilingual()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CroatiaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java deleted file mode 100644 index dbdae7a..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CyprusIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CyprusIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java deleted file mode 100644 index e9f4363..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CyprusIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("idNumber", result.getIdNumber()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CyprusIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java deleted file mode 100644 index bf72e18..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CyprusOldIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractExpiresOn(jsonRecognizer.optBoolean("extractExpiresOn", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("expiresOn", SerializationUtils.serializeDate(result.getExpiresOn())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CyprusOldIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java deleted file mode 100644 index 6156a56..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CyprusOldIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("idNumber", result.getIdNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CyprusOldIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java deleted file mode 100644 index da0dbb9..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CzechiaCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractPermanentStay(jsonRecognizer.optBoolean("extractPermanentStay", true)); - recognizer.setExtractPersonalNumber(jsonRecognizer.optBoolean("extractPersonalNumber", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("permanentStay", result.getPermanentStay()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CzechiaCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java deleted file mode 100644 index d23b99d..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CzechiaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractPermanentStay(jsonRecognizer.optBoolean("extractPermanentStay", true)); - recognizer.setExtractPersonalNumber(jsonRecognizer.optBoolean("extractPersonalNumber", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("permanentStay", result.getPermanentStay()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CzechiaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java deleted file mode 100644 index 2a860f3..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class CzechiaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "CzechiaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java deleted file mode 100644 index a0f2924..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class EgyptIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractNationalNumber(jsonRecognizer.optBoolean("extractNationalNumber", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("nationalNumber", result.getNationalNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "EgyptIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java deleted file mode 100644 index 6811501..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class EudlRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer(); - recognizer.setCountry(com.microblink.entities.recognizers.blinkid.eudl.EudlCountry.values()[jsonRecognizer.optInt("country", 4) - 1]); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractPersonalNumber(jsonRecognizer.optBoolean("extractPersonalNumber", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("birthData", result.getBirthData()); - jsonResult.put("country", SerializationUtils.serializeEnum(result.getCountry())); - jsonResult.put("driverNumber", result.getDriverNumber()); - jsonResult.put("expiryDate", SerializationUtils.serializeDate(result.getExpiryDate())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issueDate", SerializationUtils.serializeDate(result.getIssueDate())); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "EudlRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java deleted file mode 100644 index a54a3bd..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractCanNumber(jsonRecognizer.optBoolean("extractCanNumber", true)); - recognizer.setExtractColourOfEyes(jsonRecognizer.optBoolean("extractColourOfEyes", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("canNumber", result.getCanNumber()); - jsonResult.put("colourOfEyes", result.getColourOfEyes()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("height", result.getHeight()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("rawMrzString", result.getRawMrzString()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java deleted file mode 100644 index ce4d22e..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyDlBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfIssueB10", SerializationUtils.serializeDate(result.getDateOfIssueB10())); - jsonResult.put("dateOfIssueB10NotSpecified", result.isDateOfIssueB10NotSpecified()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyDlBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java deleted file mode 100644 index c6bfb34..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractLicenceCategories(jsonRecognizer.optBoolean("extractLicenceCategories", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("licenceCategories", result.getLicenceCategories()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java deleted file mode 100644 index 3bffe12..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractColourOfEyes(jsonRecognizer.optBoolean("extractColourOfEyes", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("addressCity", result.getAddressCity()); - jsonResult.put("addressHouseNumber", result.getAddressHouseNumber()); - jsonResult.put("addressStreet", result.getAddressStreet()); - jsonResult.put("addressZipCode", result.getAddressZipCode()); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("colourOfEyes", result.getColourOfEyes()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("height", result.getHeight()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java deleted file mode 100644 index f82ca68..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCanNumber(jsonRecognizer.optBoolean("extractCanNumber", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("canNumber", result.getCanNumber()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java deleted file mode 100644 index 5ca0165..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyIdOldRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyIdOldRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java deleted file mode 100644 index d44f1db..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class GermanyPassportRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "GermanyPassportRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java deleted file mode 100644 index 5dfa9f6..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class HongKongIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCommercialCode(jsonRecognizer.optBoolean("extractCommercialCode", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractResidentialStatus(jsonRecognizer.optBoolean("extractResidentialStatus", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("commercialCode", result.getCommercialCode()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("residentialStatus", result.getResidentialStatus()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "HongKongIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java deleted file mode 100644 index 2c65837..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class IndonesiaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractBloodType(jsonRecognizer.optBoolean("extractBloodType", true)); - recognizer.setExtractCitizenship(jsonRecognizer.optBoolean("extractCitizenship", true)); - recognizer.setExtractCity(jsonRecognizer.optBoolean("extractCity", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDistrict(jsonRecognizer.optBoolean("extractDistrict", true)); - recognizer.setExtractKelDesa(jsonRecognizer.optBoolean("extractKelDesa", true)); - recognizer.setExtractMaritalStatus(jsonRecognizer.optBoolean("extractMaritalStatus", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractOccupation(jsonRecognizer.optBoolean("extractOccupation", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractReligion(jsonRecognizer.optBoolean("extractReligion", true)); - recognizer.setExtractRt(jsonRecognizer.optBoolean("extractRt", true)); - recognizer.setExtractRw(jsonRecognizer.optBoolean("extractRw", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("bloodType", result.getBloodType()); - jsonResult.put("citizenship", result.getCitizenship()); - jsonResult.put("city", result.getCity()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("district", result.getDistrict()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("kelDesa", result.getKelDesa()); - jsonResult.put("maritalStatus", result.getMaritalStatus()); - jsonResult.put("name", result.getName()); - jsonResult.put("occupation", result.getOccupation()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("province", result.getProvince()); - jsonResult.put("religion", result.getReligion()); - jsonResult.put("rt", result.getRt()); - jsonResult.put("rw", result.getRw()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "IndonesiaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java deleted file mode 100644 index acc5f24..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class IrelandDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractLicenceCategories(jsonRecognizer.optBoolean("extractLicenceCategories", true)); - recognizer.setExtractLicenceNumber(jsonRecognizer.optBoolean("extractLicenceNumber", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("driverNumber", result.getDriverNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("licenceCategories", result.getLicenceCategories()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "IrelandDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java deleted file mode 100644 index eb9fb69..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class ItalyDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractLicenceCategories(jsonRecognizer.optBoolean("extractLicenceCategories", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("licenceCategories", result.getLicenceCategories()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "ItalyDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java deleted file mode 100644 index 31b7aa0..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class JordanCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("name", result.getName()); - jsonResult.put("nationalNumber", result.getNationalNumber()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "JordanCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java deleted file mode 100644 index 4c93eb3..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class JordanIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "JordanIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java deleted file mode 100644 index 150ec11..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class JordanIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("name", result.getName()); - jsonResult.put("nationalNumber", result.getNationalNumber()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "JordanIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java deleted file mode 100644 index b4b6c2c..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class KuwaitIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractSerialNo(jsonRecognizer.optBoolean("extractSerialNo", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("serialNo", result.getSerialNo()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "KuwaitIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java deleted file mode 100644 index 4247067..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class KuwaitIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractBirthDate(jsonRecognizer.optBoolean("extractBirthDate", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("civilIdNumber", result.getCivilIdNumber()); - jsonResult.put("expiryDate", SerializationUtils.serializeDate(result.getExpiryDate())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("name", result.getName()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "KuwaitIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java deleted file mode 100644 index 792a032..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractClass(jsonRecognizer.optBoolean("extractClass", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractValidFrom(jsonRecognizer.optBoolean("extractValidFrom", true)); - recognizer.setExtractValidUntil(jsonRecognizer.optBoolean("extractValidUntil", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("city", result.getCity()); - jsonResult.put("dlClass", result.getDlClass()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("identityNumber", result.getIdentityNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("ownerState", result.getOwnerState()); - jsonResult.put("street", result.getStreet()); - jsonResult.put("validFrom", SerializationUtils.serializeDate(result.getValidFrom())); - jsonResult.put("validUntil", SerializationUtils.serializeDate(result.getValidUntil())); - jsonResult.put("zipcode", result.getZipcode()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java deleted file mode 100644 index 935344b..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaIkadFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractEmployer(jsonRecognizer.optBoolean("extractEmployer", true)); - recognizer.setExtractFacultyAddress(jsonRecognizer.optBoolean("extractFacultyAddress", true)); - recognizer.setExtractGender(jsonRecognizer.optBoolean("extractGender", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPassportNumber(jsonRecognizer.optBoolean("extractPassportNumber", true)); - recognizer.setExtractSector(jsonRecognizer.optBoolean("extractSector", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("employer", result.getEmployer()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("facultyAddress", result.getFacultyAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("gender", result.getGender()); - jsonResult.put("name", result.getName()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("passportNumber", result.getPassportNumber()); - jsonResult.put("sector", result.getSector()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaIkadFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java deleted file mode 100644 index e4ccbc1..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaMyKadBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractOldNric(jsonRecognizer.optBoolean("extractOldNric", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("extendedNric", result.getExtendedNric()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("nric", result.getNric()); - jsonResult.put("oldNric", result.getOldNric()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaMyKadBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java deleted file mode 100644 index 0b8eaa9..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaMyKadFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); - recognizer.setExtractReligion(jsonRecognizer.optBoolean("extractReligion", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("city", result.getCity()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("nric", result.getNric()); - jsonResult.put("ownerState", result.getOwnerState()); - jsonResult.put("religion", result.getReligion()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("street", result.getStreet()); - jsonResult.put("zipcode", result.getZipcode()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaMyKadFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java deleted file mode 100644 index b55ef1b..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaMyKasFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); - recognizer.setExtractReligion(jsonRecognizer.optBoolean("extractReligion", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("city", result.getCity()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("nric", result.getNric()); - jsonResult.put("ownerState", result.getOwnerState()); - jsonResult.put("religion", result.getReligion()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("street", result.getStreet()); - jsonResult.put("zipcode", result.getZipcode()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaMyKasFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java deleted file mode 100644 index fd69600..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaMyPrFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); - recognizer.setExtractReligion(jsonRecognizer.optBoolean("extractReligion", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("city", result.getCity()); - jsonResult.put("countryCode", result.getCountryCode()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("nric", result.getNric()); - jsonResult.put("ownerState", result.getOwnerState()); - jsonResult.put("religion", result.getReligion()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("street", result.getStreet()); - jsonResult.put("zipcode", result.getZipcode()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaMyPrFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java deleted file mode 100644 index d559b30..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MalaysiaMyTenteraFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); - recognizer.setExtractReligion(jsonRecognizer.optBoolean("extractReligion", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("armyNumber", result.getArmyNumber()); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("city", result.getCity()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullAddress", result.getFullAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("nric", result.getNric()); - jsonResult.put("ownerState", result.getOwnerState()); - jsonResult.put("religion", result.getReligion()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("street", result.getStreet()); - jsonResult.put("zipcode", result.getZipcode()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MalaysiaMyTenteraFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java deleted file mode 100644 index b3236ac..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MexicoVoterIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractCurp(jsonRecognizer.optBoolean("extractCurp", true)); - recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("curp", result.getCurp()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("electorKey", result.getElectorKey()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("fullName", result.getFullName()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MexicoVoterIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java deleted file mode 100644 index 98a89d8..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MoroccoIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractCivilStatusNumber(jsonRecognizer.optBoolean("extractCivilStatusNumber", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractFathersName(jsonRecognizer.optBoolean("extractFathersName", true)); - recognizer.setExtractMothersName(jsonRecognizer.optBoolean("extractMothersName", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("civilStatusNumber", result.getCivilStatusNumber()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("fathersName", result.getFathersName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mothersName", result.getMothersName()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MoroccoIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java deleted file mode 100644 index 765dbd5..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class MoroccoIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("name", result.getName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "MoroccoIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java index 224d679..de5075f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java @@ -33,7 +33,7 @@ public JSONObject serializeResult(Recognizer recognizer) { SerializationUtils.addCommonResultData(jsonResult, result); jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); + jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch())); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java deleted file mode 100644 index 42acf6a..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class NewZealandDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractDonorIndicator(jsonRecognizer.optBoolean("extractDonorIndicator", true)); - recognizer.setExtractFirstNames(jsonRecognizer.optBoolean("extractFirstNames", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("cardVersion", result.getCardVersion()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("donorIndicator", result.isDonorIndicator()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstNames", result.getFirstNames()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("licenseNumber", result.getLicenseNumber()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "NewZealandDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java deleted file mode 100644 index 91bb4e6..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class NigeriaVoterIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("rawBarcodeData", result.getRawBarcodeData()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "NigeriaVoterIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java deleted file mode 100644 index 692696a..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class Pdf417RecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer(); - recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", false)); - recognizer.setScanInverse(jsonRecognizer.optBoolean("scanInverse", false)); - recognizer.setScanUncertain(jsonRecognizer.optBoolean("scanUncertain", true)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("barcodeType", SerializationUtils.serializeEnum(result.getBarcodeType())); - jsonResult.put("rawData", SerializationUtils.encodeByteArrayToBase64(result.getRawData())); - jsonResult.put("stringData", result.getStringData()); - jsonResult.put("uncertain", result.isUncertain()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "Pdf417Recognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java deleted file mode 100644 index 3bdc183..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class PolandCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFamilyName(jsonRecognizer.optBoolean("extractFamilyName", false)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractParentsGivenNames(jsonRecognizer.optBoolean("extractParentsGivenNames", false)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("familyName", result.getFamilyName()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("parentsGivenNames", result.getParentsGivenNames()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "PolandCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java deleted file mode 100644 index fbabeb5..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class PolandIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "PolandIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java deleted file mode 100644 index ea3f6cd..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class PolandIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFamilyName(jsonRecognizer.optBoolean("extractFamilyName", false)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractParentsGivenNames(jsonRecognizer.optBoolean("extractParentsGivenNames", false)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("familyName", result.getFamilyName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("parentsGivenNames", result.getParentsGivenNames()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "PolandIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java deleted file mode 100644 index 23cfdf7..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class RomaniaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("cnpNumber", result.getCnpNumber()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("parentName", result.getParentName()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "RomaniaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SerializationUtils.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SerializationUtils.java index 07c2a71..c6eaebd 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SerializationUtils.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SerializationUtils.java @@ -1,7 +1,6 @@ package com.phonegap.plugins.microblink.recognizers.serialization; import android.graphics.Bitmap; -import android.support.annotation.Nullable; import android.util.Base64; import com.microblink.entities.recognizers.Recognizer; @@ -11,13 +10,15 @@ import com.microblink.results.date.Date; import com.microblink.results.date.DateResult; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; -import org.json.JSONArray; import java.io.ByteArrayOutputStream; import java.io.IOException; +import androidx.annotation.Nullable; + public abstract class SerializationUtils { private static final int COMPRESSED_IMAGE_QUALITY = 90; diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java deleted file mode 100644 index b554bfa..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SimNumberRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer(); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("simNumber", result.getSimNumber()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SimNumberRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java deleted file mode 100644 index 07443d4..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SingaporeChangiEmployeeIdRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCompanyName(jsonRecognizer.optBoolean("extractCompanyName", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("companyName", result.getCompanyName()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("name", result.getName()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SingaporeChangiEmployeeIdRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java deleted file mode 100644 index 13c82d8..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SingaporeCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAddressChangeDate(jsonRecognizer.optBoolean("extractAddressChangeDate", false)); - recognizer.setExtractBloodGroup(jsonRecognizer.optBoolean("extractBloodGroup", true)); - recognizer.setExtractCountryOfBirth(jsonRecognizer.optBoolean("extractCountryOfBirth", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractRace(jsonRecognizer.optBoolean("extractRace", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("addressChangeDate", SerializationUtils.serializeDate(result.getAddressChangeDate())); - jsonResult.put("bloodGroup", result.getBloodGroup()); - jsonResult.put("countryOfBirth", result.getCountryOfBirth()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("identityCardNumber", result.getIdentityCardNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("race", result.getRace()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SingaporeCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java deleted file mode 100644 index 2c6754d..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SingaporeDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractBirthDate(jsonRecognizer.optBoolean("extractBirthDate", true)); - recognizer.setExtractIssueDate(jsonRecognizer.optBoolean("extractIssueDate", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractValidTill(jsonRecognizer.optBoolean("extractValidTill", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("birthDate", SerializationUtils.serializeDate(result.getBirthDate())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issueDate", SerializationUtils.serializeDate(result.getIssueDate())); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("validTill", SerializationUtils.serializeDate(result.getValidTill())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SingaporeDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java deleted file mode 100644 index bbaf286..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SingaporeIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAddressChangeDate(jsonRecognizer.optBoolean("extractAddressChangeDate", true)); - recognizer.setExtractBloodGroup(jsonRecognizer.optBoolean("extractBloodGroup", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("addressChangeDate", SerializationUtils.serializeDate(result.getAddressChangeDate())); - jsonResult.put("bloodGroup", result.getBloodGroup()); - jsonResult.put("cardNumber", result.getCardNumber()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SingaporeIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java deleted file mode 100644 index 2c1d84f..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SingaporeIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractCountryOfBirth(jsonRecognizer.optBoolean("extractCountryOfBirth", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractRace(jsonRecognizer.optBoolean("extractRace", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("countryOfBirth", result.getCountryOfBirth()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("identityCardNumber", result.getIdentityCardNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("race", result.getRace()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SingaporeIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java deleted file mode 100644 index 4f06646..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SlovakiaCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSpecialRemarks(jsonRecognizer.optBoolean("extractSpecialRemarks", true)); - recognizer.setExtractSurnameAtBirth(jsonRecognizer.optBoolean("extractSurnameAtBirth", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("specialRemarks", result.getSpecialRemarks()); - jsonResult.put("surnameAtBirth", result.getSurnameAtBirth()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SlovakiaCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java deleted file mode 100644 index 414c545..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SlovakiaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSpecialRemarks(jsonRecognizer.optBoolean("extractSpecialRemarks", true)); - recognizer.setExtractSurnameAtBirth(jsonRecognizer.optBoolean("extractSurnameAtBirth", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("specialRemarks", result.getSpecialRemarks()); - jsonResult.put("surnameAtBirth", result.getSurnameAtBirth()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SlovakiaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java deleted file mode 100644 index 9d204ad..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SlovakiaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuedBy(jsonRecognizer.optBoolean("extractIssuedBy", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuedBy", result.getIssuedBy()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("personalNumber", result.getPersonalNumber()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SlovakiaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java deleted file mode 100644 index a41b0c6..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SloveniaCombinedRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAdministrativeUnit(jsonRecognizer.optBoolean("extractAdministrativeUnit", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("administrativeUnit", result.getAdministrativeUnit()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); - jsonResult.put("documentNumber", result.getDocumentNumber()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); - jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("mrzVerified", result.isMrzVerified()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("pin", result.getPin()); - jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SloveniaCombinedRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java deleted file mode 100644 index 1f93407..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SloveniaIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); - recognizer.setExtractAdministrativeUnit(jsonRecognizer.optBoolean("extractAdministrativeUnit", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("address", result.getAddress()); - jsonResult.put("administrativeUnit", result.getAdministrativeUnit()); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SloveniaIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java deleted file mode 100644 index c1d7c5a..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SloveniaIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractGivenNames(jsonRecognizer.optBoolean("extractGivenNames", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenNames", result.getGivenNames()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SloveniaIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java deleted file mode 100644 index 53e3775..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SpainDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractLicenceCategories(jsonRecognizer.optBoolean("extractLicenceCategories", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setExtractValidFrom(jsonRecognizer.optBoolean("extractValidFrom", true)); - recognizer.setExtractValidUntil(jsonRecognizer.optBoolean("extractValidUntil", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("licenceCategories", result.getLicenceCategories()); - jsonResult.put("number", result.getNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - jsonResult.put("validFrom", SerializationUtils.serializeDate(result.getValidFrom())); - jsonResult.put("validUntil", SerializationUtils.serializeDate(result.getValidUntil())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SpainDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java deleted file mode 100644 index 589b99b..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SwedenDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractIssuingAgency(jsonRecognizer.optBoolean("extractIssuingAgency", true)); - recognizer.setExtractLicenceCategories(jsonRecognizer.optBoolean("extractLicenceCategories", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractReferenceNumber(jsonRecognizer.optBoolean("extractReferenceNumber", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAgency", result.getIssuingAgency()); - jsonResult.put("licenceCategories", result.getLicenceCategories()); - jsonResult.put("licenceNumber", result.getLicenceNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("referenceNumber", result.getReferenceNumber()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SwedenDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java deleted file mode 100644 index 87735bd..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SwitzerlandDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); - recognizer.setExtractIssuingAuthority(jsonRecognizer.optBoolean("extractIssuingAuthority", true)); - recognizer.setExtractLastName(jsonRecognizer.optBoolean("extractLastName", true)); - recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); - recognizer.setExtractVehicleCategories(jsonRecognizer.optBoolean("extractVehicleCategories", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("expiryDatePermanent", result.isExpiryDatePermanent()); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("firstName", result.getFirstName()); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issuingAuthority", result.getIssuingAuthority()); - jsonResult.put("lastName", result.getLastName()); - jsonResult.put("licenseNumber", result.getLicenseNumber()); - jsonResult.put("placeOfBirth", result.getPlaceOfBirth()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("vehicleCategories", result.getVehicleCategories()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SwitzerlandDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java deleted file mode 100644 index ead371f..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SwitzerlandIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractPlaceOfOrigin(jsonRecognizer.optBoolean("extractPlaceOfOrigin", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("height", result.getHeight()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("placeOfOrigin", result.getPlaceOfOrigin()); - jsonResult.put("sex", result.getSex()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SwitzerlandIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java deleted file mode 100644 index f2b7c69..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SwitzerlandIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - recognizer.setReturnSignatureImage(jsonRecognizer.optBoolean("returnSignatureImage", false)); - recognizer.setSignatureImageDpi(jsonRecognizer.optInt("signatureImageDpi", 250)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SwitzerlandIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java deleted file mode 100644 index 0f48fea..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class SwitzerlandPassportRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); - recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); - recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); - recognizer.setExtractHeight(jsonRecognizer.optBoolean("extractHeight", true)); - recognizer.setExtractPassportNumber(jsonRecognizer.optBoolean("extractPassportNumber", true)); - recognizer.setExtractPlaceOfOrigin(jsonRecognizer.optBoolean("extractPlaceOfOrigin", true)); - recognizer.setExtractSex(jsonRecognizer.optBoolean("extractSex", true)); - recognizer.setExtractSurname(jsonRecognizer.optBoolean("extractSurname", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("authority", result.getAuthority()); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); - jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("givenName", result.getGivenName()); - jsonResult.put("height", result.getHeight()); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - jsonResult.put("passportNumber", result.getPassportNumber()); - jsonResult.put("placeOfOrigin", result.getPlaceOfOrigin()); - jsonResult.put("sex", result.getSex()); - jsonResult.put("surname", result.getSurname()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "SwitzerlandPassportRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java deleted file mode 100644 index 07a6e37..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class UnitedArabEmiratesDlFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); - recognizer.setExtractIssueDate(jsonRecognizer.optBoolean("extractIssueDate", true)); - recognizer.setExtractLicenseNumber(jsonRecognizer.optBoolean("extractLicenseNumber", true)); - recognizer.setExtractLicensingAuthority(jsonRecognizer.optBoolean("extractLicensingAuthority", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setExtractPlaceOfIssue(jsonRecognizer.optBoolean("extractPlaceOfIssue", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); - jsonResult.put("expiryDate", SerializationUtils.serializeDate(result.getExpiryDate())); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("issueDate", SerializationUtils.serializeDate(result.getIssueDate())); - jsonResult.put("licenseNumber", result.getLicenseNumber()); - jsonResult.put("licensingAuthority", result.getLicensingAuthority()); - jsonResult.put("name", result.getName()); - jsonResult.put("nationality", result.getNationality()); - jsonResult.put("placeOfIssue", result.getPlaceOfIssue()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "UnitedArabEmiratesDlFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java deleted file mode 100644 index f735ac2..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class UnitedArabEmiratesIdBackRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "UnitedArabEmiratesIdBackRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java deleted file mode 100644 index ace620f..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class UnitedArabEmiratesIdFrontRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer(); - recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); - recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); - recognizer.setExtractNationality(jsonRecognizer.optBoolean("extractNationality", true)); - recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); - recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); - recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); - recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); - recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); - jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); - jsonResult.put("idNumber", result.getIdNumber()); - jsonResult.put("name", result.getName()); - jsonResult.put("nationality", result.getNationality()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "UnitedArabEmiratesIdFrontRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java index a5f67c0..b729791 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java @@ -32,7 +32,7 @@ public JSONObject serializeResult(Recognizer recognizer) { SerializationUtils.addCommonResultData(jsonResult, result); jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); jsonResult.put("digitalSignatureVersion", result.getDigitalSignatureVersion()); - jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); + jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch())); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java deleted file mode 100644 index 9512c11..0000000 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.phonegap.plugins.microblink.recognizers.serialization; - -import com.microblink.entities.recognizers.Recognizer; -import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; - -import org.json.JSONException; -import org.json.JSONObject; - -public final class VinRecognizerSerialization implements RecognizerSerialization { - - @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { - com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer(); - return recognizer; - } - - @Override - public JSONObject serializeResult(Recognizer recognizer) { - com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer)recognizer).getResult(); - JSONObject jsonResult = new JSONObject(); - try { - SerializationUtils.addCommonResultData(jsonResult, result); - jsonResult.put("vin", result.getVin()); - } catch (JSONException e) { - // see https://developer.android.com/reference/org/json/JSONException - throw new RuntimeException(e); - } - return jsonResult; - } - - @Override - public String getJsonName() { - return "VinRecognizer"; - } - - @Override - public Class getRecognizerClass() { - return com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer.class; - } -} \ No newline at end of file diff --git a/BlinkID/src/android/libBlinkID.gradle b/BlinkID/src/android/libBlinkID.gradle index b50b410..f2a36d9 100644 --- a/BlinkID/src/android/libBlinkID.gradle +++ b/BlinkID/src/android/libBlinkID.gradle @@ -5,7 +5,7 @@ repositories { } dependencies { - implementation('com.microblink:blinkid:4.11.1@aar') { + implementation('com.microblink:blinkid:5.0.0@aar') { transitive = true } } diff --git a/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m b/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m index 3db2475..31da910 100644 --- a/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m +++ b/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m @@ -8,9 +8,6 @@ #import "MBOverlaySettingsSerializers.h" #import "MBOverlayVCCreator.h" - -#import "MBBarcodeOverlaySettingsSerialization.h" -#import "MBBlinkCardOverlaySettingsSerialization.h" #import "MBDocumentOverlaySettingsSerialization.h" #import "MBDocumentVerificationOverlaySettingsSerialization.h" #import "MBBlinkIdOverlaySettingsSerialization.h" @@ -31,9 +28,6 @@ - (instancetype)init { self = [super init]; if (self) { _overlayCreators = [[NSMutableDictionary alloc] init]; - - [self registerMapping:[[MBBarcodeOverlaySettingsSerialization alloc] init]]; - [self registerMapping:[[MBBlinkCardOverlaySettingsSerialization alloc] init]]; [self registerMapping:[[MBDocumentOverlaySettingsSerialization alloc] init]]; [self registerMapping:[[MBDocumentVerificationOverlaySettingsSerialization alloc] init]]; [self registerMapping:[[MBBlinkIdOverlaySettingsSerialization alloc] init]]; diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/.gitignore b/BlinkID/src/ios/sources/Overlays/Serialization/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.h b/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.h deleted file mode 100644 index 35abdb5..0000000 --- a/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// MBBarcodeOverlaySettingsSerialization.h -// BlinkIdDevDemo -// -// Created by DoDo on 04/06/2018. -// - -#import "MBOverlayVCCreator.h" - -#import - -@interface MBBarcodeOverlaySettingsSerialization : NSObject - -@end diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.m b/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.m deleted file mode 100644 index 8586417..0000000 --- a/BlinkID/src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// MBBarcodeOverlaySettingsSerialization.m -// BlinkIdDevDemo -// -// Created by DoDo on 04/06/2018. -// - -#import "MBBarcodeOverlaySettingsSerialization.h" - -@interface MBBarcodeOverlaySettingsSerialization () - -@property (nonatomic, weak) id delegate; - -@end - -@implementation MBBarcodeOverlaySettingsSerialization - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BarcodeOverlaySettings"; - } - return self; -} - --(MBOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOverlaySettings recognizerCollection:(MBRecognizerCollection*)recognizerCollection delegate:(id) delegate { - // no settings deserialized at the moment - MBBarcodeOverlaySettings *sett = [[MBBarcodeOverlaySettings alloc] init]; - self.delegate = delegate; - return [[MBBarcodeOverlayViewController alloc] initWithSettings:sett recognizerCollection:recognizerCollection delegate:self]; -} - -- (void)barcodeOverlayViewControllerDidFinishScanning:(nonnull MBBarcodeOverlayViewController *)barcodeOverlayViewController state:(MBRecognizerResultState)state { - [self.delegate overlayViewControllerDidFinishScanning:barcodeOverlayViewController state:state]; -} - -- (void)barcodeOverlayViewControllerDidTapClose:(nonnull MBBarcodeOverlayViewController *)barcodeOverlayViewController { - [self.delegate overlayDidTapClose:barcodeOverlayViewController]; -} - -@end diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.h b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.h deleted file mode 100644 index 967cd3b..0000000 --- a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// MBBlinkCardOverlaySettingsSerialization.h -// BlinkIdDevDemo -// -// Created by DoDo on 04/06/2018. -// - -#import "MBOverlayVCCreator.h" - -#import - -@interface MBBlinkCardOverlaySettingsSerialization : NSObject - -@end diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.m b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.m deleted file mode 100644 index b6e800d..0000000 --- a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.m +++ /dev/null @@ -1,52 +0,0 @@ -// -// MBBlinkCardOverlaySettingsSerialization.m -// BlinkIdDevDemo -// -// Created by DoDo on 04/06/2018. -// - -#import "MBBlinkCardOverlaySettingsSerialization.h" - -@interface MBBlinkCardOverlaySettingsSerialization () - -@property (nonatomic, weak) id delegate; - -@end - -@implementation MBBlinkCardOverlaySettingsSerialization - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BlinkCardOverlaySettings"; - } - return self; -} - --(MBOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOverlaySettings recognizerCollection:(MBRecognizerCollection*)recognizerCollection delegate:(id) delegate { - // no settings deserialized at the moment - MBBlinkCardOverlaySettings *sett = [[MBBlinkCardOverlaySettings alloc] init]; - self.delegate = delegate; - - { - id glareMessage = [jsonOverlaySettings valueForKey:@"glareMessage"]; - if (glareMessage != nil) { - sett.glareStatusMessage = (NSString *)glareMessage; - } - } - - return [[MBBlinkCardOverlayViewController alloc] initWithSettings:sett recognizerCollection:recognizerCollection delegate:self]; -} - - -- (void)blinkCardOverlayViewControllerDidFinishScanning:(nonnull MBBlinkCardOverlayViewController *)blinkCardOverlayViewController state:(MBRecognizerResultState)state { - [self.delegate overlayViewControllerDidFinishScanning:blinkCardOverlayViewController state:state]; -} - -- (void)blinkCardOverlayViewControllerDidTapClose:(nonnull MBBlinkCardOverlayViewController *)blinkCardOverlayViewController { - [self.delegate overlayDidTapClose:blinkCardOverlayViewController]; -} - -@end diff --git a/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m b/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m index 3287de1..d67dcc6 100644 --- a/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m +++ b/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m @@ -2,103 +2,12 @@ #import "MBRecognizerWrapper.h" #import "MBSuccessFrameGrabberRecognizerWrapper.h" -#import "MBAustraliaDlBackRecognizerWrapper.h" -#import "MBAustraliaDlFrontRecognizerWrapper.h" -#import "MBAustriaCombinedRecognizerWrapper.h" -#import "MBAustriaDlFrontRecognizerWrapper.h" -#import "MBAustriaIdBackRecognizerWrapper.h" -#import "MBAustriaIdFrontRecognizerWrapper.h" -#import "MBAustriaPassportRecognizerWrapper.h" -#import "MBBarcodeRecognizerWrapper.h" -#import "MBBelgiumCombinedRecognizerWrapper.h" -#import "MBBelgiumIdBackRecognizerWrapper.h" -#import "MBBelgiumIdFrontRecognizerWrapper.h" -#import "MBBlinkCardEliteRecognizerWrapper.h" -#import "MBBlinkCardRecognizerWrapper.h" #import "MBBlinkIdCombinedRecognizerWrapper.h" #import "MBBlinkIdRecognizerWrapper.h" -#import "MBBruneiIdBackRecognizerWrapper.h" -#import "MBBruneiIdFrontRecognizerWrapper.h" -#import "MBBruneiMilitaryIdBackRecognizerWrapper.h" -#import "MBBruneiMilitaryIdFrontRecognizerWrapper.h" -#import "MBBruneiResidencePermitBackRecognizerWrapper.h" -#import "MBBruneiResidencePermitFrontRecognizerWrapper.h" -#import "MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h" -#import "MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.h" -#import "MBColombiaDlFrontRecognizerWrapper.h" -#import "MBColombiaIdBackRecognizerWrapper.h" -#import "MBColombiaIdFrontRecognizerWrapper.h" -#import "MBCroatiaCombinedRecognizerWrapper.h" -#import "MBCroatiaIdBackRecognizerWrapper.h" -#import "MBCroatiaIdFrontRecognizerWrapper.h" -#import "MBCyprusIdBackRecognizerWrapper.h" -#import "MBCyprusIdFrontRecognizerWrapper.h" -#import "MBCyprusOldIdBackRecognizerWrapper.h" -#import "MBCyprusOldIdFrontRecognizerWrapper.h" -#import "MBCzechiaCombinedRecognizerWrapper.h" -#import "MBCzechiaIdBackRecognizerWrapper.h" -#import "MBCzechiaIdFrontRecognizerWrapper.h" #import "MBDocumentFaceRecognizerWrapper.h" -#import "MBEgyptIdFrontRecognizerWrapper.h" -#import "MBEudlRecognizerWrapper.h" -#import "MBGermanyCombinedRecognizerWrapper.h" -#import "MBGermanyDlBackRecognizerWrapper.h" -#import "MBGermanyDlFrontRecognizerWrapper.h" -#import "MBGermanyIdBackRecognizerWrapper.h" -#import "MBGermanyIdFrontRecognizerWrapper.h" -#import "MBGermanyIdOldRecognizerWrapper.h" -#import "MBGermanyPassportRecognizerWrapper.h" -#import "MBHongKongIdFrontRecognizerWrapper.h" -#import "MBIndonesiaIdFrontRecognizerWrapper.h" -#import "MBIrelandDlFrontRecognizerWrapper.h" -#import "MBItalyDlFrontRecognizerWrapper.h" -#import "MBJordanCombinedRecognizerWrapper.h" -#import "MBJordanIdBackRecognizerWrapper.h" -#import "MBJordanIdFrontRecognizerWrapper.h" -#import "MBKuwaitIdBackRecognizerWrapper.h" -#import "MBKuwaitIdFrontRecognizerWrapper.h" -#import "MBMalaysiaDlFrontRecognizerWrapper.h" -#import "MBMalaysiaIkadFrontRecognizerWrapper.h" -#import "MBMalaysiaMyKadBackRecognizerWrapper.h" -#import "MBMalaysiaMyKadFrontRecognizerWrapper.h" -#import "MBMalaysiaMyKasFrontRecognizerWrapper.h" -#import "MBMalaysiaMyPrFrontRecognizerWrapper.h" -#import "MBMalaysiaMyTenteraFrontRecognizerWrapper.h" -#import "MBMexicoVoterIdFrontRecognizerWrapper.h" -#import "MBMoroccoIdBackRecognizerWrapper.h" -#import "MBMoroccoIdFrontRecognizerWrapper.h" #import "MBMrtdCombinedRecognizerWrapper.h" #import "MBMrtdRecognizerWrapper.h" -#import "MBNewZealandDlFrontRecognizerWrapper.h" -#import "MBNigeriaVoterIdBackRecognizerWrapper.h" #import "MBPassportRecognizerWrapper.h" -#import "MBPdf417RecognizerWrapper.h" -#import "MBPolandCombinedRecognizerWrapper.h" -#import "MBPolandIdBackRecognizerWrapper.h" -#import "MBPolandIdFrontRecognizerWrapper.h" -#import "MBRomaniaIdFrontRecognizerWrapper.h" -#import "MBSimNumberRecognizerWrapper.h" -#import "MBSingaporeChangiEmployeeIdRecognizerWrapper.h" -#import "MBSingaporeCombinedRecognizerWrapper.h" -#import "MBSingaporeDlFrontRecognizerWrapper.h" -#import "MBSingaporeIdBackRecognizerWrapper.h" -#import "MBSingaporeIdFrontRecognizerWrapper.h" -#import "MBSlovakiaCombinedRecognizerWrapper.h" -#import "MBSlovakiaIdBackRecognizerWrapper.h" -#import "MBSlovakiaIdFrontRecognizerWrapper.h" -#import "MBSloveniaCombinedRecognizerWrapper.h" -#import "MBSloveniaIdBackRecognizerWrapper.h" -#import "MBSloveniaIdFrontRecognizerWrapper.h" -#import "MBSpainDlFrontRecognizerWrapper.h" -#import "MBSwedenDlFrontRecognizerWrapper.h" -#import "MBSwitzerlandDlFrontRecognizerWrapper.h" -#import "MBSwitzerlandIdBackRecognizerWrapper.h" -#import "MBSwitzerlandIdFrontRecognizerWrapper.h" -#import "MBSwitzerlandPassportRecognizerWrapper.h" -#import "MBUnitedArabEmiratesDlFrontRecognizerWrapper.h" -#import "MBUnitedArabEmiratesIdBackRecognizerWrapper.h" -#import "MBUnitedArabEmiratesIdFrontRecognizerWrapper.h" -#import "MBVinRecognizerWrapper.h" #import "MBVisaRecognizerWrapper.h" #import "MBUsdlRecognizerWrapper.h" #import "MBUsdlCombinedRecognizerWrapper.h" @@ -121,103 +30,12 @@ - (instancetype)init { if (self) { _recognizerSerializers = [[NSMutableDictionary alloc] init]; [self registerCreator:[[MBSuccessFrameGrabberRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustraliaDlBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustraliaDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustriaCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustriaDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustriaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustriaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBAustriaPassportRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBarcodeRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBelgiumCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBelgiumIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBelgiumIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBlinkCardEliteRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBlinkCardRecognizerCreator alloc] init]]; [self registerCreator:[[MBBlinkIdCombinedRecognizerCreator alloc] init]]; [self registerCreator:[[MBBlinkIdRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiMilitaryIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiMilitaryIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiResidencePermitBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiResidencePermitFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiTemporaryResidencePermitBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBBruneiTemporaryResidencePermitFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBColombiaDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBColombiaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBColombiaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCroatiaCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCroatiaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCroatiaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCyprusIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCyprusIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCyprusOldIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCyprusOldIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCzechiaCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCzechiaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBCzechiaIdFrontRecognizerCreator alloc] init]]; [self registerCreator:[[MBDocumentFaceRecognizerCreator alloc] init]]; - [self registerCreator:[[MBEgyptIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBEudlRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyDlBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyIdOldRecognizerCreator alloc] init]]; - [self registerCreator:[[MBGermanyPassportRecognizerCreator alloc] init]]; - [self registerCreator:[[MBHongKongIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBIndonesiaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBIrelandDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBItalyDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBJordanCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBJordanIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBJordanIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBKuwaitIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBKuwaitIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaIkadFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaMyKadBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaMyKadFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaMyKasFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaMyPrFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMalaysiaMyTenteraFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMexicoVoterIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMoroccoIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBMoroccoIdFrontRecognizerCreator alloc] init]]; [self registerCreator:[[MBMrtdCombinedRecognizerCreator alloc] init]]; [self registerCreator:[[MBMrtdRecognizerCreator alloc] init]]; - [self registerCreator:[[MBNewZealandDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBNigeriaVoterIdBackRecognizerCreator alloc] init]]; [self registerCreator:[[MBPassportRecognizerCreator alloc] init]]; - [self registerCreator:[[MBPdf417RecognizerCreator alloc] init]]; - [self registerCreator:[[MBPolandCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBPolandIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBPolandIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBRomaniaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSimNumberRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSingaporeChangiEmployeeIdRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSingaporeCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSingaporeDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSingaporeIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSingaporeIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSlovakiaCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSlovakiaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSlovakiaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSloveniaCombinedRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSloveniaIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSloveniaIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSpainDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSwedenDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSwitzerlandDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSwitzerlandIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSwitzerlandIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBSwitzerlandPassportRecognizerCreator alloc] init]]; - [self registerCreator:[[MBUnitedArabEmiratesDlFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBUnitedArabEmiratesIdBackRecognizerCreator alloc] init]]; - [self registerCreator:[[MBUnitedArabEmiratesIdFrontRecognizerCreator alloc] init]]; - [self registerCreator:[[MBVinRecognizerCreator alloc] init]]; [self registerCreator:[[MBVisaRecognizerCreator alloc] init]]; [self registerCreator:[[MBUsdlRecognizerCreator alloc] init]]; [self registerCreator:[[MBUsdlCombinedRecognizerCreator alloc] init]]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.h deleted file mode 100644 index a4133ae..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustraliaDlBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.m deleted file mode 100644 index ad28cd1..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlBackRecognizerWrapper.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "MBAustraliaDlBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustraliaDlBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustraliaDlBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustraliaDlBackRecognizer *recognizer = [[MBAustraliaDlBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractLicenceNumber = [jsonRecognizer valueForKey:@"extractLicenceNumber"]; - if (extractLicenceNumber != nil) { - recognizer.extractLicenceNumber = [(NSNumber *)extractLicenceNumber boolValue]; - } - } - { - id extractLicenseExpiry = [jsonRecognizer valueForKey:@"extractLicenseExpiry"]; - if (extractLicenseExpiry != nil) { - recognizer.extractLicenseExpiry = [(NSNumber *)extractLicenseExpiry boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustraliaDlBackRecognizer (JsonSerialization) -@end - -@implementation MBAustraliaDlBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.licenceExpiry] forKey:@"licenceExpiry"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.h deleted file mode 100644 index cd9494e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustraliaDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.m deleted file mode 100644 index 0478046..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,117 +0,0 @@ -#import "MBAustraliaDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustraliaDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustraliaDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustraliaDlFrontRecognizer *recognizer = [[MBAustraliaDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractLicenseExpiry = [jsonRecognizer valueForKey:@"extractLicenseExpiry"]; - if (extractLicenseExpiry != nil) { - recognizer.extractLicenseExpiry = [(NSNumber *)extractLicenseExpiry boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustraliaDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBAustraliaDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.licenceExpiry] forKey:@"licenceExpiry"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.licenceType forKey:@"licenceType"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.h deleted file mode 100644 index ac7f642..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustriaCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.m deleted file mode 100644 index 1126ee1..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.m +++ /dev/null @@ -1,190 +0,0 @@ -#import "MBAustriaCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustriaCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustriaCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustriaCombinedRecognizer *recognizer = [[MBAustriaCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssuance = [jsonRecognizer valueForKey:@"extractDateOfIssuance"]; - if (extractDateOfIssuance != nil) { - recognizer.extractDateOfIssuance = [(NSNumber *)extractDateOfIssuance boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPassportNumber = [jsonRecognizer valueForKey:@"extractPassportNumber"]; - if (extractPassportNumber != nil) { - recognizer.extractPassportNumber = [(NSNumber *)extractPassportNumber boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractPrincipalResidence = [jsonRecognizer valueForKey:@"extractPrincipalResidence"]; - if (extractPrincipalResidence != nil) { - recognizer.extractPrincipalResidence = [(NSNumber *)extractPrincipalResidence boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustriaCombinedRecognizer (JsonSerialization) -@end - -@implementation MBAustriaCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssuance] forKey:@"dateOfIssuance"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:self.result.eyeColour forKey:@"eyeColour"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrtdVerified] forKey:@"mrtdVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.principalResidence forKey:@"principalResidence"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.h deleted file mode 100644 index f293e68..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustriaDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.m deleted file mode 100644 index 84da0cc..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,144 +0,0 @@ -#import "MBAustriaDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustriaDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustriaDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustriaDlFrontRecognizer *recognizer = [[MBAustriaDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractVehicleCategories = [jsonRecognizer valueForKey:@"extractVehicleCategories"]; - if (extractVehicleCategories != nil) { - recognizer.extractVehicleCategories = [(NSNumber *)extractVehicleCategories boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustriaDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBAustriaDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.vehicleCategories forKey:@"vehicleCategories"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.h deleted file mode 100644 index c3ffa2e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustriaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.m deleted file mode 100644 index 36f5cf3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,99 +0,0 @@ -#import "MBAustriaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustriaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustriaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustriaIdBackRecognizer *recognizer = [[MBAustriaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfIssuance = [jsonRecognizer valueForKey:@"extractDateOfIssuance"]; - if (extractDateOfIssuance != nil) { - recognizer.extractDateOfIssuance = [(NSNumber *)extractDateOfIssuance boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractPrincipalResidence = [jsonRecognizer valueForKey:@"extractPrincipalResidence"]; - if (extractPrincipalResidence != nil) { - recognizer.extractPrincipalResidence = [(NSNumber *)extractPrincipalResidence boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustriaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBAustriaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssuance] forKey:@"dateOfIssuance"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:self.result.eyeColour forKey:@"eyeColour"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.principalResidence forKey:@"principalResidence"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.h deleted file mode 100644 index 404c7cf..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustriaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.m deleted file mode 100644 index bf1d1b0..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,116 +0,0 @@ -#import "MBAustriaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustriaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustriaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustriaIdFrontRecognizer *recognizer = [[MBAustriaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustriaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBAustriaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.h deleted file mode 100644 index b3a3e7e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBAustriaPassportRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.m deleted file mode 100644 index d4c1bfd..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.m +++ /dev/null @@ -1,165 +0,0 @@ -#import "MBAustriaPassportRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBAustriaPassportRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"AustriaPassportRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBAustriaPassportRecognizer *recognizer = [[MBAustriaPassportRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPassportNumber = [jsonRecognizer valueForKey:@"extractPassportNumber"]; - if (extractPassportNumber != nil) { - recognizer.extractPassportNumber = [(NSNumber *)extractPassportNumber boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBAustriaPassportRecognizer (JsonSerialization) -@end - -@implementation MBAustriaPassportRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.passportNumber forKey:@"passportNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.h deleted file mode 100644 index cdba3eb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBarcodeRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.m deleted file mode 100644 index e29cc33..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.m +++ /dev/null @@ -1,142 +0,0 @@ -#import "MBBarcodeRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBarcodeRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BarcodeRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBarcodeRecognizer *recognizer = [[MBBarcodeRecognizer alloc] init]; - { - id autoScaleDetection = [jsonRecognizer valueForKey:@"autoScaleDetection"]; - if (autoScaleDetection != nil) { - recognizer.autoScaleDetection = [(NSNumber *)autoScaleDetection boolValue]; - } - } - { - id nullQuietZoneAllowed = [jsonRecognizer valueForKey:@"nullQuietZoneAllowed"]; - if (nullQuietZoneAllowed != nil) { - recognizer.nullQuietZoneAllowed = [(NSNumber *)nullQuietZoneAllowed boolValue]; - } - } - { - id readCode39AsExtendedData = [jsonRecognizer valueForKey:@"readCode39AsExtendedData"]; - if (readCode39AsExtendedData != nil) { - recognizer.readCode39AsExtendedData = [(NSNumber *)readCode39AsExtendedData boolValue]; - } - } - { - id scanAztecCode = [jsonRecognizer valueForKey:@"scanAztecCode"]; - if (scanAztecCode != nil) { - recognizer.scanAztecCode = [(NSNumber *)scanAztecCode boolValue]; - } - } - { - id scanCode128 = [jsonRecognizer valueForKey:@"scanCode128"]; - if (scanCode128 != nil) { - recognizer.scanCode128 = [(NSNumber *)scanCode128 boolValue]; - } - } - { - id scanCode39 = [jsonRecognizer valueForKey:@"scanCode39"]; - if (scanCode39 != nil) { - recognizer.scanCode39 = [(NSNumber *)scanCode39 boolValue]; - } - } - { - id scanDataMatrix = [jsonRecognizer valueForKey:@"scanDataMatrix"]; - if (scanDataMatrix != nil) { - recognizer.scanDataMatrix = [(NSNumber *)scanDataMatrix boolValue]; - } - } - { - id scanEan13 = [jsonRecognizer valueForKey:@"scanEan13"]; - if (scanEan13 != nil) { - recognizer.scanEan13 = [(NSNumber *)scanEan13 boolValue]; - } - } - { - id scanEan8 = [jsonRecognizer valueForKey:@"scanEan8"]; - if (scanEan8 != nil) { - recognizer.scanEan8 = [(NSNumber *)scanEan8 boolValue]; - } - } - { - id scanInverse = [jsonRecognizer valueForKey:@"scanInverse"]; - if (scanInverse != nil) { - recognizer.scanInverse = [(NSNumber *)scanInverse boolValue]; - } - } - { - id scanItf = [jsonRecognizer valueForKey:@"scanItf"]; - if (scanItf != nil) { - recognizer.scanItf = [(NSNumber *)scanItf boolValue]; - } - } - { - id scanPdf417 = [jsonRecognizer valueForKey:@"scanPdf417"]; - if (scanPdf417 != nil) { - recognizer.scanPdf417 = [(NSNumber *)scanPdf417 boolValue]; - } - } - { - id scanQrCode = [jsonRecognizer valueForKey:@"scanQrCode"]; - if (scanQrCode != nil) { - recognizer.scanQrCode = [(NSNumber *)scanQrCode boolValue]; - } - } - { - id scanUncertain = [jsonRecognizer valueForKey:@"scanUncertain"]; - if (scanUncertain != nil) { - recognizer.scanUncertain = [(NSNumber *)scanUncertain boolValue]; - } - } - { - id scanUpca = [jsonRecognizer valueForKey:@"scanUpca"]; - if (scanUpca != nil) { - recognizer.scanUpca = [(NSNumber *)scanUpca boolValue]; - } - } - { - id scanUpce = [jsonRecognizer valueForKey:@"scanUpce"]; - if (scanUpce != nil) { - recognizer.scanUpce = [(NSNumber *)scanUpce boolValue]; - } - } - { - id slowerThoroughScan = [jsonRecognizer valueForKey:@"slowerThoroughScan"]; - if (slowerThoroughScan != nil) { - recognizer.slowerThoroughScan = [(NSNumber *)slowerThoroughScan boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBarcodeRecognizer (JsonSerialization) -@end - -@implementation MBBarcodeRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[NSNumber numberWithInteger:(self.result.barcodeType + 1)] forKey:@"barcodeType"]; - [jsonResult setValue:[self.result.rawData base64EncodedStringWithOptions:0] forKey:@"rawData"]; - [jsonResult setValue:self.result.stringData forKey:@"stringData"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.uncertain] forKey:@"uncertain"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.h deleted file mode 100644 index 38db895..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBelgiumCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.m deleted file mode 100644 index 09a37d2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumCombinedRecognizerWrapper.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "MBBelgiumCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBelgiumCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BelgiumCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBelgiumCombinedRecognizer *recognizer = [[MBBelgiumCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBelgiumCombinedRecognizer (JsonSerialization) -@end - -@implementation MBBelgiumCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.h deleted file mode 100644 index ab58bac..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBelgiumIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.m deleted file mode 100644 index 04a2cab..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdBackRecognizerWrapper.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "MBBelgiumIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBelgiumIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BelgiumIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBelgiumIdBackRecognizer *recognizer = [[MBBelgiumIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBelgiumIdBackRecognizer (JsonSerialization) -@end - -@implementation MBBelgiumIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.h deleted file mode 100644 index ce5ead5..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBelgiumIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.m deleted file mode 100644 index 041499f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBelgiumIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,75 +0,0 @@ -#import "MBBelgiumIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBelgiumIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BelgiumIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBelgiumIdFrontRecognizer *recognizer = [[MBBelgiumIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBelgiumIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBBelgiumIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.h deleted file mode 100644 index ea2a3ab..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBlinkCardEliteRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.m deleted file mode 100644 index 9b57a15..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.m +++ /dev/null @@ -1,113 +0,0 @@ -#import "MBBlinkCardEliteRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBlinkCardEliteRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BlinkCardEliteRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBlinkCardEliteRecognizer *recognizer = [[MBBlinkCardEliteRecognizer alloc] init]; - { - id anonymizeCardNumber = [jsonRecognizer valueForKey:@"anonymizeCardNumber"]; - if (anonymizeCardNumber != nil) { - recognizer.anonymizeCardNumber = [(NSNumber *)anonymizeCardNumber boolValue]; - } - } - { - id anonymizeCvv = [jsonRecognizer valueForKey:@"anonymizeCvv"]; - if (anonymizeCvv != nil) { - recognizer.anonymizeCvv = [(NSNumber *)anonymizeCvv boolValue]; - } - } - { - id anonymizeOwner = [jsonRecognizer valueForKey:@"anonymizeOwner"]; - if (anonymizeOwner != nil) { - recognizer.anonymizeOwner = [(NSNumber *)anonymizeOwner boolValue]; - } - } - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractInventoryNumber = [jsonRecognizer valueForKey:@"extractInventoryNumber"]; - if (extractInventoryNumber != nil) { - recognizer.extractInventoryNumber = [(NSNumber *)extractInventoryNumber boolValue]; - } - } - { - id extractOwner = [jsonRecognizer valueForKey:@"extractOwner"]; - if (extractOwner != nil) { - recognizer.extractOwner = [(NSNumber *)extractOwner boolValue]; - } - } - { - id extractValidThru = [jsonRecognizer valueForKey:@"extractValidThru"]; - if (extractValidThru != nil) { - recognizer.extractValidThru = [(NSNumber *)extractValidThru boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBlinkCardEliteRecognizer (JsonSerialization) -@end - -@implementation MBBlinkCardEliteRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; - [jsonResult setValue:self.result.cvv forKey:@"cvv"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.inventoryNumber forKey:@"inventoryNumber"]; - [jsonResult setValue:self.result.owner forKey:@"owner"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validThru] forKey:@"validThru"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.h deleted file mode 100644 index 5b014ea..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBlinkCardRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.m deleted file mode 100644 index a0896dc..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkCardRecognizerWrapper.m +++ /dev/null @@ -1,120 +0,0 @@ -#import "MBBlinkCardRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBlinkCardRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BlinkCardRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBlinkCardRecognizer *recognizer = [[MBBlinkCardRecognizer alloc] init]; - { - id anonymizeCardNumber = [jsonRecognizer valueForKey:@"anonymizeCardNumber"]; - if (anonymizeCardNumber != nil) { - recognizer.anonymizeCardNumber = [(NSNumber *)anonymizeCardNumber boolValue]; - } - } - { - id anonymizeCvv = [jsonRecognizer valueForKey:@"anonymizeCvv"]; - if (anonymizeCvv != nil) { - recognizer.anonymizeCvv = [(NSNumber *)anonymizeCvv boolValue]; - } - } - { - id anonymizeOwner = [jsonRecognizer valueForKey:@"anonymizeOwner"]; - if (anonymizeOwner != nil) { - recognizer.anonymizeOwner = [(NSNumber *)anonymizeOwner boolValue]; - } - } - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCvv = [jsonRecognizer valueForKey:@"extractCvv"]; - if (extractCvv != nil) { - recognizer.extractCvv = [(NSNumber *)extractCvv boolValue]; - } - } - { - id extractInventoryNumber = [jsonRecognizer valueForKey:@"extractInventoryNumber"]; - if (extractInventoryNumber != nil) { - recognizer.extractInventoryNumber = [(NSNumber *)extractInventoryNumber boolValue]; - } - } - { - id extractOwner = [jsonRecognizer valueForKey:@"extractOwner"]; - if (extractOwner != nil) { - recognizer.extractOwner = [(NSNumber *)extractOwner boolValue]; - } - } - { - id extractValidThru = [jsonRecognizer valueForKey:@"extractValidThru"]; - if (extractValidThru != nil) { - recognizer.extractValidThru = [(NSNumber *)extractValidThru boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBlinkCardRecognizer (JsonSerialization) -@end - -@implementation MBBlinkCardRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; - [jsonResult setValue:self.result.cvv forKey:@"cvv"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.inventoryNumber forKey:@"inventoryNumber"]; - [jsonResult setValue:[NSNumber numberWithInteger:(self.result.issuer + 1)] forKey:@"issuer"]; - [jsonResult setValue:self.result.owner forKey:@"owner"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validThru] forKey:@"validThru"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m index 48eda6c..d32894d 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m @@ -46,12 +46,6 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; } } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } return recognizer; } @@ -65,20 +59,34 @@ @implementation MBBlinkIdCombinedRecognizer (JsonSerialization) -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; + [jsonResult setValue:self.result.additionalAddressInformation forKey:@"additionalAddressInformation"]; + [jsonResult setValue:self.result.additionalNameInformation forKey:@"additionalNameInformation"]; [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:self.result.conditions forKey:@"conditions"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; + [jsonResult setValue:self.result.documentAdditionalNumber forKey:@"documentAdditionalNumber"]; + [jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch + 1)] forKey:@"documentDataMatch"]; [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; + [jsonResult setValue:self.result.employer forKey:@"employer"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; [jsonResult setValue:self.result.fullName forKey:@"fullName"]; + [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; [jsonResult setValue:self.result.lastName forKey:@"lastName"]; + [jsonResult setValue:self.result.maritalStatus forKey:@"maritalStatus"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; + [jsonResult setValue:self.result.nationality forKey:@"nationality"]; + [jsonResult setValue:self.result.personalIdNumber forKey:@"personalIdNumber"]; + [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; + [jsonResult setValue:self.result.profession forKey:@"profession"]; + [jsonResult setValue:self.result.race forKey:@"race"]; + [jsonResult setValue:self.result.religion forKey:@"religion"]; + [jsonResult setValue:self.result.residentialStatus forKey:@"residentialStatus"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; [jsonResult setValue:self.result.sex forKey:@"sex"]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m index 26931f6..06c94cc 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m @@ -59,17 +59,32 @@ @implementation MBBlinkIdRecognizer (JsonSerialization) -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; + [jsonResult setValue:self.result.additionalAddressInformation forKey:@"additionalAddressInformation"]; + [jsonResult setValue:self.result.additionalNameInformation forKey:@"additionalNameInformation"]; [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:self.result.conditions forKey:@"conditions"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; + [jsonResult setValue:self.result.documentAdditionalNumber forKey:@"documentAdditionalNumber"]; [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; + [jsonResult setValue:self.result.employer forKey:@"employer"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; [jsonResult setValue:self.result.firstName forKey:@"firstName"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; [jsonResult setValue:self.result.fullName forKey:@"fullName"]; + [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; [jsonResult setValue:self.result.lastName forKey:@"lastName"]; + [jsonResult setValue:self.result.maritalStatus forKey:@"maritalStatus"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; + [jsonResult setValue:self.result.nationality forKey:@"nationality"]; + [jsonResult setValue:self.result.personalIdNumber forKey:@"personalIdNumber"]; + [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; + [jsonResult setValue:self.result.profession forKey:@"profession"]; + [jsonResult setValue:self.result.race forKey:@"race"]; + [jsonResult setValue:self.result.religion forKey:@"religion"]; + [jsonResult setValue:self.result.residentialStatus forKey:@"residentialStatus"]; [jsonResult setValue:self.result.sex forKey:@"sex"]; return jsonResult; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.h deleted file mode 100644 index bc61b80..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.m deleted file mode 100644 index 2149155..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdBackRecognizerWrapper.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "MBBruneiIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiIdBackRecognizer *recognizer = [[MBBruneiIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractRace = [jsonRecognizer valueForKey:@"extractRace"]; - if (extractRace != nil) { - recognizer.extractRace = [(NSNumber *)extractRace boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiIdBackRecognizer (JsonSerialization) -@end - -@implementation MBBruneiIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.race forKey:@"race"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.h deleted file mode 100644 index 929fc7f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.m deleted file mode 100644 index 0557685..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MBBruneiIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiIdFrontRecognizer *recognizer = [[MBBruneiIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBBruneiIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.h deleted file mode 100644 index 3f600a2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiMilitaryIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.m deleted file mode 100644 index beefef2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdBackRecognizerWrapper.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "MBBruneiMilitaryIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiMilitaryIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiMilitaryIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiMilitaryIdBackRecognizer *recognizer = [[MBBruneiMilitaryIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiMilitaryIdBackRecognizer (JsonSerialization) -@end - -@implementation MBBruneiMilitaryIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.armyNumber forKey:@"armyNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.h deleted file mode 100644 index c88f9e9..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiMilitaryIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.m deleted file mode 100644 index d18fb32..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "MBBruneiMilitaryIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiMilitaryIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiMilitaryIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiMilitaryIdFrontRecognizer *recognizer = [[MBBruneiMilitaryIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractRank = [jsonRecognizer valueForKey:@"extractRank"]; - if (extractRank != nil) { - recognizer.extractRank = [(NSNumber *)extractRank boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiMilitaryIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBBruneiMilitaryIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.rank forKey:@"rank"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.h deleted file mode 100644 index b8b4d19..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiResidencePermitBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.m deleted file mode 100644 index 38d4bfe..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitBackRecognizerWrapper.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "MBBruneiResidencePermitBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiResidencePermitBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiResidencePermitBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiResidencePermitBackRecognizer *recognizer = [[MBBruneiResidencePermitBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractRace = [jsonRecognizer valueForKey:@"extractRace"]; - if (extractRace != nil) { - recognizer.extractRace = [(NSNumber *)extractRace boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiResidencePermitBackRecognizer (JsonSerialization) -@end - -@implementation MBBruneiResidencePermitBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.race forKey:@"race"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.h deleted file mode 100644 index 0b840ae..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiResidencePermitFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.m deleted file mode 100644 index 6841ebe..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiResidencePermitFrontRecognizerWrapper.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MBBruneiResidencePermitFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiResidencePermitFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiResidencePermitFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiResidencePermitFrontRecognizer *recognizer = [[MBBruneiResidencePermitFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiResidencePermitFrontRecognizer (JsonSerialization) -@end - -@implementation MBBruneiResidencePermitFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h deleted file mode 100644 index 7171cc2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiTemporaryResidencePermitBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.m deleted file mode 100644 index bf6c874..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiTemporaryResidencePermitBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiTemporaryResidencePermitBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiTemporaryResidencePermitBackRecognizer *recognizer = [[MBBruneiTemporaryResidencePermitBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractPassportNumber = [jsonRecognizer valueForKey:@"extractPassportNumber"]; - if (extractPassportNumber != nil) { - recognizer.extractPassportNumber = [(NSNumber *)extractPassportNumber boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiTemporaryResidencePermitBackRecognizer (JsonSerialization) -@end - -@implementation MBBruneiTemporaryResidencePermitBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.passportNumber forKey:@"passportNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.h deleted file mode 100644 index 7435929..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBBruneiTemporaryResidencePermitFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.m deleted file mode 100644 index 430be43..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.m +++ /dev/null @@ -1,110 +0,0 @@ -#import "MBBruneiTemporaryResidencePermitFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBBruneiTemporaryResidencePermitFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"BruneiTemporaryResidencePermitFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBBruneiTemporaryResidencePermitFrontRecognizer *recognizer = [[MBBruneiTemporaryResidencePermitFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBBruneiTemporaryResidencePermitFrontRecognizer (JsonSerialization) -@end - -@implementation MBBruneiTemporaryResidencePermitFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.h deleted file mode 100644 index d320b36..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBColombiaDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.m deleted file mode 100644 index f6e11e3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "MBColombiaDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBColombiaDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"ColombiaDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBColombiaDlFrontRecognizer *recognizer = [[MBColombiaDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDriverRestrictions = [jsonRecognizer valueForKey:@"extractDriverRestrictions"]; - if (extractDriverRestrictions != nil) { - recognizer.extractDriverRestrictions = [(NSNumber *)extractDriverRestrictions boolValue]; - } - } - { - id extractIssuingAgency = [jsonRecognizer valueForKey:@"extractIssuingAgency"]; - if (extractIssuingAgency != nil) { - recognizer.extractIssuingAgency = [(NSNumber *)extractIssuingAgency boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBColombiaDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBColombiaDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.driverRestrictions forKey:@"driverRestrictions"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAgency forKey:@"issuingAgency"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.h deleted file mode 100644 index e68f3da..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBColombiaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.m deleted file mode 100644 index 8cfb491..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,80 +0,0 @@ -#import "MBColombiaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBColombiaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"ColombiaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBColombiaIdBackRecognizer *recognizer = [[MBColombiaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id nullQuietZoneAllowed = [jsonRecognizer valueForKey:@"nullQuietZoneAllowed"]; - if (nullQuietZoneAllowed != nil) { - recognizer.nullQuietZoneAllowed = [(NSNumber *)nullQuietZoneAllowed boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id scanUncertain = [jsonRecognizer valueForKey:@"scanUncertain"]; - if (scanUncertain != nil) { - recognizer.scanUncertain = [(NSNumber *)scanUncertain boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBColombiaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBColombiaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.bloodGroup forKey:@"bloodGroup"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[self.result.fingerprint base64EncodedStringWithOptions:0] forKey:@"fingerprint"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.h deleted file mode 100644 index a6ce97c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBColombiaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.m deleted file mode 100644 index 3dd8a90..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "MBColombiaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBColombiaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"ColombiaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBColombiaIdFrontRecognizer *recognizer = [[MBColombiaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBColombiaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBColombiaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.h deleted file mode 100644 index a79fbc9..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCroatiaCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.m deleted file mode 100644 index 09b527e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.m +++ /dev/null @@ -1,167 +0,0 @@ -#import "MBCroatiaCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCroatiaCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CroatiaCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCroatiaCombinedRecognizer *recognizer = [[MBCroatiaCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCitizenship = [jsonRecognizer valueForKey:@"extractCitizenship"]; - if (extractCitizenship != nil) { - recognizer.extractCitizenship = [(NSNumber *)extractCitizenship boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractResidence = [jsonRecognizer valueForKey:@"extractResidence"]; - if (extractResidence != nil) { - recognizer.extractResidence = [(NSNumber *)extractResidence boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCroatiaCombinedRecognizer (JsonSerialization) -@end - -@implementation MBCroatiaCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.citizenship forKey:@"citizenship"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentBilingual] forKey:@"documentBilingual"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentForNonResident] forKey:@"documentForNonResident"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.oib forKey:@"oib"]; - [jsonResult setValue:self.result.residence forKey:@"residence"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.h deleted file mode 100644 index 39e4d26..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCroatiaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.m deleted file mode 100644 index ce4c88f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,85 +0,0 @@ -#import "MBCroatiaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCroatiaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CroatiaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCroatiaIdBackRecognizer *recognizer = [[MBCroatiaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractResidence = [jsonRecognizer valueForKey:@"extractResidence"]; - if (extractResidence != nil) { - recognizer.extractResidence = [(NSNumber *)extractResidence boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCroatiaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBCroatiaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentForNonResident] forKey:@"documentForNonResident"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.residence forKey:@"residence"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.h deleted file mode 100644 index 383a518..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCroatiaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.m deleted file mode 100644 index e7cfb6d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,132 +0,0 @@ -#import "MBCroatiaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCroatiaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CroatiaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCroatiaIdFrontRecognizer *recognizer = [[MBCroatiaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCitizenship = [jsonRecognizer valueForKey:@"extractCitizenship"]; - if (extractCitizenship != nil) { - recognizer.extractCitizenship = [(NSNumber *)extractCitizenship boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCroatiaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBCroatiaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.citizenship forKey:@"citizenship"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentBilingual] forKey:@"documentBilingual"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.h deleted file mode 100644 index 64b94c7..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCyprusIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.m deleted file mode 100644 index 7141e30..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdBackRecognizerWrapper.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "MBCyprusIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCyprusIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CyprusIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCyprusIdBackRecognizer *recognizer = [[MBCyprusIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCyprusIdBackRecognizer (JsonSerialization) -@end - -@implementation MBCyprusIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.h deleted file mode 100644 index 0d4f290..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCyprusIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.m deleted file mode 100644 index 208a320..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,88 +0,0 @@ -#import "MBCyprusIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCyprusIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CyprusIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCyprusIdFrontRecognizer *recognizer = [[MBCyprusIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCyprusIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBCyprusIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.idNumber forKey:@"idNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.h deleted file mode 100644 index 084e8b3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCyprusOldIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.m deleted file mode 100644 index ef299ef..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdBackRecognizerWrapper.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "MBCyprusOldIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCyprusOldIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CyprusOldIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCyprusOldIdBackRecognizer *recognizer = [[MBCyprusOldIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractExpiresOn = [jsonRecognizer valueForKey:@"extractExpiresOn"]; - if (extractExpiresOn != nil) { - recognizer.extractExpiresOn = [(NSNumber *)extractExpiresOn boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCyprusOldIdBackRecognizer (JsonSerialization) -@end - -@implementation MBCyprusOldIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.expiresOn] forKey:@"expiresOn"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.h deleted file mode 100644 index 15a50a2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCyprusOldIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.m deleted file mode 100644 index f78176f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCyprusOldIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "MBCyprusOldIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCyprusOldIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CyprusOldIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCyprusOldIdFrontRecognizer *recognizer = [[MBCyprusOldIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDocumentNumber = [jsonRecognizer valueForKey:@"extractDocumentNumber"]; - if (extractDocumentNumber != nil) { - recognizer.extractDocumentNumber = [(NSNumber *)extractDocumentNumber boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCyprusOldIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBCyprusOldIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.idNumber forKey:@"idNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.h deleted file mode 100644 index 775f923..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCzechiaCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.m deleted file mode 100644 index f821dd8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaCombinedRecognizerWrapper.m +++ /dev/null @@ -1,171 +0,0 @@ -#import "MBCzechiaCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCzechiaCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CzechiaCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCzechiaCombinedRecognizer *recognizer = [[MBCzechiaCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractPermanentStay = [jsonRecognizer valueForKey:@"extractPermanentStay"]; - if (extractPermanentStay != nil) { - recognizer.extractPermanentStay = [(NSNumber *)extractPermanentStay boolValue]; - } - } - { - id extractPersonalNumber = [jsonRecognizer valueForKey:@"extractPersonalNumber"]; - if (extractPersonalNumber != nil) { - recognizer.extractPersonalNumber = [(NSNumber *)extractPersonalNumber boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCzechiaCombinedRecognizer (JsonSerialization) -@end - -@implementation MBCzechiaCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.permanentStay forKey:@"permanentStay"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.h deleted file mode 100644 index fd716eb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCzechiaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.m deleted file mode 100644 index 39d177d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "MBCzechiaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCzechiaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CzechiaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCzechiaIdBackRecognizer *recognizer = [[MBCzechiaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractPermanentStay = [jsonRecognizer valueForKey:@"extractPermanentStay"]; - if (extractPermanentStay != nil) { - recognizer.extractPermanentStay = [(NSNumber *)extractPermanentStay boolValue]; - } - } - { - id extractPersonalNumber = [jsonRecognizer valueForKey:@"extractPersonalNumber"]; - if (extractPersonalNumber != nil) { - recognizer.extractPersonalNumber = [(NSNumber *)extractPersonalNumber boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCzechiaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBCzechiaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.permanentStay forKey:@"permanentStay"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.h deleted file mode 100644 index f7c4dbf..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBCzechiaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.m deleted file mode 100644 index d5a9137..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBCzechiaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,137 +0,0 @@ -#import "MBCzechiaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBCzechiaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"CzechiaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBCzechiaIdFrontRecognizer *recognizer = [[MBCzechiaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBCzechiaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBCzechiaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.h deleted file mode 100644 index 4792fe6..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBEgyptIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.m deleted file mode 100644 index 10b4dde..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEgyptIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,82 +0,0 @@ -#import "MBEgyptIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBEgyptIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"EgyptIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBEgyptIdFrontRecognizer *recognizer = [[MBEgyptIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractNationalNumber = [jsonRecognizer valueForKey:@"extractNationalNumber"]; - if (extractNationalNumber != nil) { - recognizer.extractNationalNumber = [(NSNumber *)extractNationalNumber boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBEgyptIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBEgyptIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.nationalNumber forKey:@"nationalNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.h deleted file mode 100644 index d439f55..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBEudlRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.m deleted file mode 100644 index 63a9c11..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.m +++ /dev/null @@ -1,114 +0,0 @@ -#import "MBEudlRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBEudlRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"EudlRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBEudlRecognizer *recognizer = [[MBEudlRecognizer alloc] init]; - { - id country = [jsonRecognizer valueForKey:@"country"]; - if (country != nil) { - recognizer.country = (MBEudlCountry)([(NSNumber *)country unsignedIntegerValue] - 1); - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractPersonalNumber = [jsonRecognizer valueForKey:@"extractPersonalNumber"]; - if (extractPersonalNumber != nil) { - recognizer.extractPersonalNumber = [(NSNumber *)extractPersonalNumber boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBEudlRecognizer (JsonSerialization) -@end - -@implementation MBEudlRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.birthData forKey:@"birthData"]; - [jsonResult setValue:[NSNumber numberWithInteger:(self.result.country + 1)] forKey:@"country"]; - [jsonResult setValue:self.result.driverNumber forKey:@"driverNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.expiryDate] forKey:@"expiryDate"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.issueDate] forKey:@"issueDate"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.h deleted file mode 100644 index 2b791ae..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.m deleted file mode 100644 index e85e15c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyCombinedRecognizerWrapper.m +++ /dev/null @@ -1,192 +0,0 @@ -#import "MBGermanyCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyCombinedRecognizer *recognizer = [[MBGermanyCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractCanNumber = [jsonRecognizer valueForKey:@"extractCanNumber"]; - if (extractCanNumber != nil) { - recognizer.extractCanNumber = [(NSNumber *)extractCanNumber boolValue]; - } - } - { - id extractColourOfEyes = [jsonRecognizer valueForKey:@"extractColourOfEyes"]; - if (extractColourOfEyes != nil) { - recognizer.extractColourOfEyes = [(NSNumber *)extractColourOfEyes boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractDocumentNumber = [jsonRecognizer valueForKey:@"extractDocumentNumber"]; - if (extractDocumentNumber != nil) { - recognizer.extractDocumentNumber = [(NSNumber *)extractDocumentNumber boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyCombinedRecognizer (JsonSerialization) -@end - -@implementation MBGermanyCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:self.result.canNumber forKey:@"canNumber"]; - [jsonResult setValue:self.result.colourOfEyes forKey:@"colourOfEyes"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.rawMrzString forKey:@"rawMrzString"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.h deleted file mode 100644 index f2d2651..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyDlBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.m deleted file mode 100644 index d584f04..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.m +++ /dev/null @@ -1,63 +0,0 @@ -#import "MBGermanyDlBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyDlBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyDlBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyDlBackRecognizer *recognizer = [[MBGermanyDlBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyDlBackRecognizer (JsonSerialization) -@end - -@implementation MBGermanyDlBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssueB10] forKey:@"dateOfIssueB10"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfIssueB10NotSpecified] forKey:@"dateOfIssueB10NotSpecified"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.h deleted file mode 100644 index bcbb743..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.m deleted file mode 100644 index c3c9a3d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,144 +0,0 @@ -#import "MBGermanyDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyDlFrontRecognizer *recognizer = [[MBGermanyDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractLicenceCategories = [jsonRecognizer valueForKey:@"extractLicenceCategories"]; - if (extractLicenceCategories != nil) { - recognizer.extractLicenceCategories = [(NSNumber *)extractLicenceCategories boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBGermanyDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.licenceCategories forKey:@"licenceCategories"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.h deleted file mode 100644 index 7bcacab..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.m deleted file mode 100644 index 365d740..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.m +++ /dev/null @@ -1,101 +0,0 @@ -#import "MBGermanyIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyIdBackRecognizer *recognizer = [[MBGermanyIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractColourOfEyes = [jsonRecognizer valueForKey:@"extractColourOfEyes"]; - if (extractColourOfEyes != nil) { - recognizer.extractColourOfEyes = [(NSNumber *)extractColourOfEyes boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyIdBackRecognizer (JsonSerialization) -@end - -@implementation MBGermanyIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.addressCity forKey:@"addressCity"]; - [jsonResult setValue:self.result.addressHouseNumber forKey:@"addressHouseNumber"]; - [jsonResult setValue:self.result.addressStreet forKey:@"addressStreet"]; - [jsonResult setValue:self.result.addressZipCode forKey:@"addressZipCode"]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:self.result.colourOfEyes forKey:@"colourOfEyes"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.h deleted file mode 100644 index 9d56d4f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.m deleted file mode 100644 index 84ff911..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,137 +0,0 @@ -#import "MBGermanyIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyIdFrontRecognizer *recognizer = [[MBGermanyIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCanNumber = [jsonRecognizer valueForKey:@"extractCanNumber"]; - if (extractCanNumber != nil) { - recognizer.extractCanNumber = [(NSNumber *)extractCanNumber boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDocumentNumber = [jsonRecognizer valueForKey:@"extractDocumentNumber"]; - if (extractDocumentNumber != nil) { - recognizer.extractDocumentNumber = [(NSNumber *)extractDocumentNumber boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBGermanyIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.canNumber forKey:@"canNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.h deleted file mode 100644 index 8602208..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyIdOldRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.m deleted file mode 100644 index e1badeb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyIdOldRecognizerWrapper.m +++ /dev/null @@ -1,95 +0,0 @@ -#import "MBGermanyIdOldRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyIdOldRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyIdOldRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyIdOldRecognizer *recognizer = [[MBGermanyIdOldRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyIdOldRecognizer (JsonSerialization) -@end - -@implementation MBGermanyIdOldRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.h deleted file mode 100644 index 2c3f5e1..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBGermanyPassportRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.m deleted file mode 100644 index 06797b6..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.m +++ /dev/null @@ -1,130 +0,0 @@ -#import "MBGermanyPassportRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBGermanyPassportRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"GermanyPassportRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBGermanyPassportRecognizer *recognizer = [[MBGermanyPassportRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBGermanyPassportRecognizer (JsonSerialization) -@end - -@implementation MBGermanyPassportRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.h deleted file mode 100644 index a54f5f4..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBHongKongIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.m deleted file mode 100644 index 87071f3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,117 +0,0 @@ -#import "MBHongKongIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBHongKongIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"HongKongIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBHongKongIdFrontRecognizer *recognizer = [[MBHongKongIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCommercialCode = [jsonRecognizer valueForKey:@"extractCommercialCode"]; - if (extractCommercialCode != nil) { - recognizer.extractCommercialCode = [(NSNumber *)extractCommercialCode boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractResidentialStatus = [jsonRecognizer valueForKey:@"extractResidentialStatus"]; - if (extractResidentialStatus != nil) { - recognizer.extractResidentialStatus = [(NSNumber *)extractResidentialStatus boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBHongKongIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBHongKongIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.commercialCode forKey:@"commercialCode"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.residentialStatus forKey:@"residentialStatus"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.h deleted file mode 100644 index dd33be3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBIndonesiaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.m deleted file mode 100644 index 85c57b8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIndonesiaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,190 +0,0 @@ -#import "MBIndonesiaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBIndonesiaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"IndonesiaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBIndonesiaIdFrontRecognizer *recognizer = [[MBIndonesiaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractBloodType = [jsonRecognizer valueForKey:@"extractBloodType"]; - if (extractBloodType != nil) { - recognizer.extractBloodType = [(NSNumber *)extractBloodType boolValue]; - } - } - { - id extractCitizenship = [jsonRecognizer valueForKey:@"extractCitizenship"]; - if (extractCitizenship != nil) { - recognizer.extractCitizenship = [(NSNumber *)extractCitizenship boolValue]; - } - } - { - id extractCity = [jsonRecognizer valueForKey:@"extractCity"]; - if (extractCity != nil) { - recognizer.extractCity = [(NSNumber *)extractCity boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDistrict = [jsonRecognizer valueForKey:@"extractDistrict"]; - if (extractDistrict != nil) { - recognizer.extractDistrict = [(NSNumber *)extractDistrict boolValue]; - } - } - { - id extractKelDesa = [jsonRecognizer valueForKey:@"extractKelDesa"]; - if (extractKelDesa != nil) { - recognizer.extractKelDesa = [(NSNumber *)extractKelDesa boolValue]; - } - } - { - id extractMaritalStatus = [jsonRecognizer valueForKey:@"extractMaritalStatus"]; - if (extractMaritalStatus != nil) { - recognizer.extractMaritalStatus = [(NSNumber *)extractMaritalStatus boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractOccupation = [jsonRecognizer valueForKey:@"extractOccupation"]; - if (extractOccupation != nil) { - recognizer.extractOccupation = [(NSNumber *)extractOccupation boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractReligion = [jsonRecognizer valueForKey:@"extractReligion"]; - if (extractReligion != nil) { - recognizer.extractReligion = [(NSNumber *)extractReligion boolValue]; - } - } - { - id extractRt = [jsonRecognizer valueForKey:@"extractRt"]; - if (extractRt != nil) { - recognizer.extractRt = [(NSNumber *)extractRt boolValue]; - } - } - { - id extractRw = [jsonRecognizer valueForKey:@"extractRw"]; - if (extractRw != nil) { - recognizer.extractRw = [(NSNumber *)extractRw boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBIndonesiaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBIndonesiaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.bloodType forKey:@"bloodType"]; - [jsonResult setValue:self.result.citizenship forKey:@"citizenship"]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:self.result.district forKey:@"district"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.kelDesa forKey:@"kelDesa"]; - [jsonResult setValue:self.result.maritalStatus forKey:@"maritalStatus"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.occupation forKey:@"occupation"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.province forKey:@"province"]; - [jsonResult setValue:self.result.religion forKey:@"religion"]; - [jsonResult setValue:self.result.rt forKey:@"rt"]; - [jsonResult setValue:self.result.rw forKey:@"rw"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.h deleted file mode 100644 index 48fd28e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBIrelandDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.m deleted file mode 100644 index 7d2148a..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBIrelandDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,158 +0,0 @@ -#import "MBIrelandDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBIrelandDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"IrelandDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBIrelandDlFrontRecognizer *recognizer = [[MBIrelandDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractLicenceCategories = [jsonRecognizer valueForKey:@"extractLicenceCategories"]; - if (extractLicenceCategories != nil) { - recognizer.extractLicenceCategories = [(NSNumber *)extractLicenceCategories boolValue]; - } - } - { - id extractLicenceNumber = [jsonRecognizer valueForKey:@"extractLicenceNumber"]; - if (extractLicenceNumber != nil) { - recognizer.extractLicenceNumber = [(NSNumber *)extractLicenceNumber boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBIrelandDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBIrelandDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.driverNumber forKey:@"driverNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:self.result.licenceCategories forKey:@"licenceCategories"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.h deleted file mode 100644 index 02bdf49..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBItalyDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.m deleted file mode 100644 index 7e5c0f0..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBItalyDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,151 +0,0 @@ -#import "MBItalyDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBItalyDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"ItalyDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBItalyDlFrontRecognizer *recognizer = [[MBItalyDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractLicenceCategories = [jsonRecognizer valueForKey:@"extractLicenceCategories"]; - if (extractLicenceCategories != nil) { - recognizer.extractLicenceCategories = [(NSNumber *)extractLicenceCategories boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBItalyDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBItalyDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.licenceCategories forKey:@"licenceCategories"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.h deleted file mode 100644 index dc89962..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBJordanCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.m deleted file mode 100644 index cc4c247..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.m +++ /dev/null @@ -1,118 +0,0 @@ -#import "MBJordanCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBJordanCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"JordanCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBJordanCombinedRecognizer *recognizer = [[MBJordanCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBJordanCombinedRecognizer (JsonSerialization) -@end - -@implementation MBJordanCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationalNumber forKey:@"nationalNumber"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.h deleted file mode 100644 index 519dbeb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBJordanIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.m deleted file mode 100644 index fc8c8f8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.m +++ /dev/null @@ -1,69 +0,0 @@ -#import "MBJordanIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBJordanIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"JordanIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBJordanIdBackRecognizer *recognizer = [[MBJordanIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBJordanIdBackRecognizer (JsonSerialization) -@end - -@implementation MBJordanIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.h deleted file mode 100644 index 81d78eb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBJordanIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.m deleted file mode 100644 index 0f4477d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBJordanIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "MBJordanIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBJordanIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"JordanIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBJordanIdFrontRecognizer *recognizer = [[MBJordanIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBJordanIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBJordanIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationalNumber forKey:@"nationalNumber"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.h deleted file mode 100644 index d072e7e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBKuwaitIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.m deleted file mode 100644 index 43b4edf..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdBackRecognizerWrapper.m +++ /dev/null @@ -1,69 +0,0 @@ -#import "MBKuwaitIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBKuwaitIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"KuwaitIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBKuwaitIdBackRecognizer *recognizer = [[MBKuwaitIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractSerialNo = [jsonRecognizer valueForKey:@"extractSerialNo"]; - if (extractSerialNo != nil) { - recognizer.extractSerialNo = [(NSNumber *)extractSerialNo boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBKuwaitIdBackRecognizer (JsonSerialization) -@end - -@implementation MBKuwaitIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.serialNo forKey:@"serialNo"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.h deleted file mode 100644 index ac67f58..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBKuwaitIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.m deleted file mode 100644 index a5c3b94..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBKuwaitIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "MBKuwaitIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBKuwaitIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"KuwaitIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBKuwaitIdFrontRecognizer *recognizer = [[MBKuwaitIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractBirthDate = [jsonRecognizer valueForKey:@"extractBirthDate"]; - if (extractBirthDate != nil) { - recognizer.extractBirthDate = [(NSNumber *)extractBirthDate boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBKuwaitIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBKuwaitIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.civilIdNumber forKey:@"civilIdNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.expiryDate] forKey:@"expiryDate"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.h deleted file mode 100644 index 0bcc7f0..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.m deleted file mode 100644 index 2c28b21..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,121 +0,0 @@ -#import "MBMalaysiaDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaDlFrontRecognizer *recognizer = [[MBMalaysiaDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractClass = [jsonRecognizer valueForKey:@"extractClass"]; - if (extractClass != nil) { - recognizer.extractClass = [(NSNumber *)extractClass boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractValidFrom = [jsonRecognizer valueForKey:@"extractValidFrom"]; - if (extractValidFrom != nil) { - recognizer.extractValidFrom = [(NSNumber *)extractValidFrom boolValue]; - } - } - { - id extractValidUntil = [jsonRecognizer valueForKey:@"extractValidUntil"]; - if (extractValidUntil != nil) { - recognizer.extractValidUntil = [(NSNumber *)extractValidUntil boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:self.result.dlClass forKey:@"dlClass"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.identityNumber forKey:@"identityNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.ownerState forKey:@"ownerState"]; - [jsonResult setValue:self.result.street forKey:@"street"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validFrom] forKey:@"validFrom"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validUntil] forKey:@"validUntil"]; - [jsonResult setValue:self.result.zipcode forKey:@"zipcode"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.h deleted file mode 100644 index f438bfa..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaIkadFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.m deleted file mode 100644 index d46834e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaIkadFrontRecognizerWrapper.m +++ /dev/null @@ -1,138 +0,0 @@ -#import "MBMalaysiaIkadFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaIkadFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaIkadFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaIkadFrontRecognizer *recognizer = [[MBMalaysiaIkadFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractEmployer = [jsonRecognizer valueForKey:@"extractEmployer"]; - if (extractEmployer != nil) { - recognizer.extractEmployer = [(NSNumber *)extractEmployer boolValue]; - } - } - { - id extractFacultyAddress = [jsonRecognizer valueForKey:@"extractFacultyAddress"]; - if (extractFacultyAddress != nil) { - recognizer.extractFacultyAddress = [(NSNumber *)extractFacultyAddress boolValue]; - } - } - { - id extractGender = [jsonRecognizer valueForKey:@"extractGender"]; - if (extractGender != nil) { - recognizer.extractGender = [(NSNumber *)extractGender boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPassportNumber = [jsonRecognizer valueForKey:@"extractPassportNumber"]; - if (extractPassportNumber != nil) { - recognizer.extractPassportNumber = [(NSNumber *)extractPassportNumber boolValue]; - } - } - { - id extractSector = [jsonRecognizer valueForKey:@"extractSector"]; - if (extractSector != nil) { - recognizer.extractSector = [(NSNumber *)extractSector boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaIkadFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaIkadFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:self.result.employer forKey:@"employer"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.facultyAddress forKey:@"facultyAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.gender forKey:@"gender"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.passportNumber forKey:@"passportNumber"]; - [jsonResult setValue:self.result.sector forKey:@"sector"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.h deleted file mode 100644 index c9fa94c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaMyKadBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.m deleted file mode 100644 index 6da9b9b..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadBackRecognizerWrapper.m +++ /dev/null @@ -1,71 +0,0 @@ -#import "MBMalaysiaMyKadBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaMyKadBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaMyKadBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaMyKadBackRecognizer *recognizer = [[MBMalaysiaMyKadBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractOldNric = [jsonRecognizer valueForKey:@"extractOldNric"]; - if (extractOldNric != nil) { - recognizer.extractOldNric = [(NSNumber *)extractOldNric boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaMyKadBackRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaMyKadBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.extendedNric forKey:@"extendedNric"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.nric forKey:@"nric"]; - [jsonResult setValue:self.result.oldNric forKey:@"oldNric"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.h deleted file mode 100644 index c96e4f8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaMyKadFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.m deleted file mode 100644 index 457f329..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKadFrontRecognizerWrapper.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "MBMalaysiaMyKadFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaMyKadFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaMyKadFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaMyKadFrontRecognizer *recognizer = [[MBMalaysiaMyKadFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullNameAndAddress = [jsonRecognizer valueForKey:@"extractFullNameAndAddress"]; - if (extractFullNameAndAddress != nil) { - recognizer.extractFullNameAndAddress = [(NSNumber *)extractFullNameAndAddress boolValue]; - } - } - { - id extractReligion = [jsonRecognizer valueForKey:@"extractReligion"]; - if (extractReligion != nil) { - recognizer.extractReligion = [(NSNumber *)extractReligion boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaMyKadFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaMyKadFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.nric forKey:@"nric"]; - [jsonResult setValue:self.result.ownerState forKey:@"ownerState"]; - [jsonResult setValue:self.result.religion forKey:@"religion"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.street forKey:@"street"]; - [jsonResult setValue:self.result.zipcode forKey:@"zipcode"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.h deleted file mode 100644 index 9b8629f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaMyKasFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.m deleted file mode 100644 index 320d62c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyKasFrontRecognizerWrapper.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MBMalaysiaMyKasFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaMyKasFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaMyKasFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaMyKasFrontRecognizer *recognizer = [[MBMalaysiaMyKasFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullNameAndAddress = [jsonRecognizer valueForKey:@"extractFullNameAndAddress"]; - if (extractFullNameAndAddress != nil) { - recognizer.extractFullNameAndAddress = [(NSNumber *)extractFullNameAndAddress boolValue]; - } - } - { - id extractReligion = [jsonRecognizer valueForKey:@"extractReligion"]; - if (extractReligion != nil) { - recognizer.extractReligion = [(NSNumber *)extractReligion boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaMyKasFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaMyKasFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.nric forKey:@"nric"]; - [jsonResult setValue:self.result.ownerState forKey:@"ownerState"]; - [jsonResult setValue:self.result.religion forKey:@"religion"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.street forKey:@"street"]; - [jsonResult setValue:self.result.zipcode forKey:@"zipcode"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.h deleted file mode 100644 index b6d5a8f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaMyPrFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.m deleted file mode 100644 index ec7f73e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyPrFrontRecognizerWrapper.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MBMalaysiaMyPrFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaMyPrFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaMyPrFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaMyPrFrontRecognizer *recognizer = [[MBMalaysiaMyPrFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullNameAndAddress = [jsonRecognizer valueForKey:@"extractFullNameAndAddress"]; - if (extractFullNameAndAddress != nil) { - recognizer.extractFullNameAndAddress = [(NSNumber *)extractFullNameAndAddress boolValue]; - } - } - { - id extractReligion = [jsonRecognizer valueForKey:@"extractReligion"]; - if (extractReligion != nil) { - recognizer.extractReligion = [(NSNumber *)extractReligion boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaMyPrFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaMyPrFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:self.result.countryCode forKey:@"countryCode"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.nric forKey:@"nric"]; - [jsonResult setValue:self.result.ownerState forKey:@"ownerState"]; - [jsonResult setValue:self.result.religion forKey:@"religion"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.street forKey:@"street"]; - [jsonResult setValue:self.result.zipcode forKey:@"zipcode"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.h deleted file mode 100644 index 8e4722f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMalaysiaMyTenteraFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.m deleted file mode 100644 index cd0cdc5..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMalaysiaMyTenteraFrontRecognizerWrapper.m +++ /dev/null @@ -1,97 +0,0 @@ -#import "MBMalaysiaMyTenteraFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMalaysiaMyTenteraFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MalaysiaMyTenteraFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMalaysiaMyTenteraFrontRecognizer *recognizer = [[MBMalaysiaMyTenteraFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractFullNameAndAddress = [jsonRecognizer valueForKey:@"extractFullNameAndAddress"]; - if (extractFullNameAndAddress != nil) { - recognizer.extractFullNameAndAddress = [(NSNumber *)extractFullNameAndAddress boolValue]; - } - } - { - id extractReligion = [jsonRecognizer valueForKey:@"extractReligion"]; - if (extractReligion != nil) { - recognizer.extractReligion = [(NSNumber *)extractReligion boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMalaysiaMyTenteraFrontRecognizer (JsonSerialization) -@end - -@implementation MBMalaysiaMyTenteraFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.armyNumber forKey:@"armyNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:self.result.city forKey:@"city"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.fullAddress forKey:@"fullAddress"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.nric forKey:@"nric"]; - [jsonResult setValue:self.result.ownerState forKey:@"ownerState"]; - [jsonResult setValue:self.result.religion forKey:@"religion"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.street forKey:@"street"]; - [jsonResult setValue:self.result.zipcode forKey:@"zipcode"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.h deleted file mode 100644 index d03b567..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMexicoVoterIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.m deleted file mode 100644 index 8089dff..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMexicoVoterIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,111 +0,0 @@ -#import "MBMexicoVoterIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMexicoVoterIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MexicoVoterIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMexicoVoterIdFrontRecognizer *recognizer = [[MBMexicoVoterIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractCurp = [jsonRecognizer valueForKey:@"extractCurp"]; - if (extractCurp != nil) { - recognizer.extractCurp = [(NSNumber *)extractCurp boolValue]; - } - } - { - id extractFullName = [jsonRecognizer valueForKey:@"extractFullName"]; - if (extractFullName != nil) { - recognizer.extractFullName = [(NSNumber *)extractFullName boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMexicoVoterIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBMexicoVoterIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.curp forKey:@"curp"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.electorKey forKey:@"electorKey"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.fullName forKey:@"fullName"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.h deleted file mode 100644 index e33992f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMoroccoIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.m deleted file mode 100644 index db8a4eb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "MBMoroccoIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMoroccoIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MoroccoIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMoroccoIdBackRecognizer *recognizer = [[MBMoroccoIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractCivilStatusNumber = [jsonRecognizer valueForKey:@"extractCivilStatusNumber"]; - if (extractCivilStatusNumber != nil) { - recognizer.extractCivilStatusNumber = [(NSNumber *)extractCivilStatusNumber boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractFathersName = [jsonRecognizer valueForKey:@"extractFathersName"]; - if (extractFathersName != nil) { - recognizer.extractFathersName = [(NSNumber *)extractFathersName boolValue]; - } - } - { - id extractMothersName = [jsonRecognizer valueForKey:@"extractMothersName"]; - if (extractMothersName != nil) { - recognizer.extractMothersName = [(NSNumber *)extractMothersName boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMoroccoIdBackRecognizer (JsonSerialization) -@end - -@implementation MBMoroccoIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.civilStatusNumber forKey:@"civilStatusNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:self.result.fathersName forKey:@"fathersName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.mothersName forKey:@"mothersName"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.h deleted file mode 100644 index 0ab1c9a..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBMoroccoIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.m deleted file mode 100644 index 5ac4d16..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,130 +0,0 @@ -#import "MBMoroccoIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBMoroccoIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"MoroccoIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBMoroccoIdFrontRecognizer *recognizer = [[MBMoroccoIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBMoroccoIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBMoroccoIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMrtdCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMrtdCombinedRecognizerWrapper.m index 70f68f3..e026ad9 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMrtdCombinedRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBMrtdCombinedRecognizerWrapper.m @@ -97,7 +97,7 @@ -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; + [jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch + 1)] forKey:@"documentDataMatch"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.h deleted file mode 100644 index 714cd18..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBNewZealandDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.m deleted file mode 100644 index bef8c1c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,138 +0,0 @@ -#import "MBNewZealandDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBNewZealandDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"NewZealandDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBNewZealandDlFrontRecognizer *recognizer = [[MBNewZealandDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractDonorIndicator = [jsonRecognizer valueForKey:@"extractDonorIndicator"]; - if (extractDonorIndicator != nil) { - recognizer.extractDonorIndicator = [(NSNumber *)extractDonorIndicator boolValue]; - } - } - { - id extractFirstNames = [jsonRecognizer valueForKey:@"extractFirstNames"]; - if (extractFirstNames != nil) { - recognizer.extractFirstNames = [(NSNumber *)extractFirstNames boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBNewZealandDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBNewZealandDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.cardVersion forKey:@"cardVersion"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.donorIndicator] forKey:@"donorIndicator"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstNames forKey:@"firstNames"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.licenseNumber forKey:@"licenseNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h deleted file mode 100644 index e3640cb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBNigeriaVoterIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m deleted file mode 100644 index 4d6f8f6..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m +++ /dev/null @@ -1,67 +0,0 @@ -#import "MBNigeriaVoterIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBNigeriaVoterIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"NigeriaVoterIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBNigeriaVoterIdBackRecognizer *recognizer = [[MBNigeriaVoterIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBNigeriaVoterIdBackRecognizer (JsonSerialization) -@end - -@implementation MBNigeriaVoterIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.rawBarcodeData forKey:@"rawBarcodeData"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.h deleted file mode 100644 index 2482b3a..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBPdf417RecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.m deleted file mode 100644 index e4e6a39..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.m +++ /dev/null @@ -1,58 +0,0 @@ -#import "MBPdf417RecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBPdf417RecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"Pdf417Recognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBPdf417Recognizer *recognizer = [[MBPdf417Recognizer alloc] init]; - { - id nullQuietZoneAllowed = [jsonRecognizer valueForKey:@"nullQuietZoneAllowed"]; - if (nullQuietZoneAllowed != nil) { - recognizer.nullQuietZoneAllowed = [(NSNumber *)nullQuietZoneAllowed boolValue]; - } - } - { - id scanInverse = [jsonRecognizer valueForKey:@"scanInverse"]; - if (scanInverse != nil) { - recognizer.scanInverse = [(NSNumber *)scanInverse boolValue]; - } - } - { - id scanUncertain = [jsonRecognizer valueForKey:@"scanUncertain"]; - if (scanUncertain != nil) { - recognizer.scanUncertain = [(NSNumber *)scanUncertain boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBPdf417Recognizer (JsonSerialization) -@end - -@implementation MBPdf417Recognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[NSNumber numberWithInteger:(self.result.barcodeType + 1)] forKey:@"barcodeType"]; - [jsonResult setValue:[self.result.rawData base64EncodedStringWithOptions:0] forKey:@"rawData"]; - [jsonResult setValue:self.result.stringData forKey:@"stringData"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.uncertain] forKey:@"uncertain"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.h deleted file mode 100644 index 0689452..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBPolandCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.m deleted file mode 100644 index 922e448..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandCombinedRecognizerWrapper.m +++ /dev/null @@ -1,133 +0,0 @@ -#import "MBPolandCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBPolandCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"PolandCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBPolandCombinedRecognizer *recognizer = [[MBPolandCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFamilyName = [jsonRecognizer valueForKey:@"extractFamilyName"]; - if (extractFamilyName != nil) { - recognizer.extractFamilyName = [(NSNumber *)extractFamilyName boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractParentsGivenNames = [jsonRecognizer valueForKey:@"extractParentsGivenNames"]; - if (extractParentsGivenNames != nil) { - recognizer.extractParentsGivenNames = [(NSNumber *)extractParentsGivenNames boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBPolandCombinedRecognizer (JsonSerialization) -@end - -@implementation MBPolandCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.familyName forKey:@"familyName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.parentsGivenNames forKey:@"parentsGivenNames"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.h deleted file mode 100644 index d5a6e19..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBPolandIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.m deleted file mode 100644 index 892d985..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdBackRecognizerWrapper.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "MBPolandIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBPolandIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"PolandIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBPolandIdBackRecognizer *recognizer = [[MBPolandIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBPolandIdBackRecognizer (JsonSerialization) -@end - -@implementation MBPolandIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.h deleted file mode 100644 index 6e99ff8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBPolandIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.m deleted file mode 100644 index 3c45277..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBPolandIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,116 +0,0 @@ -#import "MBPolandIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBPolandIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"PolandIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBPolandIdFrontRecognizer *recognizer = [[MBPolandIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFamilyName = [jsonRecognizer valueForKey:@"extractFamilyName"]; - if (extractFamilyName != nil) { - recognizer.extractFamilyName = [(NSNumber *)extractFamilyName boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractParentsGivenNames = [jsonRecognizer valueForKey:@"extractParentsGivenNames"]; - if (extractParentsGivenNames != nil) { - recognizer.extractParentsGivenNames = [(NSNumber *)extractParentsGivenNames boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBPolandIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBPolandIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.familyName forKey:@"familyName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.parentsGivenNames forKey:@"parentsGivenNames"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.h deleted file mode 100644 index f174d2d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBRomaniaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m deleted file mode 100644 index e0538c8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,134 +0,0 @@ -#import "MBRomaniaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBRomaniaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"RomaniaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBRomaniaIdFrontRecognizer *recognizer = [[MBRomaniaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBRomaniaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBRomaniaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.cnpNumber forKey:@"cnpNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.parentName forKey:@"parentName"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.h deleted file mode 100644 index 1bce257..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSimNumberRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.m deleted file mode 100644 index 3da1e5c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "MBSimNumberRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSimNumberRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SimNumberRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSimNumberRecognizer *recognizer = [[MBSimNumberRecognizer alloc] init]; - - return recognizer; -} - -@end - -@interface MBSimNumberRecognizer (JsonSerialization) -@end - -@implementation MBSimNumberRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.simNumber forKey:@"simNumber"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.h deleted file mode 100644 index 0d949b5..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSingaporeChangiEmployeeIdRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.m deleted file mode 100644 index 74ecec3..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "MBSingaporeChangiEmployeeIdRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSingaporeChangiEmployeeIdRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SingaporeChangiEmployeeIdRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSingaporeChangiEmployeeIdRecognizer *recognizer = [[MBSingaporeChangiEmployeeIdRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCompanyName = [jsonRecognizer valueForKey:@"extractCompanyName"]; - if (extractCompanyName != nil) { - recognizer.extractCompanyName = [(NSNumber *)extractCompanyName boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSingaporeChangiEmployeeIdRecognizer (JsonSerialization) -@end - -@implementation MBSingaporeChangiEmployeeIdRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.companyName forKey:@"companyName"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.h deleted file mode 100644 index e6919cd..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSingaporeCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.m deleted file mode 100644 index c054e5d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeCombinedRecognizerWrapper.m +++ /dev/null @@ -1,149 +0,0 @@ -#import "MBSingaporeCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSingaporeCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SingaporeCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSingaporeCombinedRecognizer *recognizer = [[MBSingaporeCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAddressChangeDate = [jsonRecognizer valueForKey:@"extractAddressChangeDate"]; - if (extractAddressChangeDate != nil) { - recognizer.extractAddressChangeDate = [(NSNumber *)extractAddressChangeDate boolValue]; - } - } - { - id extractBloodGroup = [jsonRecognizer valueForKey:@"extractBloodGroup"]; - if (extractBloodGroup != nil) { - recognizer.extractBloodGroup = [(NSNumber *)extractBloodGroup boolValue]; - } - } - { - id extractCountryOfBirth = [jsonRecognizer valueForKey:@"extractCountryOfBirth"]; - if (extractCountryOfBirth != nil) { - recognizer.extractCountryOfBirth = [(NSNumber *)extractCountryOfBirth boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractRace = [jsonRecognizer valueForKey:@"extractRace"]; - if (extractRace != nil) { - recognizer.extractRace = [(NSNumber *)extractRace boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSingaporeCombinedRecognizer (JsonSerialization) -@end - -@implementation MBSingaporeCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.addressChangeDate] forKey:@"addressChangeDate"]; - [jsonResult setValue:self.result.bloodGroup forKey:@"bloodGroup"]; - [jsonResult setValue:self.result.countryOfBirth forKey:@"countryOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.identityCardNumber forKey:@"identityCardNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.race forKey:@"race"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.h deleted file mode 100644 index a91bf2e..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSingaporeDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.m deleted file mode 100644 index d7971d6..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MBSingaporeDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSingaporeDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SingaporeDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSingaporeDlFrontRecognizer *recognizer = [[MBSingaporeDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractBirthDate = [jsonRecognizer valueForKey:@"extractBirthDate"]; - if (extractBirthDate != nil) { - recognizer.extractBirthDate = [(NSNumber *)extractBirthDate boolValue]; - } - } - { - id extractIssueDate = [jsonRecognizer valueForKey:@"extractIssueDate"]; - if (extractIssueDate != nil) { - recognizer.extractIssueDate = [(NSNumber *)extractIssueDate boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractValidTill = [jsonRecognizer valueForKey:@"extractValidTill"]; - if (extractValidTill != nil) { - recognizer.extractValidTill = [(NSNumber *)extractValidTill boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSingaporeDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBSingaporeDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.issueDate] forKey:@"issueDate"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validTill] forKey:@"validTill"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.h deleted file mode 100644 index 8642896..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSingaporeIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.m deleted file mode 100644 index 9719da8..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdBackRecognizerWrapper.m +++ /dev/null @@ -1,90 +0,0 @@ -#import "MBSingaporeIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSingaporeIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SingaporeIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSingaporeIdBackRecognizer *recognizer = [[MBSingaporeIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAddressChangeDate = [jsonRecognizer valueForKey:@"extractAddressChangeDate"]; - if (extractAddressChangeDate != nil) { - recognizer.extractAddressChangeDate = [(NSNumber *)extractAddressChangeDate boolValue]; - } - } - { - id extractBloodGroup = [jsonRecognizer valueForKey:@"extractBloodGroup"]; - if (extractBloodGroup != nil) { - recognizer.extractBloodGroup = [(NSNumber *)extractBloodGroup boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSingaporeIdBackRecognizer (JsonSerialization) -@end - -@implementation MBSingaporeIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.addressChangeDate] forKey:@"addressChangeDate"]; - [jsonResult setValue:self.result.bloodGroup forKey:@"bloodGroup"]; - [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.h deleted file mode 100644 index 0186a82..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSingaporeIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.m deleted file mode 100644 index b066b7f..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,110 +0,0 @@ -#import "MBSingaporeIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSingaporeIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SingaporeIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSingaporeIdFrontRecognizer *recognizer = [[MBSingaporeIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractCountryOfBirth = [jsonRecognizer valueForKey:@"extractCountryOfBirth"]; - if (extractCountryOfBirth != nil) { - recognizer.extractCountryOfBirth = [(NSNumber *)extractCountryOfBirth boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractRace = [jsonRecognizer valueForKey:@"extractRace"]; - if (extractRace != nil) { - recognizer.extractRace = [(NSNumber *)extractRace boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSingaporeIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBSingaporeIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.countryOfBirth forKey:@"countryOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.identityCardNumber forKey:@"identityCardNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.race forKey:@"race"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.h deleted file mode 100644 index 92bc177..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSlovakiaCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.m deleted file mode 100644 index fc76390..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.m +++ /dev/null @@ -1,191 +0,0 @@ -#import "MBSlovakiaCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSlovakiaCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SlovakiaCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSlovakiaCombinedRecognizer *recognizer = [[MBSlovakiaCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractDocumentNumber = [jsonRecognizer valueForKey:@"extractDocumentNumber"]; - if (extractDocumentNumber != nil) { - recognizer.extractDocumentNumber = [(NSNumber *)extractDocumentNumber boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSpecialRemarks = [jsonRecognizer valueForKey:@"extractSpecialRemarks"]; - if (extractSpecialRemarks != nil) { - recognizer.extractSpecialRemarks = [(NSNumber *)extractSpecialRemarks boolValue]; - } - } - { - id extractSurnameAtBirth = [jsonRecognizer valueForKey:@"extractSurnameAtBirth"]; - if (extractSurnameAtBirth != nil) { - recognizer.extractSurnameAtBirth = [(NSNumber *)extractSurnameAtBirth boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSlovakiaCombinedRecognizer (JsonSerialization) -@end - -@implementation MBSlovakiaCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.specialRemarks forKey:@"specialRemarks"]; - [jsonResult setValue:self.result.surnameAtBirth forKey:@"surnameAtBirth"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.h deleted file mode 100644 index 4c4ff24..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSlovakiaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.m deleted file mode 100644 index a67c784..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,90 +0,0 @@ -#import "MBSlovakiaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSlovakiaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SlovakiaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSlovakiaIdBackRecognizer *recognizer = [[MBSlovakiaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSpecialRemarks = [jsonRecognizer valueForKey:@"extractSpecialRemarks"]; - if (extractSpecialRemarks != nil) { - recognizer.extractSpecialRemarks = [(NSNumber *)extractSpecialRemarks boolValue]; - } - } - { - id extractSurnameAtBirth = [jsonRecognizer valueForKey:@"extractSurnameAtBirth"]; - if (extractSurnameAtBirth != nil) { - recognizer.extractSurnameAtBirth = [(NSNumber *)extractSurnameAtBirth boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSlovakiaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBSlovakiaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:self.result.specialRemarks forKey:@"specialRemarks"]; - [jsonResult setValue:self.result.surnameAtBirth forKey:@"surnameAtBirth"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.h deleted file mode 100644 index e8e5fbd..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSlovakiaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.m deleted file mode 100644 index dfb8fa9..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSlovakiaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,151 +0,0 @@ -#import "MBSlovakiaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSlovakiaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SlovakiaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSlovakiaIdFrontRecognizer *recognizer = [[MBSlovakiaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractDocumentNumber = [jsonRecognizer valueForKey:@"extractDocumentNumber"]; - if (extractDocumentNumber != nil) { - recognizer.extractDocumentNumber = [(NSNumber *)extractDocumentNumber boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuedBy = [jsonRecognizer valueForKey:@"extractIssuedBy"]; - if (extractIssuedBy != nil) { - recognizer.extractIssuedBy = [(NSNumber *)extractIssuedBy boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSlovakiaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBSlovakiaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuedBy forKey:@"issuedBy"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.personalNumber forKey:@"personalNumber"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.h deleted file mode 100644 index e408657..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSloveniaCombinedRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m deleted file mode 100644 index 7a6fddb..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m +++ /dev/null @@ -1,159 +0,0 @@ -#import "MBSloveniaCombinedRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSloveniaCombinedRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SloveniaCombinedRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSloveniaCombinedRecognizer *recognizer = [[MBSloveniaCombinedRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAdministrativeUnit = [jsonRecognizer valueForKey:@"extractAdministrativeUnit"]; - if (extractAdministrativeUnit != nil) { - recognizer.extractAdministrativeUnit = [(NSNumber *)extractAdministrativeUnit boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSloveniaCombinedRecognizer (JsonSerialization) -@end - -@implementation MBSloveniaCombinedRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.administrativeUnit forKey:@"administrativeUnit"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; - [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.mrzVerified] forKey:@"mrzVerified"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.pin forKey:@"pin"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.h deleted file mode 100644 index 776b127..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSloveniaIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.m deleted file mode 100644 index 0a152bd..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "MBSloveniaIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSloveniaIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SloveniaIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSloveniaIdBackRecognizer *recognizer = [[MBSloveniaIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAddress = [jsonRecognizer valueForKey:@"extractAddress"]; - if (extractAddress != nil) { - recognizer.extractAddress = [(NSNumber *)extractAddress boolValue]; - } - } - { - id extractAdministrativeUnit = [jsonRecognizer valueForKey:@"extractAdministrativeUnit"]; - if (extractAdministrativeUnit != nil) { - recognizer.extractAdministrativeUnit = [(NSNumber *)extractAdministrativeUnit boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSloveniaIdBackRecognizer (JsonSerialization) -@end - -@implementation MBSloveniaIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.address forKey:@"address"]; - [jsonResult setValue:self.result.administrativeUnit forKey:@"administrativeUnit"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.h deleted file mode 100644 index e44c3e6..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSloveniaIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m deleted file mode 100644 index 02e5c54..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,124 +0,0 @@ -#import "MBSloveniaIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSloveniaIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SloveniaIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSloveniaIdFrontRecognizer *recognizer = [[MBSloveniaIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractGivenNames = [jsonRecognizer valueForKey:@"extractGivenNames"]; - if (extractGivenNames != nil) { - recognizer.extractGivenNames = [(NSNumber *)extractGivenNames boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSloveniaIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBSloveniaIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.h deleted file mode 100644 index 417aa05..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSpainDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.m deleted file mode 100644 index 4a215be..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSpainDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,144 +0,0 @@ -#import "MBSpainDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSpainDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SpainDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSpainDlFrontRecognizer *recognizer = [[MBSpainDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractLicenceCategories = [jsonRecognizer valueForKey:@"extractLicenceCategories"]; - if (extractLicenceCategories != nil) { - recognizer.extractLicenceCategories = [(NSNumber *)extractLicenceCategories boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id extractValidFrom = [jsonRecognizer valueForKey:@"extractValidFrom"]; - if (extractValidFrom != nil) { - recognizer.extractValidFrom = [(NSNumber *)extractValidFrom boolValue]; - } - } - { - id extractValidUntil = [jsonRecognizer valueForKey:@"extractValidUntil"]; - if (extractValidUntil != nil) { - recognizer.extractValidUntil = [(NSNumber *)extractValidUntil boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSpainDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBSpainDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.licenceCategories forKey:@"licenceCategories"]; - [jsonResult setValue:self.result.number forKey:@"number"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validFrom] forKey:@"validFrom"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.validUntil] forKey:@"validUntil"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.h deleted file mode 100644 index ca48674..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSwedenDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.m deleted file mode 100644 index e74401c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,144 +0,0 @@ -#import "MBSwedenDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSwedenDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SwedenDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSwedenDlFrontRecognizer *recognizer = [[MBSwedenDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractIssuingAgency = [jsonRecognizer valueForKey:@"extractIssuingAgency"]; - if (extractIssuingAgency != nil) { - recognizer.extractIssuingAgency = [(NSNumber *)extractIssuingAgency boolValue]; - } - } - { - id extractLicenceCategories = [jsonRecognizer valueForKey:@"extractLicenceCategories"]; - if (extractLicenceCategories != nil) { - recognizer.extractLicenceCategories = [(NSNumber *)extractLicenceCategories boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractReferenceNumber = [jsonRecognizer valueForKey:@"extractReferenceNumber"]; - if (extractReferenceNumber != nil) { - recognizer.extractReferenceNumber = [(NSNumber *)extractReferenceNumber boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSwedenDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBSwedenDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAgency forKey:@"issuingAgency"]; - [jsonResult setValue:self.result.licenceCategories forKey:@"licenceCategories"]; - [jsonResult setValue:self.result.licenceNumber forKey:@"licenceNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.referenceNumber forKey:@"referenceNumber"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.h deleted file mode 100644 index 0902c1c..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSwitzerlandDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.m deleted file mode 100644 index 253c438..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,145 +0,0 @@ -#import "MBSwitzerlandDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSwitzerlandDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SwitzerlandDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSwitzerlandDlFrontRecognizer *recognizer = [[MBSwitzerlandDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"]; - if (extractFirstName != nil) { - recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue]; - } - } - { - id extractIssuingAuthority = [jsonRecognizer valueForKey:@"extractIssuingAuthority"]; - if (extractIssuingAuthority != nil) { - recognizer.extractIssuingAuthority = [(NSNumber *)extractIssuingAuthority boolValue]; - } - } - { - id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"]; - if (extractLastName != nil) { - recognizer.extractLastName = [(NSNumber *)extractLastName boolValue]; - } - } - { - id extractPlaceOfBirth = [jsonRecognizer valueForKey:@"extractPlaceOfBirth"]; - if (extractPlaceOfBirth != nil) { - recognizer.extractPlaceOfBirth = [(NSNumber *)extractPlaceOfBirth boolValue]; - } - } - { - id extractVehicleCategories = [jsonRecognizer valueForKey:@"extractVehicleCategories"]; - if (extractVehicleCategories != nil) { - recognizer.extractVehicleCategories = [(NSNumber *)extractVehicleCategories boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSwitzerlandDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBSwitzerlandDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[NSNumber numberWithBool:self.result.expiryDatePermanent] forKey:@"expiryDatePermanent"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:self.result.firstName forKey:@"firstName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.issuingAuthority forKey:@"issuingAuthority"]; - [jsonResult setValue:self.result.lastName forKey:@"lastName"]; - [jsonResult setValue:self.result.licenseNumber forKey:@"licenseNumber"]; - [jsonResult setValue:self.result.placeOfBirth forKey:@"placeOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.vehicleCategories forKey:@"vehicleCategories"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.h deleted file mode 100644 index 4c7887b..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSwitzerlandIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.m deleted file mode 100644 index afc1748..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdBackRecognizerWrapper.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "MBSwitzerlandIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSwitzerlandIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SwitzerlandIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSwitzerlandIdBackRecognizer *recognizer = [[MBSwitzerlandIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractPlaceOfOrigin = [jsonRecognizer valueForKey:@"extractPlaceOfOrigin"]; - if (extractPlaceOfOrigin != nil) { - recognizer.extractPlaceOfOrigin = [(NSNumber *)extractPlaceOfOrigin boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSwitzerlandIdBackRecognizer (JsonSerialization) -@end - -@implementation MBSwitzerlandIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.placeOfOrigin forKey:@"placeOfOrigin"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.h deleted file mode 100644 index e64b8b9..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSwitzerlandIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.m deleted file mode 100644 index a08d8fd..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "MBSwitzerlandIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSwitzerlandIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SwitzerlandIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSwitzerlandIdFrontRecognizer *recognizer = [[MBSwitzerlandIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - { - id returnSignatureImage = [jsonRecognizer valueForKey:@"returnSignatureImage"]; - if (returnSignatureImage != nil) { - recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue]; - } - } - { - id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"]; - if (signatureImageDpi != nil) { - recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSwitzerlandIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBSwitzerlandIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.h deleted file mode 100644 index d2bfd3d..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBSwitzerlandPassportRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.m deleted file mode 100644 index 41df9de..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSwitzerlandPassportRecognizerWrapper.m +++ /dev/null @@ -1,145 +0,0 @@ -#import "MBSwitzerlandPassportRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBSwitzerlandPassportRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"SwitzerlandPassportRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBSwitzerlandPassportRecognizer *recognizer = [[MBSwitzerlandPassportRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractAuthority = [jsonRecognizer valueForKey:@"extractAuthority"]; - if (extractAuthority != nil) { - recognizer.extractAuthority = [(NSNumber *)extractAuthority boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractDateOfExpiry = [jsonRecognizer valueForKey:@"extractDateOfExpiry"]; - if (extractDateOfExpiry != nil) { - recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue]; - } - } - { - id extractDateOfIssue = [jsonRecognizer valueForKey:@"extractDateOfIssue"]; - if (extractDateOfIssue != nil) { - recognizer.extractDateOfIssue = [(NSNumber *)extractDateOfIssue boolValue]; - } - } - { - id extractGivenName = [jsonRecognizer valueForKey:@"extractGivenName"]; - if (extractGivenName != nil) { - recognizer.extractGivenName = [(NSNumber *)extractGivenName boolValue]; - } - } - { - id extractHeight = [jsonRecognizer valueForKey:@"extractHeight"]; - if (extractHeight != nil) { - recognizer.extractHeight = [(NSNumber *)extractHeight boolValue]; - } - } - { - id extractPassportNumber = [jsonRecognizer valueForKey:@"extractPassportNumber"]; - if (extractPassportNumber != nil) { - recognizer.extractPassportNumber = [(NSNumber *)extractPassportNumber boolValue]; - } - } - { - id extractPlaceOfOrigin = [jsonRecognizer valueForKey:@"extractPlaceOfOrigin"]; - if (extractPlaceOfOrigin != nil) { - recognizer.extractPlaceOfOrigin = [(NSNumber *)extractPlaceOfOrigin boolValue]; - } - } - { - id extractSex = [jsonRecognizer valueForKey:@"extractSex"]; - if (extractSex != nil) { - recognizer.extractSex = [(NSNumber *)extractSex boolValue]; - } - } - { - id extractSurname = [jsonRecognizer valueForKey:@"extractSurname"]; - if (extractSurname != nil) { - recognizer.extractSurname = [(NSNumber *)extractSurname boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBSwitzerlandPassportRecognizer (JsonSerialization) -@end - -@implementation MBSwitzerlandPassportRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.authority forKey:@"authority"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.givenName forKey:@"givenName"]; - [jsonResult setValue:self.result.height forKey:@"height"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - [jsonResult setValue:self.result.passportNumber forKey:@"passportNumber"]; - [jsonResult setValue:self.result.placeOfOrigin forKey:@"placeOfOrigin"]; - [jsonResult setValue:self.result.sex forKey:@"sex"]; - [jsonResult setValue:self.result.surname forKey:@"surname"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.h deleted file mode 100644 index 4461a80..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBUnitedArabEmiratesDlFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.m deleted file mode 100644 index 4e3c695..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesDlFrontRecognizerWrapper.m +++ /dev/null @@ -1,124 +0,0 @@ -#import "MBUnitedArabEmiratesDlFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBUnitedArabEmiratesDlFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"UnitedArabEmiratesDlFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBUnitedArabEmiratesDlFrontRecognizer *recognizer = [[MBUnitedArabEmiratesDlFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractDateOfBirth = [jsonRecognizer valueForKey:@"extractDateOfBirth"]; - if (extractDateOfBirth != nil) { - recognizer.extractDateOfBirth = [(NSNumber *)extractDateOfBirth boolValue]; - } - } - { - id extractIssueDate = [jsonRecognizer valueForKey:@"extractIssueDate"]; - if (extractIssueDate != nil) { - recognizer.extractIssueDate = [(NSNumber *)extractIssueDate boolValue]; - } - } - { - id extractLicenseNumber = [jsonRecognizer valueForKey:@"extractLicenseNumber"]; - if (extractLicenseNumber != nil) { - recognizer.extractLicenseNumber = [(NSNumber *)extractLicenseNumber boolValue]; - } - } - { - id extractLicensingAuthority = [jsonRecognizer valueForKey:@"extractLicensingAuthority"]; - if (extractLicensingAuthority != nil) { - recognizer.extractLicensingAuthority = [(NSNumber *)extractLicensingAuthority boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id extractPlaceOfIssue = [jsonRecognizer valueForKey:@"extractPlaceOfIssue"]; - if (extractPlaceOfIssue != nil) { - recognizer.extractPlaceOfIssue = [(NSNumber *)extractPlaceOfIssue boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBUnitedArabEmiratesDlFrontRecognizer (JsonSerialization) -@end - -@implementation MBUnitedArabEmiratesDlFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.expiryDate] forKey:@"expiryDate"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.issueDate] forKey:@"issueDate"]; - [jsonResult setValue:self.result.licenseNumber forKey:@"licenseNumber"]; - [jsonResult setValue:self.result.licensingAuthority forKey:@"licensingAuthority"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - [jsonResult setValue:self.result.placeOfIssue forKey:@"placeOfIssue"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.h deleted file mode 100644 index f67abf2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBUnitedArabEmiratesIdBackRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.m deleted file mode 100644 index bfb1a73..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "MBUnitedArabEmiratesIdBackRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBUnitedArabEmiratesIdBackRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"UnitedArabEmiratesIdBackRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBUnitedArabEmiratesIdBackRecognizer *recognizer = [[MBUnitedArabEmiratesIdBackRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBUnitedArabEmiratesIdBackRecognizer (JsonSerialization) -@end - -@implementation MBUnitedArabEmiratesIdBackRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.h deleted file mode 100644 index 7f48015..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBUnitedArabEmiratesIdFrontRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.m deleted file mode 100644 index aacdb98..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "MBUnitedArabEmiratesIdFrontRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBUnitedArabEmiratesIdFrontRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"UnitedArabEmiratesIdFrontRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBUnitedArabEmiratesIdFrontRecognizer *recognizer = [[MBUnitedArabEmiratesIdFrontRecognizer alloc] init]; - { - id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; - if (detectGlare != nil) { - recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; - } - } - { - id extractName = [jsonRecognizer valueForKey:@"extractName"]; - if (extractName != nil) { - recognizer.extractName = [(NSNumber *)extractName boolValue]; - } - } - { - id extractNationality = [jsonRecognizer valueForKey:@"extractNationality"]; - if (extractNationality != nil) { - recognizer.extractNationality = [(NSNumber *)extractNationality boolValue]; - } - } - { - id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; - if (faceImageDpi != nil) { - recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; - if (fullDocumentImageDpi != nil) { - recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; - } - } - { - id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; - if (fullDocumentImageExtensionFactors != nil) { - recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; - } - } - { - id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; - if (returnFaceImage != nil) { - recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; - } - } - { - id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; - if (returnFullDocumentImage != nil) { - recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; - } - } - - return recognizer; -} - -@end - -@interface MBUnitedArabEmiratesIdFrontRecognizer (JsonSerialization) -@end - -@implementation MBUnitedArabEmiratesIdFrontRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; - [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; - [jsonResult setValue:self.result.idNumber forKey:@"idNumber"]; - [jsonResult setValue:self.result.name forKey:@"name"]; - [jsonResult setValue:self.result.nationality forKey:@"nationality"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.h deleted file mode 100644 index ed169e2..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "MBRecognizerWrapper.h" -#import - -@interface MBVinRecognizerCreator : NSObject - -@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.m deleted file mode 100644 index d9fbe03..0000000 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBVinRecognizerWrapper.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "MBVinRecognizerWrapper.h" -#import "MBSerializationUtils.h" -#import "MBBlinkIDSerializationUtils.h" - -@implementation MBVinRecognizerCreator - -@synthesize jsonName = _jsonName; - --(instancetype) init { - self = [super init]; - if (self) { - _jsonName = @"VinRecognizer"; - } - return self; -} - --(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { - MBVinRecognizer *recognizer = [[MBVinRecognizer alloc] init]; - - return recognizer; -} - -@end - -@interface MBVinRecognizer (JsonSerialization) -@end - -@implementation MBVinRecognizer (JsonSerialization) - --(NSDictionary *) serializeResult { - NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; - [jsonResult setValue:self.result.vin forKey:@"vin"]; - - return jsonResult; -} - -@end \ No newline at end of file diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index 497e8e3..5be619a 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -195,38 +195,6 @@ function Quadrilateral(nativeQuad) { } BlinkID.prototype.Quadrilateral = Quadrilateral; - -/** - * Represents the type of scanned barcode - */ -BlinkID.prototype.BarcodeType = Object.freeze( - { - /** No barcode was scanned */ - None: 1, - /** QR code was scanned */ - QRCode: 2, - /** Data Matrix 2D barcode was scanned */ - DataMatrix: 3, - /** UPC E barcode was scanned */ - UPCE: 4, - /** UPC A barcode was scanned */ - UPCA: 5, - /** EAN 8 barcode was scanned */ - EAN8: 6, - /** EAN 13 barcode was scanned */ - EAN13: 7, - /** Code 128 barcode was scanned */ - Code128: 8, - /** Code 39 barcode was scanned */ - Code39: 9, - /** ITF barcode was scanned */ - ITF: 10, - /** Aztec 2D barcode was scanned */ - Aztec: 11, - /** PDF417 2D barcode was scanned */ - PDF417: 12 - } -); /** * Possible types of Machine Readable Travel Documents (MRTDs). */ @@ -334,25 +302,23 @@ function MrzResult(nativeMRZResult) { } /** - * Possible values for EUDL country field. + * Result of the data matching algorithm for scanned parts/sides of the document. */ -var EudlCountry = Object.freeze( +var DataMatchResult = Object.freeze( { - /** UK Driver's license */ - UK : 1, - /** German driver's license */ - Germany : 2, - /** Austrian driver's license */ - Austria : 3, - /** Performs country detection and uses scanning parameters for detected country */ - Automatic : 4 + /** Data matching has not been performed. */ + NotPerformed : 1, + /** Data does not match. */ + Failed : 2, + /** Data match. */ + Success : 3 } ); /** - * Possible values for EUDL country field. + * Possible values for Document Data Match Result field. */ -BlinkID.prototype.EudlCountry = EudlCountry; +BlinkID.prototype.DataMatchResult = DataMatchResult /** Possible supported detectors for documents containing face image */ var DocumentFaceDetectorType = Object.freeze( @@ -367,72 +333,10 @@ var DocumentFaceDetectorType = Object.freeze( ); /** - * Possible values for EUDL country field. + * Possible values for DocumentFaceDetectorType field. */ BlinkID.prototype.DocumentFaceDetectorType = DocumentFaceDetectorType; -/** - * Supported BlinkCard card issuer values. - */ -BlinkID.prototype.CardIssuer = Object.freeze( - { - /** Unidentified Card */ - Other: 1, - /** The American Express Company Card */ - AmericanExpress: 2, - /** The Bank of Montreal ABM Card */ - BmoAbm: 3, - /** China T-Union Transportation Card */ - ChinaTUnion: 4, - /** China UnionPay Card */ - ChinaUnionPay: 5, - /** Canadian Imperial Bank of Commerce Advantage Debit Card */ - CibcAdvantageDebit: 6, - /** CISS Card */ - Ciss: 7, - /** Diners Club International Card */ - DinersClubInternational: 8, - /** Diners Club United States & Canada Card */ - DinersClubUsCanada: 9, - /** Discover Card */ - DiscoverCard: 10, - /** HSBC Bank Canada Card */ - Hsbc: 11, - /** RuPay Card */ - RuPay: 12, - /** InterPayment Card */ - InterPayment: 13, - /** InstaPayment Card */ - InstaPayment: 14, - /** The JCB Company Card */ - Jcb: 15, - /** Laser Debit Card (deprecated) */ - Laser: 16, - /** Maestro Debit Card */ - Maestro: 17, - /** Dankort Card */ - Dankort: 18, - /** MIR Card */ - Mir: 19, - /** MasterCard Inc. Card */ - MasterCard: 20, - /** The Royal Bank of Canada Client Card */ - RbcClient: 21, - /** ScotiaBank Scotia Card */ - ScotiaBank: 22, - /** TD Canada Trust Access Card */ - TdCtAccess: 23, - /** Troy Card */ - Troy: 24, - /** Visa Inc. Card */ - Visa: 25, - /** Universal Air Travel Plan Inc. Card */ - Uatp: 26, - /** Interswitch Verve Card */ - Verve: 27 - } -); - /** * Extension factors relative to corresponding dimension of the full image. For example, * upFactor and downFactor define extensions relative to image height, e.g. @@ -461,18 +365,6 @@ function OverlaySettings(overlaySettingsType) { /** type of the overlay settings object */ this.overlaySettingsType = overlaySettingsType; } - -/** - * Class for setting up barcode overlay. - * Barcode overlay is best suited for recognizers that perform barcode scanning. - */ -function BarcodeOverlaySettings() { - OverlaySettings.call(this, 'BarcodeOverlaySettings'); -} - -BarcodeOverlaySettings.prototype = new OverlaySettings(); - -BlinkID.prototype.BarcodeOverlaySettings = BarcodeOverlaySettings; /** * Class for setting up document overlay. * Document overlay is best suited for recognizers that perform ID document scanning. @@ -527,29 +419,6 @@ DocumentVerificationOverlaySettings.prototype = new OverlaySettings(); BlinkID.prototype.DocumentVerificationOverlaySettings = DocumentVerificationOverlaySettings; -/** - * Class for setting up BlinkCard overlay. - * BlinkCard overlay is best suited for scanning payment cards. - */ -function BlinkCardOverlaySettings() { - OverlaySettings.call(this, 'BlinkCardOverlaySettings'); - /** - * String: user instructions that are shown above camera preview while the first side of the - * document is being scanned. - * If null, default value will be used. - */ - this.firstSideInstructions = null; - /** - * String: user instructions that are shown above camera preview while the second side of the - * document is being scanned. - * If null, default value will be used. - */ - this.secondSideInstructions = null; -} -BlinkCardOverlaySettings.prototype = new OverlaySettings(); - -BlinkID.prototype.BlinkCardOverlaySettings = BlinkCardOverlaySettings; - /** * Class for setting up BlinkId overlay. * BlinkId overlay is best suited for recognizers that perform ID document scanning. @@ -560,8 +429,6 @@ function BlinkIdOverlaySettings() { BlinkIdOverlaySettings.prototype = new OverlaySettings(); BlinkID.prototype.BlinkIdOverlaySettings = BlinkIdOverlaySettings; - - // OVERLAY SETTINGS // RECOGNIZERS @@ -603,14665 +470,854 @@ BlinkID.prototype.SuccessFrameGrabberRecognizer = SuccessFrameGrabberRecognizer; /** - * Result object for AustraliaDlBackRecognizer. + * Result object for BlinkIdCombinedRecognizer. */ -function AustraliaDlBackRecognizerResult(nativeResult) { +function BlinkIdCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The address of the Australia DL owner + * The additional address information of the document owner. */ - this.address = nativeResult.address; + this.additionalAddressInformation = nativeResult.additionalAddressInformation; /** - * full document image if enabled with returnFullDocumentImage property. + * The additional name information of the document owner. */ - this.fullDocumentImage = nativeResult.fullDocumentImage; + this.additionalNameInformation = nativeResult.additionalNameInformation; /** - * The last name of the Australia DL owner + * The address of the document owner. */ - this.lastName = nativeResult.lastName; + this.address = nativeResult.address; /** - * The date of expiry of the Australia DL + * The driver license conditions. */ - this.licenceExpiry = nativeResult.licenceExpiry != null ? new Date(nativeResult.licenceExpiry) : null; + this.conditions = nativeResult.conditions; /** - * The licence number of the Australia DL + * The date of birth of the document owner. */ - this.licenceNumber = nativeResult.licenceNumber; + this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; -} - -AustraliaDlBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.AustraliaDlBackRecognizerResult = AustraliaDlBackRecognizerResult; - -/** - * Recognizer which can scan the back side of Australian driver's licences - */ -function AustraliaDlBackRecognizer() { - Recognizer.call(this, 'AustraliaDlBackRecognizer'); + /** + * The date of expiry of the document. + */ + this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; /** - * Defines if glare detection should be turned on/off. - * - * + * The date of issue of the document. */ - this.detectGlare = true; + this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; /** - * Defines if address of the Australia DL owner should be extracted - * - * + * The additional number of the document. */ - this.extractAddress = true; + this.documentAdditionalNumber = nativeResult.documentAdditionalNumber; /** - * Defines if last name of the Australia DL owner should be extracted - * - * + * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, + * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side + * of the document and values do not match, this method will return DataMatchResultFailed. Result will + * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. */ - this.extractLastName = true; + this.documentDataMatch = nativeResult.documentDataMatch; /** - * Defines if the licence number of the Australia DL should be extracted - * - * + * The document number. */ - this.extractLicenceNumber = true; + this.documentNumber = nativeResult.documentNumber; /** - * Defines if date of expiry of the Australia DL should be extracted - * - * + * The driver license detailed info. */ - this.extractLicenseExpiry = true; + this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The employer of the document owner. */ - this.fullDocumentImageDpi = 250; + this.employer = nativeResult.employer; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * face image from the document if enabled with returnFaceImage property. */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); + this.faceImage = nativeResult.faceImage; /** - * Sets whether full document image of ID card should be extracted. - * - * + * The first name of the document owner. */ - this.returnFullDocumentImage = false; + this.firstName = nativeResult.firstName; - this.createResultFromNative = function (nativeResult) { return new AustraliaDlBackRecognizerResult(nativeResult); } - -} - -AustraliaDlBackRecognizer.prototype = new Recognizer('AustraliaDlBackRecognizer'); - -BlinkID.prototype.AustraliaDlBackRecognizer = AustraliaDlBackRecognizer; - -/** - * Result object for AustraliaDlFrontRecognizer. - */ -function AustraliaDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); + /** + * back side image of the document if enabled with returnFullDocumentImage property. + */ + this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * The address of the Australian DL owner + * front side image of the document if enabled with returnFullDocumentImage property. */ - this.address = nativeResult.address; + this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; /** - * The date of birth of the Australian DL owner + * The full name of the document owner. */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; + this.fullName = nativeResult.fullName; /** - * face image from the document if enabled with returnFaceImage property. + * The issuing authority of the document. */ - this.faceImage = nativeResult.faceImage; + this.issuingAuthority = nativeResult.issuingAuthority; /** - * full document image if enabled with returnFullDocumentImage property. + * The last name of the document owner. */ - this.fullDocumentImage = nativeResult.fullDocumentImage; + this.lastName = nativeResult.lastName; /** - * The full name of the Australian DL owner + * The marital status of the document owner. */ - this.fullName = nativeResult.fullName; + this.maritalStatus = nativeResult.maritalStatus; /** - * The date of expiry of the Australian DL + * The data extracted from the machine readable zone */ - this.licenceExpiry = nativeResult.licenceExpiry != null ? new Date(nativeResult.licenceExpiry) : null; + this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; /** - * The licence number of the Australian DL + * The nationality of the documet owner. */ - this.licenceNumber = nativeResult.licenceNumber; + this.nationality = nativeResult.nationality; /** - * The licence type of the Australian DL + * The personal identification number. */ - this.licenceType = nativeResult.licenceType; + this.personalIdNumber = nativeResult.personalIdNumber; /** - * image of the signature if enabled with returnSignatureImage property. + * The place of birth of the document owner. */ - this.signatureImage = nativeResult.signatureImage; + this.placeOfBirth = nativeResult.placeOfBirth; -} - -AustraliaDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.AustraliaDlFrontRecognizerResult = AustraliaDlFrontRecognizerResult; - -/** - * Recognizer which can scan the front side of Australian driver's licences. - */ -function AustraliaDlFrontRecognizer() { - Recognizer.call(this, 'AustraliaDlFrontRecognizer'); + /** + * The profession of the document owner. + */ + this.profession = nativeResult.profession; /** - * Defines if glare detection should be turned on/off. - * - * + * The race of the document owner. */ - this.detectGlare = true; + this.race = nativeResult.race; /** - * Defines if address of Australian DL owner should be extracted - * - * + * The religion of the document owner. */ - this.extractAddress = true; + this.religion = nativeResult.religion; /** - * Defines if date of birth of Australian DL owner should be extracted - * - * + * The residential stauts of the document owner. */ - this.extractDateOfBirth = true; + this.residentialStatus = nativeResult.residentialStatus; /** - * Defines if full name of Australian DL owner should be extracted - * - * + * Returns true if recognizer has finished scanning first side and is now scanning back side, + * false if it's still scanning first side. */ - this.extractFullName = true; + this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; /** - * Defines if date of expiry of Australian DL should be extracted - * - * + * The sex of the document owner. */ - this.extractLicenseExpiry = true; + this.sex = nativeResult.sex; + +} + +BlinkIdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); + +BlinkID.prototype.BlinkIdCombinedRecognizerResult = BlinkIdCombinedRecognizerResult; + +/** + * Recognizer which can scan front and back side of the United States driver license. + */ +function BlinkIdCombinedRecognizer() { + Recognizer.call(this, 'BlinkIdCombinedRecognizer'); /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new AustraliaDlFrontRecognizerResult(nativeResult); } + this.createResultFromNative = function (nativeResult) { return new BlinkIdCombinedRecognizerResult(nativeResult); } } -AustraliaDlFrontRecognizer.prototype = new Recognizer('AustraliaDlFrontRecognizer'); +BlinkIdCombinedRecognizer.prototype = new Recognizer('BlinkIdCombinedRecognizer'); -BlinkID.prototype.AustraliaDlFrontRecognizer = AustraliaDlFrontRecognizer; +BlinkID.prototype.BlinkIdCombinedRecognizer = BlinkIdCombinedRecognizer; /** - * Result object for AustriaCombinedRecognizer. + * Result object for BlinkIdRecognizer. */ -function AustriaCombinedRecognizerResult(nativeResult) { +function BlinkIdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The date of birth of Austrian ID owner + * The additional address information of the document owner. */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; + this.additionalAddressInformation = nativeResult.additionalAddressInformation; /** - * The date of expiry of Austrian ID + * The additional name information of the document owner. */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + this.additionalNameInformation = nativeResult.additionalNameInformation; /** - * The date of issuance of the Austrian ID + * The address of the document owner. */ - this.dateOfIssuance = nativeResult.dateOfIssuance != null ? new Date(nativeResult.dateOfIssuance) : null; + this.address = nativeResult.address; /** - * Digital signature of the recognition result. Available only if enabled with signResult property. + * The driver license conditions. */ - this.digitalSignature = nativeResult.digitalSignature; + this.conditions = nativeResult.conditions; /** - * Version of the digital signature. Available only if enabled with signResult property. + * The date of birth of the document owner. */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; + this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. + * The date of expiry of the document. */ - this.documentDataMatch = nativeResult.documentDataMatch; + this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + + /** + * The date of issue of the document. + */ + this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; + + /** + * The additional number of the document. + */ + this.documentAdditionalNumber = nativeResult.documentAdditionalNumber; /** - * The document number of the Austrian ID. + * The document number. */ this.documentNumber = nativeResult.documentNumber; /** - * The eye eyeColour of Austrian ID owner. + * The driver license detailed info. */ - this.eyeColour = nativeResult.eyeColour; + this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; /** - * face image from the document if enabled with returnFaceImage property. + * The employer of the document owner. */ - this.faceImage = nativeResult.faceImage; + this.employer = nativeResult.employer; /** - * back side image of the document if enabled with returnFullDocumentImage property. + * face image from the document if enabled with returnFaceImage property. */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; + this.faceImage = nativeResult.faceImage; /** - * front side image of the document if enabled with returnFullDocumentImage property. + * The first name of the document owner. */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; + this.firstName = nativeResult.firstName; /** - * The gien name of the Austrian ID owner. + * full document image if enabled with returnFullDocumentImage property. */ - this.givenName = nativeResult.givenName; + this.fullDocumentImage = nativeResult.fullDocumentImage; /** - * The height of Austrian ID owner. + * The full name of the document owner. */ - this.height = nativeResult.height; + this.fullName = nativeResult.fullName; /** - * The issuing authority of Austrian ID. + * The issuing authority of the document. */ this.issuingAuthority = nativeResult.issuingAuthority; /** - * Whether check digits in machine readable zone of the Austrian ID are OK. + * The last name of the document owner. + */ + this.lastName = nativeResult.lastName; + + /** + * The marital status of the document owner. + */ + this.maritalStatus = nativeResult.maritalStatus; + + /** + * The data extracted from the machine readable zone */ - this.mrtdVerified = nativeResult.mrtdVerified; + this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; /** - * The nationaliy of the Austrian ID owner. + * The nationality of the documet owner. */ this.nationality = nativeResult.nationality; /** - * The place of birth of the Austrian ID owner. + * The personal identification number. + */ + this.personalIdNumber = nativeResult.personalIdNumber; + + /** + * The place of birth of the document owner. */ this.placeOfBirth = nativeResult.placeOfBirth; /** - * The principal residence of the Austrian ID owner. + * The profession of the document owner. */ - this.principalResidence = nativeResult.principalResidence; + this.profession = nativeResult.profession; /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. + * The race of the document owner. */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; + this.race = nativeResult.race; /** - * The sex of the Austrian ID owner. + * The religion of the document owner. */ - this.sex = nativeResult.sex; + this.religion = nativeResult.religion; /** - * image of the signature if enabled with returnSignatureImage property. + * The residential stauts of the document owner. */ - this.signatureImage = nativeResult.signatureImage; + this.residentialStatus = nativeResult.residentialStatus; /** - * The surname of the Austrian ID owner. + * The sex of the document owner. */ - this.surname = nativeResult.surname; + this.sex = nativeResult.sex; } -AustriaCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); +BlinkIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); -BlinkID.prototype.AustriaCombinedRecognizerResult = AustriaCombinedRecognizerResult; +BlinkID.prototype.BlinkIdRecognizerResult = BlinkIdRecognizerResult; /** - * Austrian ID Combined Recognizer. - * - * Austrian ID Combined recognizer is used for scanning both front and back side of Austrian ID. + * The Blink ID Recognizer is used for scanning Blink ID. */ -function AustriaCombinedRecognizer() { - Recognizer.call(this, 'AustriaCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if ownder's date of birth should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry should be extracted from Austrian Passport - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issuance should be extracted from back side of Austrian ID - * - * - */ - this.extractDateOfIssuance = true; - - /** - * Defines if date of issue should be extracted from Austrian Passport - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's given name should be extracted - * - * - */ - this.extractGivenName = true; - - /** - * Defines if owner's height should be extracted - * - * - */ - this.extractHeight = true; - - /** - * Defines if issuing authority should be extracted - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if owner's nationality should be extracted from Austrian Passport - * - * - */ - this.extractNationality = false; - - /** - * Defines if passport number should be extracted from Austrian Passport - * - * - */ - this.extractPassportNumber = true; - - /** - * Defines if owner's place of birth should be extracted - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if owner's principal residence should be extracted from back side of Austrian ID - * - * - */ - this.extractPrincipalResidence = true; - - /** - * Defines if owner's sex should be extracted - * - * - */ - this.extractSex = true; - - /** - * Defines if owner's surname should be extracted - * - * - */ - this.extractSurname = true; +function BlinkIdRecognizer() { + Recognizer.call(this, 'BlinkIdRecognizer'); /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new AustriaCombinedRecognizerResult(nativeResult); } + this.createResultFromNative = function (nativeResult) { return new BlinkIdRecognizerResult(nativeResult); } } -AustriaCombinedRecognizer.prototype = new Recognizer('AustriaCombinedRecognizer'); +BlinkIdRecognizer.prototype = new Recognizer('BlinkIdRecognizer'); -BlinkID.prototype.AustriaCombinedRecognizer = AustriaCombinedRecognizer; +BlinkID.prototype.BlinkIdRecognizer = BlinkIdRecognizer; /** - * Result object for AustriaDlFrontRecognizer. + * Result object for DocumentFaceRecognizer. */ -function AustriaDlFrontRecognizerResult(nativeResult) { +function DocumentFaceRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The date Of Birth of the front side of the Austria Dl owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Expiry of the front side of the Austria Dl owner. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date Of Issue of the front side of the Austria Dl owner. + * Quadrangle represeting corner points of the document within the input image. */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; + this.documentLocation = nativeResult.documentLocation != null ? new Quadrilateral(nativeResult.documentLocation) : null; /** - * face image from the document if enabled with returnFaceImage property. + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * The first Name of the front side of the Austria Dl owner. + * Quadrangle represeting corner points of the face image within the input image. */ - this.firstName = nativeResult.firstName; + this.faceLocation = nativeResult.faceLocation != null ? new Quadrilateral(nativeResult.faceLocation) : null; /** - * full document image if enabled with returnFullDocumentImage property. + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; - /** - * The issuing Authority of the front side of the Austria Dl owner. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The licence Number of the front side of the Austria Dl owner. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The name of the front side of the Austria Dl owner. - */ - this.name = nativeResult.name; - - /** - * The place Of Birth of the front side of the Austria Dl owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The vehicle Categories of the front side of the Austria Dl owner. - */ - this.vehicleCategories = nativeResult.vehicleCategories; - } -AustriaDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); +DocumentFaceRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); -BlinkID.prototype.AustriaDlFrontRecognizerResult = AustriaDlFrontRecognizerResult; +BlinkID.prototype.DocumentFaceRecognizerResult = DocumentFaceRecognizerResult; /** - * Recognizer which can scan front side of Austrian national DL cards. + * Class for configuring Document Face Recognizer Recognizer. + * + * Document Face Recognizer recognizer is used for scanning documents containing face images. */ -function AustriaDlFrontRecognizer() { - Recognizer.call(this, 'AustriaDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Austrian DL owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Austrian DL should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Austrian DL should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if first name of Austrian DL owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Austrian DL should be extracted. - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if name of Austrian DL owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if place of birth of Austrian DL owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; +function DocumentFaceRecognizer() { + Recognizer.call(this, 'DocumentFaceRecognizer'); /** - * Defines if vehicle categories of Austrian DL should be extracted. - * - * + * Type of docment this recognizer will scan. + * + * */ - this.extractVehicleCategories = true; + this.detectorType = DocumentFaceDetectorType.TD1; /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); + /** + * Defines how many times the same document should be detected before the detector + * returns this document as a result of the deteciton + * + * Higher number means more reliable detection, but slower processing + * + * + */ + this.numStableDetectionsThreshold = 6; + /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new AustriaDlFrontRecognizerResult(nativeResult); } + this.createResultFromNative = function (nativeResult) { return new DocumentFaceRecognizerResult(nativeResult); } } -AustriaDlFrontRecognizer.prototype = new Recognizer('AustriaDlFrontRecognizer'); +DocumentFaceRecognizer.prototype = new Recognizer('DocumentFaceRecognizer'); -BlinkID.prototype.AustriaDlFrontRecognizer = AustriaDlFrontRecognizer; +BlinkID.prototype.DocumentFaceRecognizer = DocumentFaceRecognizer; /** - * Result object for AustriaIdBackRecognizer. + * Result object for MrtdCombinedRecognizer. */ -function AustriaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The Date Of Issuance of Austrian ID. - */ - this.dateOfIssuance = nativeResult.dateOfIssuance != null ? new Date(nativeResult.dateOfIssuance) : null; - - /** - * The Document Number of Austrian ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * The Eye Colour of Austrian ID owner. - */ - this.eyeColour = nativeResult.eyeColour; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The Height of Austrian ID owner. - */ - this.height = nativeResult.height; - - /** - * The Issuing Authority of Austrian ID. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The mrz on the back side of Austrian ID. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The Place Of Birth of Austrian ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The Principal Residence of Austrian ID owner. - */ - this.principalResidence = nativeResult.principalResidence; - -} - -AustriaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.AustriaIdBackRecognizerResult = AustriaIdBackRecognizerResult; - -/** - * Class for configuring Austrian ID Back Recognizer. - * - * Austrian ID Back recognizer is used for scanning back side of Austrian ID. - */ -function AustriaIdBackRecognizer() { - Recognizer.call(this, 'AustriaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of issuance should be extracted from back side of Austrian ID - * - * - */ - this.extractDateOfIssuance = true; - - /** - * Defines if owner's height should be extracted from back side of Austrian ID - * - * - */ - this.extractHeight = true; - - /** - * Defines if issuing authority should be extracted from back side of Austrian ID - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if owner's place of birth should be extracted from back side of Austrian ID - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if owner's principal residence should be extracted from back side of Austrian ID - * - * - */ - this.extractPrincipalResidence = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new AustriaIdBackRecognizerResult(nativeResult); } - -} - -AustriaIdBackRecognizer.prototype = new Recognizer('AustriaIdBackRecognizer'); - -BlinkID.prototype.AustriaIdBackRecognizer = AustriaIdBackRecognizer; - -/** - * Result object for AustriaIdFrontRecognizer. - */ -function AustriaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Austrian Id owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The document number of the Austrian Id. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The first name of the Austrian Id owner. - */ - this.givenName = nativeResult.givenName; - - /** - * The sex of the Austrian Id owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The last name of the Austrian Id owner. - */ - this.surname = nativeResult.surname; - -} - -AustriaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.AustriaIdFrontRecognizerResult = AustriaIdFrontRecognizerResult; - -/** - * Class for configuring Austrian ID Front Recognizer. - * - * Aus ID Front recognizer is used for scanning front side of Austrian Id. - */ -function AustriaIdFrontRecognizer() { - Recognizer.call(this, 'AustriaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth should be extracted from Austrian ID - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if given name of Austrian Id owner should be extracted - * - * - */ - this.extractGivenName = true; - - /** - * Defines if sex of Austrian Id owner should be extracted - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Austrian Id owner should be extracted - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new AustriaIdFrontRecognizerResult(nativeResult); } - -} - -AustriaIdFrontRecognizer.prototype = new Recognizer('AustriaIdFrontRecognizer'); - -BlinkID.prototype.AustriaIdFrontRecognizer = AustriaIdFrontRecognizer; - -/** - * Result object for AustriaPassportRecognizer. - */ -function AustriaPassportRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date Of Birth of the Austrian Passport owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Expiry of the Austrian Passport. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date Of Issue of the Austrian Passport. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given Name of the Austrian Passport owner. - */ - this.givenName = nativeResult.givenName; - - /** - * The height of the Austrian Passport owner. - */ - this.height = nativeResult.height; - - /** - * The issuing Authority of the Austrian Passport. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The mrz of the back side of Austria Passport. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The nationality of the Austrian Passport owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The passport Number of the Austrian Passport. - */ - this.passportNumber = nativeResult.passportNumber; - - /** - * The place Of Birth of the Austrian Passport owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of the Austrian Passport owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Austrian Passport owner. - */ - this.surname = nativeResult.surname; - -} - -AustriaPassportRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.AustriaPassportRecognizerResult = AustriaPassportRecognizerResult; - -/** - * Class for configuring Austrian Passport Recognizer. - * - * Austrian Passport recognizer is used for scanning Austrian Passport. - */ -function AustriaPassportRecognizer() { - Recognizer.call(this, 'AustriaPassportRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's date of birth should be extracted from Austrian Passport - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry should be extracted from Austrian Passport - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue should be extracted from Austrian Passport - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's given name should be extracted from Austrian Passport - * - * - */ - this.extractGivenName = true; - - /** - * Defines if owner's height should be extracted from Austrian Passport - * - * - */ - this.extractHeight = true; - - /** - * Defines if issuing authority should be extracted from Austrian Passport - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if owner's nationality should be extracted from Austrian Passport - * - * - */ - this.extractNationality = false; - - /** - * Defines if passport number should be extracted from Austrian Passport - * - * - */ - this.extractPassportNumber = true; - - /** - * Defines if owner's place of birth should be extracted from Austrian Passport - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if owner's sex should be extracted from Austrian Passport - * - * - */ - this.extractSex = true; - - /** - * Defines if owner's surname should be extracted from Austrian Passport - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new AustriaPassportRecognizerResult(nativeResult); } - -} - -AustriaPassportRecognizer.prototype = new Recognizer('AustriaPassportRecognizer'); - -BlinkID.prototype.AustriaPassportRecognizer = AustriaPassportRecognizer; - -/** - * Result object for BarcodeRecognizer. - */ -function BarcodeRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Type of the barcode scanned - * - * @return Type of the barcode - */ - this.barcodeType = nativeResult.barcodeType; - - /** - * Byte array with result of the scan - */ - this.rawData = nativeResult.rawData; - - /** - * Retrieves string content of scanned data - */ - this.stringData = nativeResult.stringData; - - /** - * Flag indicating uncertain scanning data - * E.g obtained from damaged barcode. - */ - this.uncertain = nativeResult.uncertain; - -} - -BarcodeRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BarcodeRecognizerResult = BarcodeRecognizerResult; - -/** - * BarcodeRecognizer is used for scanning most of 1D barcode formats, and 2D format - * such as Aztec, DataMatrix and QR code - */ -function BarcodeRecognizer() { - Recognizer.call(this, 'BarcodeRecognizer'); - - /** - * Allow enabling the autodetection of image scale when scanning barcodes. - * If set to true, prior reading barcode, image scale will be - * corrected. This enabled correct reading of barcodes on high - * resolution images but slows down the recognition process. - * - * falseTE: This setting is applied only for Code39 and Code128 barcode scanning. - * - * - */ - this.autoScaleDetection = true; - - /** - * Set this to true to scan barcodes which don't have quiet zone (white area) around it - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.nullQuietZoneAllowed = false; - - /** - * Enable reading code39 barcode contents as extended data. For more information about code39 - * extended data (a.k.a. full ASCII mode), see https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39 - * - * - */ - this.readCode39AsExtendedData = false; - - /** - * Set this to true to scan Aztec 2D barcodes - * - * - */ - this.scanAztecCode = false; - - /** - * Set this to true to scan Code 128 1D barcodes - * - * - */ - this.scanCode128 = false; - - /** - * Set this to true to scan Code 39 1D barcodes - * - * - */ - this.scanCode39 = false; - - /** - * Set this to true to scan DataMatrix 2D barcodes - * - * - */ - this.scanDataMatrix = false; - - /** - * Set this to true to scan EAN 13 barcodes - * - * - */ - this.scanEan13 = false; - - /** - * Set this to true to scan EAN8 barcodes - * - * - */ - this.scanEan8 = false; - - /** - * Set this to true to allow scanning barcodes with inverted intensities - * (i.e. white barcodes on black background) - * - * falseTE: this options doubles the frame processing time - * - * - */ - this.scanInverse = false; - - /** - * Set this to true to scan ITF barcodes - * - * - */ - this.scanItf = false; - - /** - * Set this to true to scan Pdf417 barcodes - * - * - */ - this.scanPdf417 = false; - - /** - * Set this to true to scan QR barcodes - * - * - */ - this.scanQrCode = false; - - /** - * Set this to true to scan even barcode not compliant with standards - * For example, malformed PDF417 barcodes which were incorrectly encoded - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.scanUncertain = true; - - /** - * Set this to true to scan UPCA barcodes - * - * - */ - this.scanUpca = false; - - /** - * Set this to true to scan UPCE barcodes - * - * - */ - this.scanUpce = false; - - /** - * Set this to true to allow slower, but better image processing. - * - * - */ - this.slowerThoroughScan = true; - - this.createResultFromNative = function (nativeResult) { return new BarcodeRecognizerResult(nativeResult); } - -} - -BarcodeRecognizer.prototype = new Recognizer('BarcodeRecognizer'); - -BlinkID.prototype.BarcodeRecognizer = BarcodeRecognizer; - -/** - * Result object for BelgiumCombinedRecognizer. - */ -function BelgiumCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The card number of the Belgium ID card. - */ - this.cardNumber = nativeResult.cardNumber; - - /** - * The date of birth of the Belgium ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Belgium ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Belgium ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The issuing authority of the Belgium ID card. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The last name of the Belgium ID owner. - */ - this.lastName = nativeResult.lastName; - - /** - * Determines if all check digits inside MRZ are correct. - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Belgium ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Belgium ID owner. - */ - this.sex = nativeResult.sex; - -} - -BelgiumCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BelgiumCombinedRecognizerResult = BelgiumCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Belgium national ID cards. - */ -function BelgiumCombinedRecognizer() { - Recognizer.call(this, 'BelgiumCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new BelgiumCombinedRecognizerResult(nativeResult); } - -} - -BelgiumCombinedRecognizer.prototype = new Recognizer('BelgiumCombinedRecognizer'); - -BlinkID.prototype.BelgiumCombinedRecognizer = BelgiumCombinedRecognizer; - -/** - * Result object for BelgiumIdBackRecognizer. - */ -function BelgiumIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -BelgiumIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BelgiumIdBackRecognizerResult = BelgiumIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Belgium ID cards. - */ -function BelgiumIdBackRecognizer() { - Recognizer.call(this, 'BelgiumIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BelgiumIdBackRecognizerResult(nativeResult); } - -} - -BelgiumIdBackRecognizer.prototype = new Recognizer('BelgiumIdBackRecognizer'); - -BlinkID.prototype.BelgiumIdBackRecognizer = BelgiumIdBackRecognizer; - -/** - * Result object for BelgiumIdFrontRecognizer. - */ -function BelgiumIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The card number of the Belgium ID card. - */ - this.cardNumber = nativeResult.cardNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - -} - -BelgiumIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BelgiumIdFrontRecognizerResult = BelgiumIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Belgium national ID card. - */ -function BelgiumIdFrontRecognizer() { - Recognizer.call(this, 'BelgiumIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BelgiumIdFrontRecognizerResult(nativeResult); } - -} - -BelgiumIdFrontRecognizer.prototype = new Recognizer('BelgiumIdFrontRecognizer'); - -BlinkID.prototype.BelgiumIdFrontRecognizer = BelgiumIdFrontRecognizer; - -/** - * Result object for BlinkCardEliteRecognizer. - */ -function BlinkCardEliteRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The payment card number. - */ - this.cardNumber = nativeResult.cardNumber; - - /** - * Payment card's security code/value - */ - this.cvv = nativeResult.cvv; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * Payment card's inventory number. - */ - this.inventoryNumber = nativeResult.inventoryNumber; - - /** - * Information about the payment card owner (name, company, etc.). - */ - this.owner = nativeResult.owner; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The payment card's last month of validity. - */ - this.validThru = nativeResult.validThru != null ? new Date(nativeResult.validThru) : null; - -} - -BlinkCardEliteRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BlinkCardEliteRecognizerResult = BlinkCardEliteRecognizerResult; - -/** - * Recognizer used for scanning the front side of elite credit/debit cards. - */ -function BlinkCardEliteRecognizer() { - Recognizer.call(this, 'BlinkCardEliteRecognizer'); - - /** - * Should anonymize the card number area (redact image pixels) on the document image result - * - * - */ - this.anonymizeCardNumber = false; - - /** - * Should anonymize the CVV on the document image result - * - * - */ - this.anonymizeCvv = false; - - /** - * Should anonymize the owner area (redact image pixels) on the document image result - * - * - */ - this.anonymizeOwner = false; - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Should extract the card's inventory number - * - * - */ - this.extractInventoryNumber = true; - - /** - * Should extract the card owner information - * - * - */ - this.extractOwner = true; - - /** - * Should extract the payment card's month of expiry - * - * - */ - this.extractValidThru = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new BlinkCardEliteRecognizerResult(nativeResult); } - -} - -BlinkCardEliteRecognizer.prototype = new Recognizer('BlinkCardEliteRecognizer'); - -BlinkID.prototype.BlinkCardEliteRecognizer = BlinkCardEliteRecognizer; - -/** - * Result object for BlinkCardRecognizer. - */ -function BlinkCardRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The payment card number. - */ - this.cardNumber = nativeResult.cardNumber; - - /** - * Payment card's security code/value - */ - this.cvv = nativeResult.cvv; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * Payment card's inventory number. - */ - this.inventoryNumber = nativeResult.inventoryNumber; - - /** - * Payment card's issuing networ - */ - this.issuer = nativeResult.issuer; - - /** - * Information about the payment card owner (name, company, etc.). - */ - this.owner = nativeResult.owner; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The payment card's last month of validity. - */ - this.validThru = nativeResult.validThru != null ? new Date(nativeResult.validThru) : null; - -} - -BlinkCardRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BlinkCardRecognizerResult = BlinkCardRecognizerResult; - -/** - * Recognizer used for scanning the front side of credit/debit cards. - */ -function BlinkCardRecognizer() { - Recognizer.call(this, 'BlinkCardRecognizer'); - - /** - * Should anonymize the card number area (redact image pixels) on the document image result - * - * - */ - this.anonymizeCardNumber = false; - - /** - * Should anonymize the CVV on the document image result - * - * - */ - this.anonymizeCvv = false; - - /** - * Should anonymize the owner area (redact image pixels) on the document image result - * - * - */ - this.anonymizeOwner = false; - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Should extract CVV - * - * - */ - this.extractCvv = true; - - /** - * Should extract the card's inventory number - * - * - */ - this.extractInventoryNumber = true; - - /** - * Should extract the card owner information - * - * - */ - this.extractOwner = false; - - /** - * Should extract the payment card's month of expiry - * - * - */ - this.extractValidThru = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new BlinkCardRecognizerResult(nativeResult); } - -} - -BlinkCardRecognizer.prototype = new Recognizer('BlinkCardRecognizer'); - -BlinkID.prototype.BlinkCardRecognizer = BlinkCardRecognizer; - -/** - * Result object for BlinkIdCombinedRecognizer. - */ -function BlinkIdCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the document owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of the document owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the document. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the document. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * The driver license detailed info. - */ - this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the document owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of the document owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The last name of the document owner. - */ - this.lastName = nativeResult.lastName; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the document owner. - */ - this.sex = nativeResult.sex; - -} - -BlinkIdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BlinkIdCombinedRecognizerResult = BlinkIdCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of the United States driver license. - */ -function BlinkIdCombinedRecognizer() { - Recognizer.call(this, 'BlinkIdCombinedRecognizer'); - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new BlinkIdCombinedRecognizerResult(nativeResult); } - -} - -BlinkIdCombinedRecognizer.prototype = new Recognizer('BlinkIdCombinedRecognizer'); - -BlinkID.prototype.BlinkIdCombinedRecognizer = BlinkIdCombinedRecognizer; - -/** - * Result object for BlinkIdRecognizer. - */ -function BlinkIdRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the document owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of the document owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the document. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the document. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The document number. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * The driver license detailed info. - */ - this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the document owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of the document owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The last name of the document owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The sex of the document owner. - */ - this.sex = nativeResult.sex; - -} - -BlinkIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BlinkIdRecognizerResult = BlinkIdRecognizerResult; - -/** - * The Blink ID Recognizer is used for scanning Blink ID. - */ -function BlinkIdRecognizer() { - Recognizer.call(this, 'BlinkIdRecognizer'); - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BlinkIdRecognizerResult(nativeResult); } - -} - -BlinkIdRecognizer.prototype = new Recognizer('BlinkIdRecognizer'); - -BlinkID.prototype.BlinkIdRecognizer = BlinkIdRecognizer; - -/** - * Result object for BruneiIdBackRecognizer. - */ -function BruneiIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Brunei ID owner. - */ - this.address = nativeResult.address; - - /** - * The date of issue of Brunei ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The race of Brunei ID owner. - */ - this.race = nativeResult.race; - -} - -BruneiIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiIdBackRecognizerResult = BruneiIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Brunei national ID cards. - */ -function BruneiIdBackRecognizer() { - Recognizer.call(this, 'BruneiIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Brunei ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of issue of Brunei ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if the race of Brunei ID owner should be extracted. - * - * - */ - this.extractRace = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiIdBackRecognizerResult(nativeResult); } - -} - -BruneiIdBackRecognizer.prototype = new Recognizer('BruneiIdBackRecognizer'); - -BlinkID.prototype.BruneiIdBackRecognizer = BruneiIdBackRecognizer; - -/** - * Result object for BruneiIdFrontRecognizer. - */ -function BruneiIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Brunei ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The document number of Brunei ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Brunei ID owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The place of birth of Brunei ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of Brunei ID owner. - */ - this.sex = nativeResult.sex; - -} - -BruneiIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiIdFrontRecognizerResult = BruneiIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of yellow version of Brunei ID. - */ -function BruneiIdFrontRecognizer() { - Recognizer.call(this, 'BruneiIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Brunei ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if full name of Brunei ID owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Defines if place of birth of Brunei ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if sex of Brunei ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiIdFrontRecognizerResult(nativeResult); } - -} - -BruneiIdFrontRecognizer.prototype = new Recognizer('BruneiIdFrontRecognizer'); - -BlinkID.prototype.BruneiIdFrontRecognizer = BruneiIdFrontRecognizer; - -/** - * Result object for BruneiMilitaryIdBackRecognizer. - */ -function BruneiMilitaryIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The army number of Brunei Military ID owner. - */ - this.armyNumber = nativeResult.armyNumber; - - /** - * The date of expiry of Brunei Military ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Brunei Military ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -BruneiMilitaryIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiMilitaryIdBackRecognizerResult = BruneiMilitaryIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Brunei Military ID card. - */ -function BruneiMilitaryIdBackRecognizer() { - Recognizer.call(this, 'BruneiMilitaryIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of expiry of Brunei Military ID card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Brunei Military ID card should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new BruneiMilitaryIdBackRecognizerResult(nativeResult); } - -} - -BruneiMilitaryIdBackRecognizer.prototype = new Recognizer('BruneiMilitaryIdBackRecognizer'); - -BlinkID.prototype.BruneiMilitaryIdBackRecognizer = BruneiMilitaryIdBackRecognizer; - -/** - * Result object for BruneiMilitaryIdFrontRecognizer. - */ -function BruneiMilitaryIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Brunei Military ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Brunei Military ID owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The military rank of Brunei Military ID owner. - */ - this.rank = nativeResult.rank; - -} - -BruneiMilitaryIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiMilitaryIdFrontRecognizerResult = BruneiMilitaryIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Brunei Military ID card. - */ -function BruneiMilitaryIdFrontRecognizer() { - Recognizer.call(this, 'BruneiMilitaryIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name of Brunei Military ID owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Defines if military rank of Brunei Military ID owner should be extracted. - * - * - */ - this.extractRank = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiMilitaryIdFrontRecognizerResult(nativeResult); } - -} - -BruneiMilitaryIdFrontRecognizer.prototype = new Recognizer('BruneiMilitaryIdFrontRecognizer'); - -BlinkID.prototype.BruneiMilitaryIdFrontRecognizer = BruneiMilitaryIdFrontRecognizer; - -/** - * Result object for BruneiResidencePermitBackRecognizer. - */ -function BruneiResidencePermitBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Brunei Residence Permit card owner. - */ - this.address = nativeResult.address; - - /** - * The date of issue of Brunei Residence Permit card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The race of Brunei Residence Permit card owner. - */ - this.race = nativeResult.race; - -} - -BruneiResidencePermitBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiResidencePermitBackRecognizerResult = BruneiResidencePermitBackRecognizerResult; - -/** - * Recognizer which can scan back side of Brunei national Residence Permit cards. - */ -function BruneiResidencePermitBackRecognizer() { - Recognizer.call(this, 'BruneiResidencePermitBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Brunei Residence Permit card owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of issue of Brunei Residence Permit card should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if the race of Brunei Residence Permit card owner should be extracted. - * - * - */ - this.extractRace = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiResidencePermitBackRecognizerResult(nativeResult); } - -} - -BruneiResidencePermitBackRecognizer.prototype = new Recognizer('BruneiResidencePermitBackRecognizer'); - -BlinkID.prototype.BruneiResidencePermitBackRecognizer = BruneiResidencePermitBackRecognizer; - -/** - * Result object for BruneiResidencePermitFrontRecognizer. - */ -function BruneiResidencePermitFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Brunei residence permit owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The document number of Brunei residence permit. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Brunei residence permit owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The place of birth of Brunei residence permit owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of Brunei residence permit owner. - */ - this.sex = nativeResult.sex; - -} - -BruneiResidencePermitFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiResidencePermitFrontRecognizerResult = BruneiResidencePermitFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Brunei residence permits. - */ -function BruneiResidencePermitFrontRecognizer() { - Recognizer.call(this, 'BruneiResidencePermitFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Brunei residence permit owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if full name of Brunei residence permit owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Defines if place of birth of Brunei residence permit owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if sex of Brunei residence permit owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiResidencePermitFrontRecognizerResult(nativeResult); } - -} - -BruneiResidencePermitFrontRecognizer.prototype = new Recognizer('BruneiResidencePermitFrontRecognizer'); - -BlinkID.prototype.BruneiResidencePermitFrontRecognizer = BruneiResidencePermitFrontRecognizer; - -/** - * Result object for BruneiTemporaryResidencePermitBackRecognizer. - */ -function BruneiTemporaryResidencePermitBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Brunei temporary residence permit owner's employer. - */ - this.address = nativeResult.address; - - /** - * The date of issue of Brunei temporary residence permit. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The passport number of Brunei temporary residence permit owner. - */ - this.passportNumber = nativeResult.passportNumber; - -} - -BruneiTemporaryResidencePermitBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiTemporaryResidencePermitBackRecognizerResult = BruneiTemporaryResidencePermitBackRecognizerResult; - -/** - * Recognizer which can scan back side of Brunei temporary residence permit cards. - */ -function BruneiTemporaryResidencePermitBackRecognizer() { - Recognizer.call(this, 'BruneiTemporaryResidencePermitBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Brunei temporary residence permit owner's employer should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of issue of Brunei temporary residence permit should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if the passport number of Brunei temporary residence permit owner should be extracted. - * - * - */ - this.extractPassportNumber = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiTemporaryResidencePermitBackRecognizerResult(nativeResult); } - -} - -BruneiTemporaryResidencePermitBackRecognizer.prototype = new Recognizer('BruneiTemporaryResidencePermitBackRecognizer'); - -BlinkID.prototype.BruneiTemporaryResidencePermitBackRecognizer = BruneiTemporaryResidencePermitBackRecognizer; - -/** - * Result object for BruneiTemporaryResidencePermitFrontRecognizer. - */ -function BruneiTemporaryResidencePermitFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Brunei Temporary Residence Permit owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of Brunei Temporary Residence Permit owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The document number of Brunei Temporary Residence Permit. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Brunei Temporary Residence Permit owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The place of birth of Brunei Temporary Residence Permit owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of Brunei Temporary Residence Permit owner. - */ - this.sex = nativeResult.sex; - -} - -BruneiTemporaryResidencePermitFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.BruneiTemporaryResidencePermitFrontRecognizerResult = BruneiTemporaryResidencePermitFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Brunei Temporary Residence Permit. - */ -function BruneiTemporaryResidencePermitFrontRecognizer() { - Recognizer.call(this, 'BruneiTemporaryResidencePermitFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Brunei Temporary Residence Permit owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of birth of Brunei Temporary Residence Permit owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if full name of Brunei Temporary Residence Permit owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Defines if place of birth of Brunei Temporary Residence Permit owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if sex of Brunei Temporary Residence Permit owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new BruneiTemporaryResidencePermitFrontRecognizerResult(nativeResult); } - -} - -BruneiTemporaryResidencePermitFrontRecognizer.prototype = new Recognizer('BruneiTemporaryResidencePermitFrontRecognizer'); - -BlinkID.prototype.BruneiTemporaryResidencePermitFrontRecognizer = BruneiTemporaryResidencePermitFrontRecognizer; - -/** - * Result object for ColombiaDlFrontRecognizer. - */ -function ColombiaDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date Of Birth of the front side of the Colombia Dl owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Issue of the front side of the Colombia Dl owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The driver Restrictions of the front side of the Colombia Dl owner. - */ - this.driverRestrictions = nativeResult.driverRestrictions; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing Agency of the front side of the Colombia Dl owner. - */ - this.issuingAgency = nativeResult.issuingAgency; - - /** - * The licence Number of the front side of the Colombia Dl owner. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The name of the front side of the Colombia Dl owner. - */ - this.name = nativeResult.name; - -} - -ColombiaDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.ColombiaDlFrontRecognizerResult = ColombiaDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Colombia drivers licence. - */ -function ColombiaDlFrontRecognizer() { - Recognizer.call(this, 'ColombiaDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if the date of birth of the Colombia Dl owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if the driver restrictions of the Colombia Dl owner should be extracted. - * - * - */ - this.extractDriverRestrictions = true; - - /** - * Defines if the issuing agency of the Colombia Dl card should be extracted. - * - * - */ - this.extractIssuingAgency = true; - - /** - * Defines if the name of the Colombia Dl owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new ColombiaDlFrontRecognizerResult(nativeResult); } - -} - -ColombiaDlFrontRecognizer.prototype = new Recognizer('ColombiaDlFrontRecognizer'); - -BlinkID.prototype.ColombiaDlFrontRecognizer = ColombiaDlFrontRecognizer; - -/** - * Result object for ColombiaIdBackRecognizer. - */ -function ColombiaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth Date of the Colombia Id owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The blood Group of the Colombia Id owner. - */ - this.bloodGroup = nativeResult.bloodGroup; - - /** - * The document Number Colombia Id owner. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * The fingerprint of the Colombian ID owner. - */ - this.fingerprint = nativeResult.fingerprint; - - /** - * The first Name of the Colombia Id owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The last Name of the Colombia Id owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The sex of the Colombia Id owner. - */ - this.sex = nativeResult.sex; - -} - -ColombiaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.ColombiaIdBackRecognizerResult = ColombiaIdBackRecognizerResult; - -/** - * Class for configuring Colombia Id Back Recognizer. - * - * Colombia Id Back recognizer is used for scanning back side of the Colombia Id. - */ -function ColombiaIdBackRecognizer() { - Recognizer.call(this, 'ColombiaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Set this to true to scan barcodes which don't have quiet zone (white area) around it - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.nullQuietZoneAllowed = true; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Set this to true to scan even barcode not compliant with standards - * For example, malformed PDF417 barcodes which were incorrectly encoded - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.scanUncertain = true; - - this.createResultFromNative = function (nativeResult) { return new ColombiaIdBackRecognizerResult(nativeResult); } - -} - -ColombiaIdBackRecognizer.prototype = new Recognizer('ColombiaIdBackRecognizer'); - -BlinkID.prototype.ColombiaIdBackRecognizer = ColombiaIdBackRecognizer; - -/** - * Result object for ColombiaIdFrontRecognizer. - */ -function ColombiaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The document Number of the Colombia Id. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first Name of the Colombia Id owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The last Name of the Colombia Id owner. - */ - this.lastName = nativeResult.lastName; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -ColombiaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.ColombiaIdFrontRecognizerResult = ColombiaIdFrontRecognizerResult; - -/** - * Class for configuring Colombia Id Front Recognizer. - * - * Colombia Id Front recognizer is used for scanning front side of the Colombia Id. - */ -function ColombiaIdFrontRecognizer() { - Recognizer.call(this, 'ColombiaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's first name should be extracted from front side of the Colombia Id - * - * - */ - this.extractFirstName = true; - - /** - * Defines if owner's last name should be extracted from front side of the Colombia Id - * - * - */ - this.extractLastName = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new ColombiaIdFrontRecognizerResult(nativeResult); } - -} - -ColombiaIdFrontRecognizer.prototype = new Recognizer('ColombiaIdFrontRecognizer'); - -BlinkID.prototype.ColombiaIdFrontRecognizer = ColombiaIdFrontRecognizer; - -/** - * Result object for CroatiaCombinedRecognizer. - */ -function CroatiaCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The citizenship of the Croatian ID owner. - */ - this.citizenship = nativeResult.citizenship; - - /** - * The date of birth of the Croatian ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Croatian ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Determines if date of expiry of the Croatian ID is permanent. - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * The date of issue of Croatian ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Determines if Croatian ID is bilingual. - */ - this.documentBilingual = nativeResult.documentBilingual; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * Determines if Croatian ID is issued for non resident. - */ - this.documentForNonResident = nativeResult.documentForNonResident; - - /** - * The document number of the Croatian ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Croatian ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The issuer of Croatian ID. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The last name of the Croatian ID owner. - */ - this.lastName = nativeResult.lastName; - - /** - * Determines if all check digits inside MRZ are correct. - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The OIB of Croatian ID owner. - */ - this.oib = nativeResult.oib; - - /** - * The residence of Croatian ID owner. - */ - this.residence = nativeResult.residence; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Croatian ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -CroatiaCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CroatiaCombinedRecognizerResult = CroatiaCombinedRecognizerResult; - -/** - * Recognizer which can front and back side of Croatian national ID cards. - */ -function CroatiaCombinedRecognizer() { - Recognizer.call(this, 'CroatiaCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if citizenship of Croatian ID owner should be extracted - * - * - */ - this.extractCitizenship = true; - - /** - * Defines if date of birth of Croatian ID owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Croatian ID document should be extracted - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Croatian ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if first name of Croatian ID owner should be extracted - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuer of Croatian ID should be extracted. - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if last name of Croatian ID owner should be extracted - * - * - */ - this.extractLastName = true; - - /** - * Defines if residence of Croatian ID owner should be extracted. - * - * - */ - this.extractResidence = true; - - /** - * Defines if sex of Croatian ID owner should be extracted - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new CroatiaCombinedRecognizerResult(nativeResult); } - -} - -CroatiaCombinedRecognizer.prototype = new Recognizer('CroatiaCombinedRecognizer'); - -BlinkID.prototype.CroatiaCombinedRecognizer = CroatiaCombinedRecognizer; - -/** - * Result object for CroatiaIdBackRecognizer. - */ -function CroatiaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Determines if date of expiry of Croatian ID is permanent - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * The date of issue of Croatian ID - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Determines if Croatian ID is issued for non resident - */ - this.documentForNonResident = nativeResult.documentForNonResident; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuer of Croatian ID - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The data extracted from the machine readable zone - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The residence of Croatian ID owner - */ - this.residence = nativeResult.residence; - -} - -CroatiaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CroatiaIdBackRecognizerResult = CroatiaIdBackRecognizerResult; - -/** - * Croatian ID Back Recognizer. - * - * Croatian ID Back recognizer is used for scanning back side of Croatian ID. It always extracts - * MRZ zone and address of ID holder while extracting other elements is optional. - */ -function CroatiaIdBackRecognizer() { - Recognizer.call(this, 'CroatiaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of issue of Croatian ID should be extracted - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if issuer of Croatian ID should be extracted - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if residence of Croatian ID owner should be extracted - * - * - */ - this.extractResidence = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new CroatiaIdBackRecognizerResult(nativeResult); } - -} - -CroatiaIdBackRecognizer.prototype = new Recognizer('CroatiaIdBackRecognizer'); - -BlinkID.prototype.CroatiaIdBackRecognizer = CroatiaIdBackRecognizer; - -/** - * Result object for CroatiaIdFrontRecognizer. - */ -function CroatiaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The citizenship of the Croatian ID owner. - */ - this.citizenship = nativeResult.citizenship; - - /** - * The date of birth of Croatian ID owner - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The document date of expiry of the Croatian ID - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Check if date of expiry is permanent on the Croatian ID. - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * true if the document is bilingual - */ - this.documentBilingual = nativeResult.documentBilingual; - - /** - * The document number of the Croatian ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Croatian ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The last name of the Croatian ID owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The sex of the Croatian ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -CroatiaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CroatiaIdFrontRecognizerResult = CroatiaIdFrontRecognizerResult; - -/** - * Croatian ID Front Recognizer. - * - * Croatian ID Front recognizer is used for scanning front side of Croatian ID. It always extracts - * identity card number, first and last name of ID holder while extracting other elements is optional. - */ -function CroatiaIdFrontRecognizer() { - Recognizer.call(this, 'CroatiaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if citizenship of Croatian ID owner should be extracted - * - * - */ - this.extractCitizenship = true; - - /** - * Defines if date of birth of Croatian ID owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry should be extracted from Croatian ID - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if first name of Croatian ID owner should be extracted - * - * - */ - this.extractFirstName = true; - - /** - * Defines if last name of Croatian ID owner should be extracted - * - * - */ - this.extractLastName = true; - - /** - * Defines if sex of Croatian ID owner should be extracted - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new CroatiaIdFrontRecognizerResult(nativeResult); } - -} - -CroatiaIdFrontRecognizer.prototype = new Recognizer('CroatiaIdFrontRecognizer'); - -BlinkID.prototype.CroatiaIdFrontRecognizer = CroatiaIdFrontRecognizer; - -/** - * Result object for CyprusIdBackRecognizer. - */ -function CyprusIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -CyprusIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CyprusIdBackRecognizerResult = CyprusIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Cyprus ID cards. - */ -function CyprusIdBackRecognizer() { - Recognizer.call(this, 'CyprusIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new CyprusIdBackRecognizerResult(nativeResult); } - -} - -CyprusIdBackRecognizer.prototype = new Recognizer('CyprusIdBackRecognizer'); - -BlinkID.prototype.CyprusIdBackRecognizer = CyprusIdBackRecognizer; - -/** - * Result object for CyprusIdFrontRecognizer. - */ -function CyprusIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The ID number of Cyprus ID card. - */ - this.idNumber = nativeResult.idNumber; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -CyprusIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CyprusIdFrontRecognizerResult = CyprusIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Cyprus national ID cards. - */ -function CyprusIdFrontRecognizer() { - Recognizer.call(this, 'CyprusIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new CyprusIdFrontRecognizerResult(nativeResult); } - -} - -CyprusIdFrontRecognizer.prototype = new Recognizer('CyprusIdFrontRecognizer'); - -BlinkID.prototype.CyprusIdFrontRecognizer = CyprusIdFrontRecognizer; - -/** - * Result object for CyprusOldIdBackRecognizer. - */ -function CyprusOldIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the old Cyprus ID card owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The expiry date of old Cyprus ID card. - */ - this.expiresOn = nativeResult.expiresOn != null ? new Date(nativeResult.expiresOn) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The sex of the old Cyprus ID card owner. - */ - this.sex = nativeResult.sex; - -} - -CyprusOldIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CyprusOldIdBackRecognizerResult = CyprusOldIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of old Cyprus national ID cards. - */ -function CyprusOldIdBackRecognizer() { - Recognizer.call(this, 'CyprusOldIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if the expiry date of old Cryprus ID card should be extracted. - * - * - */ - this.extractExpiresOn = true; - - /** - * Defines if the sex of old Cyprus ID card owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new CyprusOldIdBackRecognizerResult(nativeResult); } - -} - -CyprusOldIdBackRecognizer.prototype = new Recognizer('CyprusOldIdBackRecognizer'); - -BlinkID.prototype.CyprusOldIdBackRecognizer = CyprusOldIdBackRecognizer; - -/** - * Result object for CyprusOldIdFrontRecognizer. - */ -function CyprusOldIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The document number of old Cyprus ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The ID number of the old Cyprus ID card. - */ - this.idNumber = nativeResult.idNumber; - - /** - * The name of old Cyprus ID card owner. - */ - this.name = nativeResult.name; - - /** - * The surname of old Cyprus ID card owner. - */ - this.surname = nativeResult.surname; - -} - -CyprusOldIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CyprusOldIdFrontRecognizerResult = CyprusOldIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of old Cyprus national ID cards. - */ -function CyprusOldIdFrontRecognizer() { - Recognizer.call(this, 'CyprusOldIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if document number of old Cyprus ID card should be extracted. - * - * - */ - this.extractDocumentNumber = true; - - /** - * Defines if name of old Cyprus ID card owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if surname of old Cyprus ID card owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new CyprusOldIdFrontRecognizerResult(nativeResult); } - -} - -CyprusOldIdFrontRecognizer.prototype = new Recognizer('CyprusOldIdFrontRecognizer'); - -BlinkID.prototype.CyprusOldIdFrontRecognizer = CyprusOldIdFrontRecognizer; - -/** - * Result object for CzechiaCombinedRecognizer. - */ -function CzechiaCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The issuing authority of the Czechia ID card. - */ - this.authority = nativeResult.authority; - - /** - * The date of birth of the Czechia ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Czechia ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the Czechia ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Czechia ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The given names of the Czechia ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Czechia ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The permanent stay address of the Czechia ID owner. - */ - this.permanentStay = nativeResult.permanentStay; - - /** - * The personal number of the Czechia ID owner. - */ - this.personalNumber = nativeResult.personalNumber; - - /** - * The place of birth of the Czechia ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Czechia ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Czechia ID owner. - */ - this.surname = nativeResult.surname; - -} - -CzechiaCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CzechiaCombinedRecognizerResult = CzechiaCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Czechia national ID cards. - */ -function CzechiaCombinedRecognizer() { - Recognizer.call(this, 'CzechiaCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if Czech ID's issuing authority should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if Czech ID owner's date of birth should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if Czech ID's date of expiry should be extracted - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if Czech ID's date of issue should be extracted - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if Czech ID owner's given names should be extracted - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if Czech ID owner's permanent address should be extracted. - * - * - */ - this.extractPermanentStay = true; - - /** - * Defines if Czech ID owner's personal number should be extracted. - * - * - */ - this.extractPersonalNumber = true; - - /** - * Defines if Czech ID owner's place of birth should be extracted - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if Czech ID owner's sex should be extracted - * - * - */ - this.extractSex = true; - - /** - * Defines if Czech ID owner's surname should be extracted - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new CzechiaCombinedRecognizerResult(nativeResult); } - -} - -CzechiaCombinedRecognizer.prototype = new Recognizer('CzechiaCombinedRecognizer'); - -BlinkID.prototype.CzechiaCombinedRecognizer = CzechiaCombinedRecognizer; - -/** - * Result object for CzechiaIdBackRecognizer. - */ -function CzechiaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The Czech ID's issuing authority. - */ - this.authority = nativeResult.authority; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from Czech ID's machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The Czech ID owner's permanent address. - */ - this.permanentStay = nativeResult.permanentStay; - - /** - * The Czech ID owner's personal number. - */ - this.personalNumber = nativeResult.personalNumber; - -} - -CzechiaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CzechiaIdBackRecognizerResult = CzechiaIdBackRecognizerResult; - -/** - * Recognizer which can scan the back side of Czech IDs. - */ -function CzechiaIdBackRecognizer() { - Recognizer.call(this, 'CzechiaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if Czech ID's issuing authority should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if Czech ID owner's permanent address should be extracted. - * - * - */ - this.extractPermanentStay = true; - - /** - * Defines if Czech ID owner's personal number should be extracted. - * - * - */ - this.extractPersonalNumber = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new CzechiaIdBackRecognizerResult(nativeResult); } - -} - -CzechiaIdBackRecognizer.prototype = new Recognizer('CzechiaIdBackRecognizer'); - -BlinkID.prototype.CzechiaIdBackRecognizer = CzechiaIdBackRecognizer; - -/** - * Result object for CzechiaIdFrontRecognizer. - */ -function CzechiaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Czech ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Czech ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Czech ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The document number of Czech ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given names of Czech ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The place of birth of Czech ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of Czech ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of Czech ID owner. - */ - this.surname = nativeResult.surname; - -} - -CzechiaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.CzechiaIdFrontRecognizerResult = CzechiaIdFrontRecognizerResult; - -/** - * Recognizer which can scan the front side of Czech IDs. - */ -function CzechiaIdFrontRecognizer() { - Recognizer.call(this, 'CzechiaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if Czech ID owner's date of birth should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if Czech ID's date of expiry should be extracted - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if Czech ID's date of issue should be extracted - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if Czech ID owner's given names should be extracted - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if Czech ID owner's place of birth should be extracted - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if Czech ID owner's sex should be extracted - * - * - */ - this.extractSex = true; - - /** - * Defines if Czech ID owner's surname should be extracted - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new CzechiaIdFrontRecognizerResult(nativeResult); } - -} - -CzechiaIdFrontRecognizer.prototype = new Recognizer('CzechiaIdFrontRecognizer'); - -BlinkID.prototype.CzechiaIdFrontRecognizer = CzechiaIdFrontRecognizer; - -/** - * Result object for DocumentFaceRecognizer. - */ -function DocumentFaceRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Quadrangle represeting corner points of the document within the input image. - */ - this.documentLocation = nativeResult.documentLocation != null ? new Quadrilateral(nativeResult.documentLocation) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * Quadrangle represeting corner points of the face image within the input image. - */ - this.faceLocation = nativeResult.faceLocation != null ? new Quadrilateral(nativeResult.faceLocation) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - -} - -DocumentFaceRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.DocumentFaceRecognizerResult = DocumentFaceRecognizerResult; - -/** - * Class for configuring Document Face Recognizer Recognizer. - * - * Document Face Recognizer recognizer is used for scanning documents containing face images. - */ -function DocumentFaceRecognizer() { - Recognizer.call(this, 'DocumentFaceRecognizer'); - - /** - * Type of docment this recognizer will scan. - * - * - */ - this.detectorType = DocumentFaceDetectorType.TD1; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Defines how many times the same document should be detected before the detector - * returns this document as a result of the deteciton - * - * Higher number means more reliable detection, but slower processing - * - * - */ - this.numStableDetectionsThreshold = 6; - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new DocumentFaceRecognizerResult(nativeResult); } - -} - -DocumentFaceRecognizer.prototype = new Recognizer('DocumentFaceRecognizer'); - -BlinkID.prototype.DocumentFaceRecognizer = DocumentFaceRecognizer; - -/** - * Result object for EgyptIdFrontRecognizer. - */ -function EgyptIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The document number of Egypt ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The national number of Egypt ID. - */ - this.nationalNumber = nativeResult.nationalNumber; - -} - -EgyptIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.EgyptIdFrontRecognizerResult = EgyptIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Egypt ID. - */ -function EgyptIdFrontRecognizer() { - Recognizer.call(this, 'EgyptIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if national number of Egypt ID should be extracted. - * - * - */ - this.extractNationalNumber = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new EgyptIdFrontRecognizerResult(nativeResult); } - -} - -EgyptIdFrontRecognizer.prototype = new Recognizer('EgyptIdFrontRecognizer'); - -BlinkID.prototype.EgyptIdFrontRecognizer = EgyptIdFrontRecognizer; - -/** - * Result object for EudlRecognizer. - */ -function EudlRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the EU Driver License owner. - */ - this.address = nativeResult.address; - - /** - * The birth Data of the EU Driver License owner. - */ - this.birthData = nativeResult.birthData; - - /** - * The country of the EU Driver License owner. - */ - this.country = nativeResult.country; - - /** - * The driver Number of the EU Driver License owner. - */ - this.driverNumber = nativeResult.driverNumber; - - /** - * The expiry Date of the EU Driver License owner. - */ - this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first Name of the EU Driver License owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issue Date of the EU Driver License owner. - */ - this.issueDate = nativeResult.issueDate != null ? new Date(nativeResult.issueDate) : null; - - /** - * The issuing Authority of the EU Driver License owner. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The last Name of the EU Driver License owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The personal Number of the EU Driver License owner. - */ - this.personalNumber = nativeResult.personalNumber; - -} - -EudlRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.EudlRecognizerResult = EudlRecognizerResult; - -/** - * Class for configuring EU Driver License Recognizer. - * - * EU Driver License recognizer is used for scanning EU Driver License. - */ -function EudlRecognizer() { - Recognizer.call(this, 'EudlRecognizer'); - - /** - * Country of scanning Eudl. The default value of EudlCountryAny will scan all supported driver's licenses. - * - * - */ - this.country = EudlCountry.Automatic; - - /** - * Defines if owner's address should be extracted from EU Driver License - * - * - */ - this.extractAddress = true; - - /** - * Defines if owner's date of expiry should be extracted from EU Driver License - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if owner's date of issue should be extracted from EU Driver License - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's issuing authority should be extracted from EU Driver License - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if owner's personal number should be extracted from EU Driver License - * - * - */ - this.extractPersonalNumber = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new EudlRecognizerResult(nativeResult); } - -} - -EudlRecognizer.prototype = new Recognizer('EudlRecognizer'); - -BlinkID.prototype.EudlRecognizer = EudlRecognizer; - -/** - * Result object for GermanyCombinedRecognizer. - */ -function GermanyCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the Germany ID owner. - */ - this.address = nativeResult.address; - - /** - * The issuing authority of the Germany ID card. - */ - this.authority = nativeResult.authority; - - /** - * The CAN number of the Germany ID card. - */ - this.canNumber = nativeResult.canNumber; - - /** - * The colour of eyes of the Germany ID owner. - */ - this.colourOfEyes = nativeResult.colourOfEyes; - - /** - * The date of birth of the Germany ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Germany ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the Germany ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Germany ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The given names of the Germany ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The height of the Germany ID owner. - */ - this.height = nativeResult.height; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Germany ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The place of birth of the Germany ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The full mrz string result. - */ - this.rawMrzString = nativeResult.rawMrzString; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Germany ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Germany ID owner. - */ - this.surname = nativeResult.surname; - -} - -GermanyCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyCombinedRecognizerResult = GermanyCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of German national ID cards, - * front side of German old ID card and front side of German Passport. - */ -function GermanyCombinedRecognizer() { - Recognizer.call(this, 'GermanyCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of German ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if issuing authority of German ID should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if CAN number of Germany ID should be extracted. - * - * - */ - this.extractCanNumber = true; - - /** - * Defines if colour of eyes of German ID owner should be extracted. - * - * - */ - this.extractColourOfEyes = true; - - /** - * Defines if date of expiry of Germany ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of German ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if document number of Germany ID should be extracted. - * - * - */ - this.extractDocumentNumber = true; - - /** - * Defines if given name of German passport owner should be extracted. - * - * - */ - this.extractGivenName = true; - - /** - * Defines if given names of Germany ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if height of German ID owner should be extracted. - * - * - */ - this.extractHeight = true; - - /** - * Defines if nationality of Germany ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if place of birth of Germany ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of Germany ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new GermanyCombinedRecognizerResult(nativeResult); } - -} - -GermanyCombinedRecognizer.prototype = new Recognizer('GermanyCombinedRecognizer'); - -BlinkID.prototype.GermanyCombinedRecognizer = GermanyCombinedRecognizer; - -/** - * Result object for GermanyDlBackRecognizer. - */ -function GermanyDlBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of issue for B category of German DL card. - */ - this.dateOfIssueB10 = nativeResult.dateOfIssueB10 != null ? new Date(nativeResult.dateOfIssueB10) : null; - - /** - * The date of issue for B category of German DL card is not specified. - */ - this.dateOfIssueB10NotSpecified = nativeResult.dateOfIssueB10NotSpecified; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - -} - -GermanyDlBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyDlBackRecognizerResult = GermanyDlBackRecognizerResult; - -/** - * Recognizer which can scan back side of German DL cards. - */ -function GermanyDlBackRecognizer() { - Recognizer.call(this, 'GermanyDlBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new GermanyDlBackRecognizerResult(nativeResult); } - -} - -GermanyDlBackRecognizer.prototype = new Recognizer('GermanyDlBackRecognizer'); - -BlinkID.prototype.GermanyDlBackRecognizer = GermanyDlBackRecognizer; - -/** - * Result object for GermanyDlFrontRecognizer. - */ -function GermanyDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Germany DL owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Germany DL. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Germany DL. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Germany DL owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing authority of the Germany DL. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The last name of the Germany DL owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The licence categories of the Germany DL. - */ - this.licenceCategories = nativeResult.licenceCategories; - - /** - * The licence number of the Germany DL. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The place of birth of Germany DL owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -GermanyDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyDlFrontRecognizerResult = GermanyDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Germany national DL cards - */ -function GermanyDlFrontRecognizer() { - Recognizer.call(this, 'GermanyDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Germany DL owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Germany DL should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Germany DL should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if first name of Germany DL owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Germany DL should be extracted. - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if last name of Germany DL owner should be extracted. - * - * - */ - this.extractLastName = true; - - /** - * Defines if licence categories of Germany DL should be extracted. - * - * - */ - this.extractLicenceCategories = true; - - /** - * Defines if place of birth of Germany DL owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new GermanyDlFrontRecognizerResult(nativeResult); } - -} - -GermanyDlFrontRecognizer.prototype = new Recognizer('GermanyDlFrontRecognizer'); - -BlinkID.prototype.GermanyDlFrontRecognizer = GermanyDlFrontRecognizer; - -/** - * Result object for GermanyIdBackRecognizer. - */ -function GermanyIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The city of German ID owner. - */ - this.addressCity = nativeResult.addressCity; - - /** - * The house number of German ID owner. - */ - this.addressHouseNumber = nativeResult.addressHouseNumber; - - /** - * The street of German ID owner. - */ - this.addressStreet = nativeResult.addressStreet; - - /** - * The zip code of German ID owner. - */ - this.addressZipCode = nativeResult.addressZipCode; - - /** - * The issuing authority of German ID. - */ - this.authority = nativeResult.authority; - - /** - * The colour of eyes of German ID owner. - */ - this.colourOfEyes = nativeResult.colourOfEyes; - - /** - * The date of issue of German ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The full address of German ID owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The height of German ID owner. - */ - this.height = nativeResult.height; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -GermanyIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyIdBackRecognizerResult = GermanyIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of German ID. - */ -function GermanyIdBackRecognizer() { - Recognizer.call(this, 'GermanyIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of German ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if issuing authority of German ID should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if colour of eyes of German ID owner should be extracted. - * - * - */ - this.extractColourOfEyes = true; - - /** - * Defines if date of issue of German ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if height of German ID owner should be extracted. - * - * - */ - this.extractHeight = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new GermanyIdBackRecognizerResult(nativeResult); } - -} - -GermanyIdBackRecognizer.prototype = new Recognizer('GermanyIdBackRecognizer'); - -BlinkID.prototype.GermanyIdBackRecognizer = GermanyIdBackRecognizer; - -/** - * Result object for GermanyIdFrontRecognizer. - */ -function GermanyIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The CAN number of Germany ID. - */ - this.canNumber = nativeResult.canNumber; - - /** - * The date of birth of Germany ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Germany ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The document number of Germany ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given names of Germany ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The nationality of Germany ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The place of birth of Germany ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of Germany ID owner. - */ - this.surname = nativeResult.surname; - -} - -GermanyIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyIdFrontRecognizerResult = GermanyIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Germany national ID cards. - */ -function GermanyIdFrontRecognizer() { - Recognizer.call(this, 'GermanyIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if CAN number of Germany ID should be extracted. - * - * - */ - this.extractCanNumber = true; - - /** - * Defines if date of expiry of Germany ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if document number of Germany ID should be extracted. - * - * - */ - this.extractDocumentNumber = true; - - /** - * Defines if given names of Germany ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if nationality of Germany ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if place of birth of Germany ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of Germany ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new GermanyIdFrontRecognizerResult(nativeResult); } - -} - -GermanyIdFrontRecognizer.prototype = new Recognizer('GermanyIdFrontRecognizer'); - -BlinkID.prototype.GermanyIdFrontRecognizer = GermanyIdFrontRecognizer; - -/** - * Result object for GermanyIdOldRecognizer. - */ -function GermanyIdOldRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The place of birth of old German ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -GermanyIdOldRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyIdOldRecognizerResult = GermanyIdOldRecognizerResult; - -/** - * Recognizer which can scan old German ID. - */ -function GermanyIdOldRecognizer() { - Recognizer.call(this, 'GermanyIdOldRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if place of birth of old German ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new GermanyIdOldRecognizerResult(nativeResult); } - -} - -GermanyIdOldRecognizer.prototype = new Recognizer('GermanyIdOldRecognizer'); - -BlinkID.prototype.GermanyIdOldRecognizer = GermanyIdOldRecognizer; - -/** - * Result object for GermanyPassportRecognizer. - */ -function GermanyPassportRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The issuing authority of German passport. - */ - this.authority = nativeResult.authority; - - /** - * The date of issue of German passport. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given name of German passport owner. - */ - this.givenName = nativeResult.givenName; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The nationality of German passport owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The place of birth of German passport owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of German passport owner. - */ - this.surname = nativeResult.surname; - -} - -GermanyPassportRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.GermanyPassportRecognizerResult = GermanyPassportRecognizerResult; - -/** - * Recognizer which can scan German passport. - */ -function GermanyPassportRecognizer() { - Recognizer.call(this, 'GermanyPassportRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if issuing authority of German passport should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if date of issue of German passport should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if given name of German passport owner should be extracted. - * - * - */ - this.extractGivenName = true; - - /** - * Defines if nationality of German passport owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if place of birth of German passport owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of German passport owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new GermanyPassportRecognizerResult(nativeResult); } - -} - -GermanyPassportRecognizer.prototype = new Recognizer('GermanyPassportRecognizer'); - -BlinkID.prototype.GermanyPassportRecognizer = GermanyPassportRecognizer; - -/** - * Result object for HongKongIdFrontRecognizer. - */ -function HongKongIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The commerical Code of the Hong Kong ID. - */ - this.commercialCode = nativeResult.commercialCode; - - /** - * The date of birth of the Hong Kong ID ownder. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The issue date of the Hong Kong ID owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The document number of the Hong Kong card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of the Hong Kong ID owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The residential status of the Hong Kong ID. - */ - this.residentialStatus = nativeResult.residentialStatus; - - /** - * The sex of the Hong Kong ID owner. - */ - this.sex = nativeResult.sex; - -} - -HongKongIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.HongKongIdFrontRecognizerResult = HongKongIdFrontRecognizerResult; - -/** - * Class for configuring Hong Kong ID Front Recognizer. - * - * Hong Kong ID Front recognizer is used for scanning front side of Hong Kong ID. - */ -function HongKongIdFrontRecognizer() { - Recognizer.call(this, 'HongKongIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if commercial code should be extracted from Hong Kong ID - * - * - */ - this.extractCommercialCode = true; - - /** - * Defines if owner's date of birth should be extracted from Hong Kong ID - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if card's date of issue should be extracted from Hong Kong ID - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's full name should be extracted from Hong Kong ID - * - * - */ - this.extractFullName = true; - - /** - * Defines if card's residential status should be extracted from Hong Kong ID - * - * - */ - this.extractResidentialStatus = true; - - /** - * Defines if owner's sex should be extracted from Hong Kong ID - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new HongKongIdFrontRecognizerResult(nativeResult); } - -} - -HongKongIdFrontRecognizer.prototype = new Recognizer('HongKongIdFrontRecognizer'); - -BlinkID.prototype.HongKongIdFrontRecognizer = HongKongIdFrontRecognizer; - -/** - * Result object for IndonesiaIdFrontRecognizer. - */ -function IndonesiaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the front side of the Indonesia Id owner. - */ - this.address = nativeResult.address; - - /** - * The blood Type of the front side of the Indonesia Id owner. - */ - this.bloodType = nativeResult.bloodType; - - /** - * The citizenship of the front side of the Indonesia Id owner. - */ - this.citizenship = nativeResult.citizenship; - - /** - * The city of the front side of the Indonesia Id owner. - */ - this.city = nativeResult.city; - - /** - * The date Of Birth of the front side of the Indonesia Id owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Expiry of the front side of the Indonesia Id owner. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date Of Expiry Permanent of the front side of the Indonesia Id owner. - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * The district of the front side of the Indonesia Id owner. - */ - this.district = nativeResult.district; - - /** - * The document Number of the front side of the Indonesia Id owner. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The kel Desa of the front side of the Indonesia Id owner. - */ - this.kelDesa = nativeResult.kelDesa; - - /** - * The marital Status of the front side of the Indonesia Id owner. - */ - this.maritalStatus = nativeResult.maritalStatus; - - /** - * The name of the front side of the Indonesia Id owner. - */ - this.name = nativeResult.name; - - /** - * The occupation of the front side of the Indonesia Id owner. - */ - this.occupation = nativeResult.occupation; - - /** - * The place Of Birth of the front side of the Indonesia Id owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The province of the front side of the Indonesia Id owner. - */ - this.province = nativeResult.province; - - /** - * The religion of the front side of the Indonesia Id owner. - */ - this.religion = nativeResult.religion; - - /** - * The rt of the front side of the Indonesia Id owner. - */ - this.rt = nativeResult.rt; - - /** - * The rw of the front side of the Indonesia Id owner. - */ - this.rw = nativeResult.rw; - - /** - * The sex of the front side of the Indonesia Id owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -IndonesiaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.IndonesiaIdFrontRecognizerResult = IndonesiaIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Indonesian national ID cards. - */ -function IndonesiaIdFrontRecognizer() { - Recognizer.call(this, 'IndonesiaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Indonesian ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if blood type of Indonesian ID owner should be extracted. - * - * - */ - this.extractBloodType = true; - - /** - * Defines if citizenship of Indonesian ID owner should be extracted. - * - * - */ - this.extractCitizenship = true; - - /** - * Defines if city of Indonesian ID owner should be extracted. - * - * - */ - this.extractCity = true; - - /** - * Defines if date of expiry of Indonesian ID card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if district of Indonesian ID owner should be extracted. - * - * - */ - this.extractDistrict = true; - - /** - * Defines if Kel/Desa of Indonesian ID owner should be extracted. - * - * - */ - this.extractKelDesa = true; - - /** - * Defines if marital status of Indonesian ID owner should be extracted. - * - * - */ - this.extractMaritalStatus = true; - - /** - * Defines if name of Indonesian ID owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if occupation of Indonesian ID owner should be extracted. - * - * - */ - this.extractOccupation = true; - - /** - * Defines if place of birth of Indonesian ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if religion of Indonesian ID owner should be extracted. - * - * - */ - this.extractReligion = true; - - /** - * Defines if RT number of Indonesian ID owner should be extracted. - * - * - */ - this.extractRt = true; - - /** - * Defines if RW number of Indonesian ID owner should be extracted. - * - * - */ - this.extractRw = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new IndonesiaIdFrontRecognizerResult(nativeResult); } - -} - -IndonesiaIdFrontRecognizer.prototype = new Recognizer('IndonesiaIdFrontRecognizer'); - -BlinkID.prototype.IndonesiaIdFrontRecognizer = IndonesiaIdFrontRecognizer; - -/** - * Result object for IrelandDlFrontRecognizer. - */ -function IrelandDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the front side of the Ireland Dl owner. - */ - this.address = nativeResult.address; - - /** - * The date Of Birth of the front side of the Ireland Dl owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Expiry of the front side of the Ireland Dl owner. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date Of Issue of the front side of the Ireland Dl owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The driver Number of the front side of the Ireland Dl owner. - */ - this.driverNumber = nativeResult.driverNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first Name of the front side of the Ireland Dl owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issued By of the front side of the Ireland Dl owner. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The licence Categories of the front side of the Ireland Dl owner. - */ - this.licenceCategories = nativeResult.licenceCategories; - - /** - * The licence Number of the front side of the Ireland Dl owner. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The place Of Birth of the front side of the Ireland Dl owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the front side of the Ireland Dl owner. - */ - this.surname = nativeResult.surname; - -} - -IrelandDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.IrelandDlFrontRecognizerResult = IrelandDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Ireland drivers license. - */ -function IrelandDlFrontRecognizer() { - Recognizer.call(this, 'IrelandDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Ireland DL owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of birth of Ireland DL owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Ireland DL should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Ireland DL should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if first name of Ireland DL owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Ireland DL should be extracted. - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if licence categories of Ireland DL should be extracted. - * - * - */ - this.extractLicenceCategories = true; - - /** - * Defines if licence number of Ireland DL should be extracted. - * - * - */ - this.extractLicenceNumber = true; - - /** - * Defines if place of birth of Ireland DL owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of Ireland DL owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new IrelandDlFrontRecognizerResult(nativeResult); } - -} - -IrelandDlFrontRecognizer.prototype = new Recognizer('IrelandDlFrontRecognizer'); - -BlinkID.prototype.IrelandDlFrontRecognizer = IrelandDlFrontRecognizer; - -/** - * Result object for ItalyDlFrontRecognizer. - */ -function ItalyDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the front side of the Italy Dl owner. - */ - this.address = nativeResult.address; - - /** - * The date Of Birth of the front side of the Italy Dl owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Expiry of the front side of the Italy Dl owner. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date Of Issue of the front side of the Italy Dl owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given Name of the front side of the Italy Dl owner. - */ - this.givenName = nativeResult.givenName; - - /** - * The issuing Authority of the front side of the Italy Dl owner. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The licence Categories of the front side of the Italy Dl owner. - */ - this.licenceCategories = nativeResult.licenceCategories; - - /** - * The licence Number of the front side of the Italy Dl owner. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The place Of Birth of the front side of the Italy Dl owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the front side of the Italy Dl owner. - */ - this.surname = nativeResult.surname; - -} - -ItalyDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.ItalyDlFrontRecognizerResult = ItalyDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Italian driver licence. - */ -function ItalyDlFrontRecognizer() { - Recognizer.call(this, 'ItalyDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Italian DL owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of birth of Italian DL owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Italian DL card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Italian DL card should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if given name of Italian DL owner should be extracted. - * - * - */ - this.extractGivenName = true; - - /** - * Defines if issuing authority of Italian DL card should be extracted. - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if licence categories of Italian DL owner should be extracted. - * - * - */ - this.extractLicenceCategories = true; - - /** - * Defines if place of birth of Italian DL owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of Italian DL owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new ItalyDlFrontRecognizerResult(nativeResult); } - -} - -ItalyDlFrontRecognizer.prototype = new Recognizer('ItalyDlFrontRecognizer'); - -BlinkID.prototype.ItalyDlFrontRecognizer = ItalyDlFrontRecognizer; - -/** - * Result object for JordanCombinedRecognizer. - */ -function JordanCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Jordan ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Jordan ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Jordan ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The issuing authority of the Jordan ID card. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The name of the Jordan ID owner. - */ - this.name = nativeResult.name; - - /** - * The national number of the Jordan ID card. - */ - this.nationalNumber = nativeResult.nationalNumber; - - /** - * The nationality of the Jordan ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Jordan ID owner. - */ - this.sex = nativeResult.sex; - -} - -JordanCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.JordanCombinedRecognizerResult = JordanCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Jordan national ID cards. - */ -function JordanCombinedRecognizer() { - Recognizer.call(this, 'JordanCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Jordan ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if full name of the Jordan ID owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Defines if name of Jordan ID owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if sex of Jordan ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new JordanCombinedRecognizerResult(nativeResult); } - -} - -JordanCombinedRecognizer.prototype = new Recognizer('JordanCombinedRecognizer'); - -BlinkID.prototype.JordanCombinedRecognizer = JordanCombinedRecognizer; - -/** - * Result object for JordanIdBackRecognizer. - */ -function JordanIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of the Jordan ID owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -JordanIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.JordanIdBackRecognizerResult = JordanIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Jordan ID cards. - */ -function JordanIdBackRecognizer() { - Recognizer.call(this, 'JordanIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name of the Jordan ID owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new JordanIdBackRecognizerResult(nativeResult); } - -} - -JordanIdBackRecognizer.prototype = new Recognizer('JordanIdBackRecognizer'); - -BlinkID.prototype.JordanIdBackRecognizer = JordanIdBackRecognizer; - -/** - * Result object for JordanIdFrontRecognizer. - */ -function JordanIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Jordan ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The name of the Jordan ID owner. - */ - this.name = nativeResult.name; - - /** - * The national number of the Jordan ID. - */ - this.nationalNumber = nativeResult.nationalNumber; - - /** - * The sex of the Jordan ID owner. - */ - this.sex = nativeResult.sex; - -} - -JordanIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.JordanIdFrontRecognizerResult = JordanIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Jordan national ID cards. - */ -function JordanIdFrontRecognizer() { - Recognizer.call(this, 'JordanIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Jordan ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if name of Jordan ID owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if sex of Jordan ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new JordanIdFrontRecognizerResult(nativeResult); } - -} - -JordanIdFrontRecognizer.prototype = new Recognizer('JordanIdFrontRecognizer'); - -BlinkID.prototype.JordanIdFrontRecognizer = JordanIdFrontRecognizer; - -/** - * Result object for KuwaitIdBackRecognizer. - */ -function KuwaitIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The serial number of Kuwait ID - */ - this.serialNo = nativeResult.serialNo; - -} - -KuwaitIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.KuwaitIdBackRecognizerResult = KuwaitIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Kuwait national ID cards. - */ -function KuwaitIdBackRecognizer() { - Recognizer.call(this, 'KuwaitIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if serial number of Kuwait ID should be extracted - * - * - */ - this.extractSerialNo = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new KuwaitIdBackRecognizerResult(nativeResult); } - -} - -KuwaitIdBackRecognizer.prototype = new Recognizer('KuwaitIdBackRecognizer'); - -BlinkID.prototype.KuwaitIdBackRecognizer = KuwaitIdBackRecognizer; - -/** - * Result object for KuwaitIdFrontRecognizer. - */ -function KuwaitIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth Date of the front side of the Kuroom wait Id owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The civil Id Number of the front side of the Kuwait Id owner. - */ - this.civilIdNumber = nativeResult.civilIdNumber; - - /** - * The expiry Date of the front side of the Kuwait Id owner. - */ - this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The name of the front side of the Kuwait Id owner. - */ - this.name = nativeResult.name; - - /** - * The nationality of the front side of the Kuwait Id owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The sex of the front side of the Kuwait Id owner. - */ - this.sex = nativeResult.sex; - -} - -KuwaitIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.KuwaitIdFrontRecognizerResult = KuwaitIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Kuwait national ID cards. - */ -function KuwaitIdFrontRecognizer() { - Recognizer.call(this, 'KuwaitIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Kuwait ID owner should be extracted. - * - * - */ - this.extractBirthDate = true; - - /** - * Defines if name of Kuwait ID owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if nationality of Kuwait ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if sex of Kuwait ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new KuwaitIdFrontRecognizerResult(nativeResult); } - -} - -KuwaitIdFrontRecognizer.prototype = new Recognizer('KuwaitIdFrontRecognizer'); - -BlinkID.prototype.KuwaitIdFrontRecognizer = KuwaitIdFrontRecognizer; - -/** - * Result object for MalaysiaDlFrontRecognizer. - */ -function MalaysiaDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The city of the front side of the Malaysia Dl owner. - */ - this.city = nativeResult.city; - - /** - * The dl Class of the front side of the Malaysia Dl owner. - */ - this.dlClass = nativeResult.dlClass; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The full Address of the front side of the Malaysia Dl owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The identity Number of the front side of the Malaysia Dl owner. - */ - this.identityNumber = nativeResult.identityNumber; - - /** - * The name of the front side of the Malaysia Dl owner. - */ - this.name = nativeResult.name; - - /** - * The nationality of the front side of the Malaysia Dl owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The owner State of the front side of the Malaysia Dl owner. - */ - this.ownerState = nativeResult.ownerState; - - /** - * The street of the front side of the Malaysia Dl owner. - */ - this.street = nativeResult.street; - - /** - * The valid From of the front side of the Malaysia Dl owner. - */ - this.validFrom = nativeResult.validFrom != null ? new Date(nativeResult.validFrom) : null; - - /** - * The valid Until of the front side of the Malaysia Dl owner. - */ - this.validUntil = nativeResult.validUntil != null ? new Date(nativeResult.validUntil) : null; - - /** - * The zipcode of the front side of the Malaysia Dl owner. - */ - this.zipcode = nativeResult.zipcode; - -} - -MalaysiaDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaDlFrontRecognizerResult = MalaysiaDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysian DL cards. - */ -function MalaysiaDlFrontRecognizer() { - Recognizer.call(this, 'MalaysiaDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Malaysian DL owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if vehicle classes of Malaysian DL should be extracted. - * - * - */ - this.extractClass = true; - - /** - * Defines if name of Malaysian DL owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if nationality of Malaysian DL owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if date of issue of Malaysian DL should be extracted. - * - * - */ - this.extractValidFrom = true; - - /** - * Defines if date of expiry of Malaysian DL should be extracted. - * - * - */ - this.extractValidUntil = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaDlFrontRecognizerResult(nativeResult); } - -} - -MalaysiaDlFrontRecognizer.prototype = new Recognizer('MalaysiaDlFrontRecognizer'); - -BlinkID.prototype.MalaysiaDlFrontRecognizer = MalaysiaDlFrontRecognizer; - -/** - * Result object for MalaysiaIkadFrontRecognizer. - */ -function MalaysiaIkadFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Address of Malaysian iKad owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of Malaysian iKad owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * Date of expiry of Malaysian iKad card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Employer of Malaysian iKad owner. - */ - this.employer = nativeResult.employer; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * Faculty address in which Malaysian iKad owner currently studies. - */ - this.facultyAddress = nativeResult.facultyAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * Gender of Malaysian iKad owner. - */ - this.gender = nativeResult.gender; - - /** - * The name of Malaysian iKad owner. - */ - this.name = nativeResult.name; - - /** - * Nationality of Malaysian iKad owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The passport number of Malaysian iKad owners passport. - */ - this.passportNumber = nativeResult.passportNumber; - - /** - * Sector in which Malaysian iKad owner works. - */ - this.sector = nativeResult.sector; - -} - -MalaysiaIkadFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaIkadFrontRecognizerResult = MalaysiaIkadFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysia iKad card. - */ -function MalaysiaIkadFrontRecognizer() { - Recognizer.call(this, 'MalaysiaIkadFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Malaysian iKad owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of expiry of Malaysian iKad card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if employer of Malaysian iKad owner should be extracted. - * - * - */ - this.extractEmployer = true; - - /** - * Defines if address of faculty, in which Malaysian iKad owner currently studies, should be extracted. - * - * - */ - this.extractFacultyAddress = true; - - /** - * Defines if gender of Malaysian iKad owner should be extracted. - * - * - */ - this.extractGender = true; - - /** - * Defines if (full) name of Malaysian iKad owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if nationality of Malaysian iKad owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if passport number of Malaysian iKad owners passport should be extracted. - * - * - */ - this.extractPassportNumber = true; - - /** - * Defines if sector in which Malaysian iKad owner works should be extracted. - * - * - */ - this.extractSector = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaIkadFrontRecognizerResult(nativeResult); } - -} - -MalaysiaIkadFrontRecognizer.prototype = new Recognizer('MalaysiaIkadFrontRecognizer'); - -BlinkID.prototype.MalaysiaIkadFrontRecognizer = MalaysiaIkadFrontRecognizer; - -/** - * Result object for MalaysiaMyKadBackRecognizer. - */ -function MalaysiaMyKadBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The Date Of Birth of the MyKad owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The Extended NRIC of the MyKad owner. - */ - this.extendedNric = nativeResult.extendedNric; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The NRIC of the MyKad owner. - */ - this.nric = nativeResult.nric; - - /** - * The old NRIC of the MyKad owner. - */ - this.oldNric = nativeResult.oldNric; - -} - -MalaysiaMyKadBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaMyKadBackRecognizerResult = MalaysiaMyKadBackRecognizerResult; - -/** - * Class for configuring Kad Back Recognizer. - * - * MyKadBack recognizer is used for scanning back side of MyKad. - */ -function MalaysiaMyKadBackRecognizer() { - Recognizer.call(this, 'MalaysiaMyKadBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if old NRIC should be extracted from back side of the MyKad - * - * - */ - this.extractOldNric = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaMyKadBackRecognizerResult(nativeResult); } - -} - -MalaysiaMyKadBackRecognizer.prototype = new Recognizer('MalaysiaMyKadBackRecognizer'); - -BlinkID.prototype.MalaysiaMyKadBackRecognizer = MalaysiaMyKadBackRecognizer; - -/** - * Result object for MalaysiaMyKadFrontRecognizer. - */ -function MalaysiaMyKadFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth date of Malaysian MyKad owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The city of Malaysian MyKad owner. - */ - this.city = nativeResult.city; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The address of Malaysian MyKad owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Malaysian MyKad owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The nric of Malaysian IDMyKad - */ - this.nric = nativeResult.nric; - - /** - * The state of Malaysian MyKad owner. - */ - this.ownerState = nativeResult.ownerState; - - /** - * The religion of Malaysian MyKad owner. - */ - this.religion = nativeResult.religion; - - /** - * The sex of Malaysian MyKad owner. - */ - this.sex = nativeResult.sex; - - /** - * The street of Malaysian MyKad owner. - */ - this.street = nativeResult.street; - - /** - * The zipcode of Malaysian MyKad owner. - */ - this.zipcode = nativeResult.zipcode; - -} - -MalaysiaMyKadFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaMyKadFrontRecognizerResult = MalaysiaMyKadFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysian MyKad cards. - */ -function MalaysiaMyKadFrontRecognizer() { - Recognizer.call(this, 'MalaysiaMyKadFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name and address of Malaysian MyKad owner should be extracted. - * - * - */ - this.extractFullNameAndAddress = true; - - /** - * Defines if religion of Malaysian MyKad owner should be extracted. - * - * - */ - this.extractReligion = true; - - /** - * Defines if sex of Malaysian MyKad owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaMyKadFrontRecognizerResult(nativeResult); } - -} - -MalaysiaMyKadFrontRecognizer.prototype = new Recognizer('MalaysiaMyKadFrontRecognizer'); - -BlinkID.prototype.MalaysiaMyKadFrontRecognizer = MalaysiaMyKadFrontRecognizer; - -/** - * Result object for MalaysiaMyKasFrontRecognizer. - */ -function MalaysiaMyKasFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth date of Malaysian MyKAS owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The city of Malaysian MyKAS owner. - */ - this.city = nativeResult.city; - - /** - * The date of expiry of Malaysian MyKAS. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The address of Malaysian MyKAS owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Malaysian MyKAS owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The nric of Malaysian MyKAS. - */ - this.nric = nativeResult.nric; - - /** - * The state of Malaysian MyKAS owner. - */ - this.ownerState = nativeResult.ownerState; - - /** - * The religion of Malaysian MyKAS owner. - */ - this.religion = nativeResult.religion; - - /** - * The sex of Malaysian MyKAS owner. - */ - this.sex = nativeResult.sex; - - /** - * The street of Malaysian MyKAS owner. - */ - this.street = nativeResult.street; - - /** - * The zipcode of Malaysian MyKAS owner. - */ - this.zipcode = nativeResult.zipcode; - -} - -MalaysiaMyKasFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaMyKasFrontRecognizerResult = MalaysiaMyKasFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysian MyKAS cards. - */ -function MalaysiaMyKasFrontRecognizer() { - Recognizer.call(this, 'MalaysiaMyKasFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name and address of Malaysian MyKAS owner should be extracted. - * - * - */ - this.extractFullNameAndAddress = true; - - /** - * Defines if religion of Malaysian MyKAS owner should be extracted. - * - * - */ - this.extractReligion = true; - - /** - * Defines if sex of Malaysian MyKAS owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaMyKasFrontRecognizerResult(nativeResult); } - -} - -MalaysiaMyKasFrontRecognizer.prototype = new Recognizer('MalaysiaMyKasFrontRecognizer'); - -BlinkID.prototype.MalaysiaMyKasFrontRecognizer = MalaysiaMyKasFrontRecognizer; - -/** - * Result object for MalaysiaMyPrFrontRecognizer. - */ -function MalaysiaMyPrFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth date of Malaysian MyPR owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The city of Malaysian MyPR owner. - */ - this.city = nativeResult.city; - - /** - * The country code of Malaysian MyPR owner. - */ - this.countryCode = nativeResult.countryCode; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The address of Malaysian MyPR owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Malaysian MyPR owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The nric of Malaysian MyPR. - */ - this.nric = nativeResult.nric; - - /** - * The state of Malaysian MyPR owner. - */ - this.ownerState = nativeResult.ownerState; - - /** - * The religion of Malaysian MyPR owner. - */ - this.religion = nativeResult.religion; - - /** - * The sex of Malaysian MyPR owner. - */ - this.sex = nativeResult.sex; - - /** - * The street of Malaysian MyPR owner. - */ - this.street = nativeResult.street; - - /** - * The zipcode of Malaysian MyPR owner. - */ - this.zipcode = nativeResult.zipcode; - -} - -MalaysiaMyPrFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaMyPrFrontRecognizerResult = MalaysiaMyPrFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysian MyPR cards. - */ -function MalaysiaMyPrFrontRecognizer() { - Recognizer.call(this, 'MalaysiaMyPrFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name and address of Malaysian MyPR owner should be extracted. - * - * - */ - this.extractFullNameAndAddress = true; - - /** - * Defines if religion of Malaysian MyPR owner should be extracted. - * - * - */ - this.extractReligion = true; - - /** - * Defines if sex of Malaysian MyPR owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaMyPrFrontRecognizerResult(nativeResult); } - -} - -MalaysiaMyPrFrontRecognizer.prototype = new Recognizer('MalaysiaMyPrFrontRecognizer'); - -BlinkID.prototype.MalaysiaMyPrFrontRecognizer = MalaysiaMyPrFrontRecognizer; - -/** - * Result object for MalaysiaMyTenteraFrontRecognizer. - */ -function MalaysiaMyTenteraFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The army number of Malaysian MyTentera owner. - */ - this.armyNumber = nativeResult.armyNumber; - - /** - * The birth date of Malaysian MyTentera owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * The city of Malaysian MyTentera owner. - */ - this.city = nativeResult.city; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The address of Malaysian MyTentera owner. - */ - this.fullAddress = nativeResult.fullAddress; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Malaysian MyTentera owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The nric of Malaysian MyTentera. - */ - this.nric = nativeResult.nric; - - /** - * The state of Malaysian MyTentera owner. - */ - this.ownerState = nativeResult.ownerState; - - /** - * The religion of Malaysian MyTentera owner. - */ - this.religion = nativeResult.religion; - - /** - * The sex of Malaysian MyTentera owner. - */ - this.sex = nativeResult.sex; - - /** - * The street of Malaysian MyTentera owner. - */ - this.street = nativeResult.street; - - /** - * The zipcode of Malaysian MyTentera owner. - */ - this.zipcode = nativeResult.zipcode; - -} - -MalaysiaMyTenteraFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MalaysiaMyTenteraFrontRecognizerResult = MalaysiaMyTenteraFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Malaysian MyTentera cards. - */ -function MalaysiaMyTenteraFrontRecognizer() { - Recognizer.call(this, 'MalaysiaMyTenteraFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if full name and address of Malaysian MyTentera owner should be extracted. - * - * - */ - this.extractFullNameAndAddress = true; - - /** - * Defines if religion of Malaysian MyTentera owner should be extracted. - * - * - */ - this.extractReligion = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MalaysiaMyTenteraFrontRecognizerResult(nativeResult); } - -} - -MalaysiaMyTenteraFrontRecognizer.prototype = new Recognizer('MalaysiaMyTenteraFrontRecognizer'); - -BlinkID.prototype.MalaysiaMyTenteraFrontRecognizer = MalaysiaMyTenteraFrontRecognizer; - -/** - * Result object for MexicoVoterIdFrontRecognizer. - */ -function MexicoVoterIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Mexico Voter ID owner. - */ - this.address = nativeResult.address; - - /** - * The CURP of Mexico Voter ID owner. - */ - this.curp = nativeResult.curp; - - /** - * The date of birth of Mexico Voter ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The elector key of Mexico Voter ID owner. - */ - this.electorKey = nativeResult.electorKey; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The full name of Mexico Voter ID owner. - */ - this.fullName = nativeResult.fullName; - - /** - * The sex of Mexico Voter ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -MexicoVoterIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MexicoVoterIdFrontRecognizerResult = MexicoVoterIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Mexican voter id. - */ -function MexicoVoterIdFrontRecognizer() { - Recognizer.call(this, 'MexicoVoterIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Mexico Voter ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if CURP of Mexico Voter ID owner should be extracted. - * - * - */ - this.extractCurp = true; - - /** - * Defines if full name of Mexico Voter ID owner should be extracted. - * - * - */ - this.extractFullName = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new MexicoVoterIdFrontRecognizerResult(nativeResult); } - -} - -MexicoVoterIdFrontRecognizer.prototype = new Recognizer('MexicoVoterIdFrontRecognizer'); - -BlinkID.prototype.MexicoVoterIdFrontRecognizer = MexicoVoterIdFrontRecognizer; - -/** - * Result object for MoroccoIdBackRecognizer. - */ -function MoroccoIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the Morocco ID owner. - */ - this.address = nativeResult.address; - - /** - * The civil status number of the Morocco ID owner. - */ - this.civilStatusNumber = nativeResult.civilStatusNumber; - - /** - * The date of expiry of the Morocco ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The document number of the Morocco ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * The father's name of the Morocco ID owner. - */ - this.fathersName = nativeResult.fathersName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The mother's name of the Morocco ID owner. - */ - this.mothersName = nativeResult.mothersName; - - /** - * The sex of the Morocco ID owner. - */ - this.sex = nativeResult.sex; - -} - -MoroccoIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MoroccoIdBackRecognizerResult = MoroccoIdBackRecognizerResult; - -/** - * Class for configuring Morocco ID Back Recognizer. - * - * Morocco ID Back recognizer is used for scanning Back side of the Morocco ID. - */ -function MoroccoIdBackRecognizer() { - Recognizer.call(this, 'MoroccoIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's address should be extracted from Back side of the Morocco ID - * - * - */ - this.extractAddress = true; - - /** - * Defines if owner's civil status number should be extracted from Back side of the Morocco ID - * - * - */ - this.extractCivilStatusNumber = true; - - /** - * Defines if date of expiry should be extracted from Back side of the Morocco ID - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if father's name should be extracted from Back side of the Morocco ID - * - * - */ - this.extractFathersName = true; - - /** - * Defines if mother's name should be extracted from Back side of the Morocco ID - * - * - */ - this.extractMothersName = true; - - /** - * Defines if owner's sex should be extracted from Back side of the Morocco ID - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MoroccoIdBackRecognizerResult(nativeResult); } - -} - -MoroccoIdBackRecognizer.prototype = new Recognizer('MoroccoIdBackRecognizer'); - -BlinkID.prototype.MoroccoIdBackRecognizer = MoroccoIdBackRecognizer; - -/** - * Result object for MoroccoIdFrontRecognizer. - */ -function MoroccoIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Morocco ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Morocco ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The document number of the Morocco ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The name of the Morocco ID owner. - */ - this.name = nativeResult.name; - - /** - * The place of birth of the Morocco ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of the Morocco ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Morocco ID owner. - */ - this.surname = nativeResult.surname; - -} - -MoroccoIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MoroccoIdFrontRecognizerResult = MoroccoIdFrontRecognizerResult; - -/** - * Class for configuring Morocco ID Front Recognizer. - * - * Morocco ID Front recognizer is used for scanning front side of the Morocco ID. - */ -function MoroccoIdFrontRecognizer() { - Recognizer.call(this, 'MoroccoIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's date of birth should be extracted from front side of the Morocco ID - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry should be extracted from front side of the Morocco ID - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if owner's name should be extracted from front side of the Morocco ID - * - * - */ - this.extractName = true; - - /** - * Defines if owner's place of birth should be extracted from front side of the Morocco ID - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if owner's sex should be extracted from front side of the Morocco ID - * - * - */ - this.extractSex = true; - - /** - * Defines if owner's surname should be extracted from front side of the Morocco ID - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new MoroccoIdFrontRecognizerResult(nativeResult); } - -} - -MoroccoIdFrontRecognizer.prototype = new Recognizer('MoroccoIdFrontRecognizer'); - -BlinkID.prototype.MoroccoIdFrontRecognizer = MoroccoIdFrontRecognizer; - -/** - * Result object for MrtdCombinedRecognizer. - */ -function MrtdCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * Returns the Data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - -} - -MrtdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MrtdCombinedRecognizerResult = MrtdCombinedRecognizerResult; - -/** - * MRTD Combined recognizer - * - * MRTD Combined recognizer is used for scanning both front and back side of generic IDs. - */ -function MrtdCombinedRecognizer() { - Recognizer.call(this, 'MrtdCombinedRecognizer'); - - /** - * Whether special characters are allowed - * - * - */ - this.allowSpecialCharacters = false; - - /** - * Whether returning of unparsed results is allowed - * - * - */ - this.allowUnparsedResults = false; - - /** - * Whether returning of unverified results is allowed - * Unverified result is result that is parsed, but check digits are incorrect. - * - * - */ - this.allowUnverifiedResults = false; - - /** - * Type of document this recognizer will scan. - * - * - */ - this.detectorType = DocumentFaceDetectorType.TD1; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Defines how many times the same document should be detected before the detector - * returns this document as a result of the deteciton - * - * Higher number means more reliable detection, but slower processing - * - * - */ - this.numStableDetectionsThreshold = 6; - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new MrtdCombinedRecognizerResult(nativeResult); } - -} - -MrtdCombinedRecognizer.prototype = new Recognizer('MrtdCombinedRecognizer'); - -BlinkID.prototype.MrtdCombinedRecognizer = MrtdCombinedRecognizer; - -/** - * Result object for MrtdRecognizer. - */ -function MrtdRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * Returns the Data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -MrtdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.MrtdRecognizerResult = MrtdRecognizerResult; - -/** - * Recognizer that can recognizer Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) - */ -function MrtdRecognizer() { - Recognizer.call(this, 'MrtdRecognizer'); - - /** - * Whether special characters are allowed - * - * - */ - this.allowSpecialCharacters = false; - - /** - * Whether returning of unparsed results is allowed - * - * - */ - this.allowUnparsedResults = false; - - /** - * Whether returning of unverified results is allowed - * Unverified result is result that is parsed, but check digits are incorrect. - * - * - */ - this.allowUnverifiedResults = false; - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new MrtdRecognizerResult(nativeResult); } - -} - -MrtdRecognizer.prototype = new Recognizer('MrtdRecognizer'); - -BlinkID.prototype.MrtdRecognizer = MrtdRecognizer; - -/** - * Result object for NewZealandDlFrontRecognizer. - */ -function NewZealandDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The last name of the New Zealand Driver License owner. - */ - this.address = nativeResult.address; - - /** - * The card version of the New Zealand Driver License. - */ - this.cardVersion = nativeResult.cardVersion; - - /** - * The last name of the New Zealand Driver License owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The last name of the New Zealand Driver License owner. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The last name of the New Zealand Driver License owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The last name of the New Zealand Driver License owner. - */ - this.donorIndicator = nativeResult.donorIndicator; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the New Zealand Driver License owner. - */ - this.firstNames = nativeResult.firstNames; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The license number of the New Zealand Driver License. - */ - this.licenseNumber = nativeResult.licenseNumber; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The last name of the New Zealand Driver License owner. - */ - this.surname = nativeResult.surname; - -} - -NewZealandDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.NewZealandDlFrontRecognizerResult = NewZealandDlFrontRecognizerResult; - -/** - * Class for configuring New Zealand DL Front Recognizer. - * - * New Zealand DL Front recognizer is used for scanning front side of New Zealand DL. - */ -function NewZealandDlFrontRecognizer() { - Recognizer.call(this, 'NewZealandDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's address should be extracted from New Zealand Driver License - * - * - */ - this.extractAddress = true; - - /** - * Defines if owner's date of birth should be extracted from New Zealand Driver License - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if card's expiry date should be extracted from New Zealand Driver License - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if card's issue date should be extracted from New Zealand Driver License - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's donor indicator should be extracted from New Zealand Driver License - * - * - */ - this.extractDonorIndicator = true; - - /** - * Defines if owner's first name should be extracted from New Zealand Driver License - * - * - */ - this.extractFirstNames = true; - - /** - * Defines if owner's last name should be extracted from New Zealand Driver License - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new NewZealandDlFrontRecognizerResult(nativeResult); } - -} - -NewZealandDlFrontRecognizer.prototype = new Recognizer('NewZealandDlFrontRecognizer'); - -BlinkID.prototype.NewZealandDlFrontRecognizer = NewZealandDlFrontRecognizer; - -/** - * Result object for NigeriaVoterIdBackRecognizer. - */ -function NigeriaVoterIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Nigeria Voter ID owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of Nigeria Voter ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The first name of Nigeria Voter ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The raw barcode data of Nigeria Voter ID card. - */ - this.rawBarcodeData = nativeResult.rawBarcodeData; - - /** - * The sex of Nigeria Voter ID owner. - */ - this.sex = nativeResult.sex; - - /** - * The surname of Nigeria Voter ID owner. - */ - this.surname = nativeResult.surname; - -} - -NigeriaVoterIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.NigeriaVoterIdBackRecognizerResult = NigeriaVoterIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Nigeria voter ID cards. - */ -function NigeriaVoterIdBackRecognizer() { - Recognizer.call(this, 'NigeriaVoterIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new NigeriaVoterIdBackRecognizerResult(nativeResult); } - -} - -NigeriaVoterIdBackRecognizer.prototype = new Recognizer('NigeriaVoterIdBackRecognizer'); - -BlinkID.prototype.NigeriaVoterIdBackRecognizer = NigeriaVoterIdBackRecognizer; - -/** - * Result object for PassportRecognizer. - */ -function PassportRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -PassportRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.PassportRecognizerResult = PassportRecognizerResult; - -/** - * Recognizer which can scan all passports with MRZ. - */ -function PassportRecognizer() { - Recognizer.call(this, 'PassportRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new PassportRecognizerResult(nativeResult); } - -} - -PassportRecognizer.prototype = new Recognizer('PassportRecognizer'); - -BlinkID.prototype.PassportRecognizer = PassportRecognizer; - -/** - * Result object for Pdf417Recognizer. - */ -function Pdf417RecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Type of the barcode scanned - * - * @return Type of the barcode - */ - this.barcodeType = nativeResult.barcodeType; - - /** - * Byte array with result of the scan - */ - this.rawData = nativeResult.rawData; - - /** - * Retrieves string content of scanned data - */ - this.stringData = nativeResult.stringData; - - /** - * Flag indicating uncertain scanning data - * E.g obtained from damaged barcode. - */ - this.uncertain = nativeResult.uncertain; - -} - -Pdf417RecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.Pdf417RecognizerResult = Pdf417RecognizerResult; - -/** - * A recognizer that can scan PDF417 2D barcodes. - */ -function Pdf417Recognizer() { - Recognizer.call(this, 'Pdf417Recognizer'); - - /** - * Set this to true to scan barcodes which don't have quiet zone (white area) around it - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.nullQuietZoneAllowed = false; - - /** - * Set this to true to allow scanning barcodes with inverted intensities - * (i.e. white barcodes on black background) - * - * falseTE: this options doubles the frame processing time - * - * - */ - this.scanInverse = false; - - /** - * Set this to true to scan even barcode not compliant with standards - * For example, malformed PDF417 barcodes which were incorrectly encoded - * - * Use only if necessary because it slows down the recognition process - * - * - */ - this.scanUncertain = true; - - this.createResultFromNative = function (nativeResult) { return new Pdf417RecognizerResult(nativeResult); } - -} - -Pdf417Recognizer.prototype = new Recognizer('Pdf417Recognizer'); - -BlinkID.prototype.Pdf417Recognizer = Pdf417Recognizer; - -/** - * Result object for PolandCombinedRecognizer. - */ -function PolandCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Poland ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Poland ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Poland ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The family name of the Poland ID owner. - */ - this.familyName = nativeResult.familyName; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The given names of the Poland ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The issuing authority of the Poland ID card. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Poland ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The parents given names of the Poland ID owner. - */ - this.parentsGivenNames = nativeResult.parentsGivenNames; - - /** - * The personal number of the Poland ID owner. - */ - this.personalNumber = nativeResult.personalNumber; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Poland ID owner. - */ - this.sex = nativeResult.sex; - - /** - * The surname of the Poland ID owner. - */ - this.surname = nativeResult.surname; - -} - -PolandCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.PolandCombinedRecognizerResult = PolandCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Poland national ID cards. - */ -function PolandCombinedRecognizer() { - Recognizer.call(this, 'PolandCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Poland ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if family name of Poland ID owner should be extracted. - * - * - */ - this.extractFamilyName = false; - - /** - * Defines if given names of Poland ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if parents given names of Poland ID owner should be extracted. - * - * - */ - this.extractParentsGivenNames = false; - - /** - * Defines if sex of Poland ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Poland ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new PolandCombinedRecognizerResult(nativeResult); } - -} - -PolandCombinedRecognizer.prototype = new Recognizer('PolandCombinedRecognizer'); - -BlinkID.prototype.PolandCombinedRecognizer = PolandCombinedRecognizer; - -/** - * Result object for PolandIdBackRecognizer. - */ -function PolandIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -PolandIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.PolandIdBackRecognizerResult = PolandIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Poland ID cards. - */ -function PolandIdBackRecognizer() { - Recognizer.call(this, 'PolandIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new PolandIdBackRecognizerResult(nativeResult); } - -} - -PolandIdBackRecognizer.prototype = new Recognizer('PolandIdBackRecognizer'); - -BlinkID.prototype.PolandIdBackRecognizer = PolandIdBackRecognizer; - -/** - * Result object for PolandIdFrontRecognizer. - */ -function PolandIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Poland ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The family name of the Poland ID owner. - */ - this.familyName = nativeResult.familyName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given names of the Poland ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The parents given names of the Poland ID owner. - */ - this.parentsGivenNames = nativeResult.parentsGivenNames; - - /** - * The sex of the Poland ID owner. - */ - this.sex = nativeResult.sex; - - /** - * The surname of the Poland ID owner. - */ - this.surname = nativeResult.surname; - -} - -PolandIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.PolandIdFrontRecognizerResult = PolandIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Poland ID cards. - */ -function PolandIdFrontRecognizer() { - Recognizer.call(this, 'PolandIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Poland ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if family name of Poland ID owner should be extracted. - * - * - */ - this.extractFamilyName = false; - - /** - * Defines if given names of Poland ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if parents given names of Poland ID owner should be extracted. - * - * - */ - this.extractParentsGivenNames = false; - - /** - * Defines if sex of Poland ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Poland ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new PolandIdFrontRecognizerResult(nativeResult); } - -} - -PolandIdFrontRecognizer.prototype = new Recognizer('PolandIdFrontRecognizer'); - -BlinkID.prototype.PolandIdFrontRecognizer = PolandIdFrontRecognizer; - -/** - * Result object for RomaniaIdFrontRecognizer. - */ -function RomaniaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Romania ID owner. - */ - this.address = nativeResult.address; - - /** - * The CNP number of Romania ID owner. - */ - this.cnpNumber = nativeResult.cnpNumber; - - /** - * The date of expiry of Romania ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Romania ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of Romania ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing authority of Romania ID. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The nationality of Romania ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The parent name of Romania ID owner. - */ - this.parentName = nativeResult.parentName; - - /** - * The place of birth of Romania ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The sex of Romania ID owner. - */ - this.sex = nativeResult.sex; - - /** - * The surname of Romania ID owner. - */ - this.surname = nativeResult.surname; - -} - -RomaniaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.RomaniaIdFrontRecognizerResult = RomaniaIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Romania ID. - */ -function RomaniaIdFrontRecognizer() { - Recognizer.call(this, 'RomaniaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Romania ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of expiry of Romania ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Romania ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if first name of Romania ID owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Romania ID should be extracted. - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if place of birth of Romania ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if sex of Romania ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Romania ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new RomaniaIdFrontRecognizerResult(nativeResult); } - -} - -RomaniaIdFrontRecognizer.prototype = new Recognizer('RomaniaIdFrontRecognizer'); - -BlinkID.prototype.RomaniaIdFrontRecognizer = RomaniaIdFrontRecognizer; - -/** - * Result object for SimNumberRecognizer. - */ -function SimNumberRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Returns the recognized SIM number from barcode or empty string if recognition failed. - */ - this.simNumber = nativeResult.simNumber; - -} - -SimNumberRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SimNumberRecognizerResult = SimNumberRecognizerResult; - -/** - * Recognizer that can perform recognition of barcodes on SIM packaging. - */ -function SimNumberRecognizer() { - Recognizer.call(this, 'SimNumberRecognizer'); - - this.createResultFromNative = function (nativeResult) { return new SimNumberRecognizerResult(nativeResult); } - -} - -SimNumberRecognizer.prototype = new Recognizer('SimNumberRecognizer'); - -BlinkID.prototype.SimNumberRecognizer = SimNumberRecognizer; - -/** - * Result object for SingaporeChangiEmployeeIdRecognizer. - */ -function SingaporeChangiEmployeeIdRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * TThe company name of the Singapore Changi employee ID owner. - */ - this.companyName = nativeResult.companyName; - - /** - * The date of expiry of Singapore Changi employee ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The document number of the Singapore Changi employee ID. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The name of the Singapore Changi employee ID owner. - */ - this.name = nativeResult.name; - -} - -SingaporeChangiEmployeeIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SingaporeChangiEmployeeIdRecognizerResult = SingaporeChangiEmployeeIdRecognizerResult; - -/** - * Class for configuring Singapore Changi Employee Id Recognizer. - * - * Singapore Changi Employee Id recognizer is used for scanning front side of the Singapore Driver's license.. - */ -function SingaporeChangiEmployeeIdRecognizer() { - Recognizer.call(this, 'SingaporeChangiEmployeeIdRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if company name should be extracted from the Singapore Changi Employee Id - * - * - */ - this.extractCompanyName = true; - - /** - * Defines if birth of expiry should be extracted from the Singapore Changi Employee Id - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if owner's name should be extracted from the Singapore Changi Employee Id - * - * - */ - this.extractName = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SingaporeChangiEmployeeIdRecognizerResult(nativeResult); } - -} - -SingaporeChangiEmployeeIdRecognizer.prototype = new Recognizer('SingaporeChangiEmployeeIdRecognizer'); - -BlinkID.prototype.SingaporeChangiEmployeeIdRecognizer = SingaporeChangiEmployeeIdRecognizer; - -/** - * Result object for SingaporeCombinedRecognizer. - */ -function SingaporeCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the back side of the Singapore Id owner. - */ - this.address = nativeResult.address; - - /** - * The address Change Date of the back side of the Singapore Id owner. - */ - this.addressChangeDate = nativeResult.addressChangeDate != null ? new Date(nativeResult.addressChangeDate) : null; - - /** - * The blood Type of the back side of the Singapore Id owner. - */ - this.bloodGroup = nativeResult.bloodGroup; - - /** - * The country/place of birth of the Singaporean ID card owner. - */ - this.countryOfBirth = nativeResult.countryOfBirth; - - /** - * The date of birth of the Singaporean ID card owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date Of Issue of the back side of the Singapore Id owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The identity card number of the Singaporean ID card. - */ - this.identityCardNumber = nativeResult.identityCardNumber; - - /** - * The name of the Singaporean ID card owner. - */ - this.name = nativeResult.name; - - /** - * The race of the Singaporean ID card owner. - */ - this.race = nativeResult.race; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Singaporean ID card owner. - */ - this.sex = nativeResult.sex; - -} - -SingaporeCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SingaporeCombinedRecognizerResult = SingaporeCombinedRecognizerResult; - -/** - * Singapore ID Combined Recognizer. - * - * Singapore ID Combined recognizer is used for scanning both front and back side of Singapore ID. - */ -function SingaporeCombinedRecognizer() { - Recognizer.call(this, 'SingaporeCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's address should be extracted from back side of the Singapore Id - * - * - */ - this.extractAddress = true; - - /** - * Defines if owner's address change date should be extracted from back side of the Singapore Id - * - * - */ - this.extractAddressChangeDate = false; - - /** - * Defines if owner's blood type should be extracted from back side of the Singapore Id - * - * - */ - this.extractBloodGroup = true; - - /** - * Defines if country/place of birth of Singaporean ID card owner should be extracted - * - * - */ - this.extractCountryOfBirth = true; - - /** - * Defines if date of birth of Singaporean ID card owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if owner's date of issue should be extracted from back side of the Singapore Id - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if name of Singaporean ID card owner should be extracted - * - * - */ - this.extractName = true; - - /** - * Defines if race of Singaporean ID card owner should be extracted - * - * - */ - this.extractRace = true; - - /** - * Defines if sex of Singaporean ID card owner should be extracted - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - this.createResultFromNative = function (nativeResult) { return new SingaporeCombinedRecognizerResult(nativeResult); } - -} - -SingaporeCombinedRecognizer.prototype = new Recognizer('SingaporeCombinedRecognizer'); - -BlinkID.prototype.SingaporeCombinedRecognizer = SingaporeCombinedRecognizer; - -/** - * Result object for SingaporeDlFrontRecognizer. - */ -function SingaporeDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The birth Date of the Singapore DL owner. - */ - this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issue date of the Singapore DL. - */ - this.issueDate = nativeResult.issueDate != null ? new Date(nativeResult.issueDate) : null; - - /** - * The licence Number of the Singapore DL. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The name of the Singapore DL owner. - */ - this.name = nativeResult.name; - - /** - * The valid till of the Singapore DL. - */ - this.validTill = nativeResult.validTill != null ? new Date(nativeResult.validTill) : null; - -} - -SingaporeDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SingaporeDlFrontRecognizerResult = SingaporeDlFrontRecognizerResult; - -/** - * Class for configuring Singapore Dl Front Recognizer. - * - * Singapore Dl Front recognizer is used for scanning front side of the Singapore Driver's license.. - */ -function SingaporeDlFrontRecognizer() { - Recognizer.call(this, 'SingaporeDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's birth date should be extracted from front side of the Singapore DL - * - * - */ - this.extractBirthDate = true; - - /** - * Defines if the issue date should be extracted from front side of the Singapore DL - * - * - */ - this.extractIssueDate = true; - - /** - * Defines if owner's name should be extracted from front side of the Singapore DL - * - * - */ - this.extractName = true; - - /** - * Defines if valid till should be extracted from front side of the Singapore DL - * - * - */ - this.extractValidTill = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SingaporeDlFrontRecognizerResult(nativeResult); } - -} - -SingaporeDlFrontRecognizer.prototype = new Recognizer('SingaporeDlFrontRecognizer'); - -BlinkID.prototype.SingaporeDlFrontRecognizer = SingaporeDlFrontRecognizer; - -/** - * Result object for SingaporeIdBackRecognizer. - */ -function SingaporeIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the back side of the Singapore Id owner. - */ - this.address = nativeResult.address; - - /** - * The address Change Date of the back side of the Singapore Id owner. - */ - this.addressChangeDate = nativeResult.addressChangeDate != null ? new Date(nativeResult.addressChangeDate) : null; - - /** - * The blood Type of the back side of the Singapore Id owner. - */ - this.bloodGroup = nativeResult.bloodGroup; - - /** - * The card Number of the back side of the Singapore Id owner. - */ - this.cardNumber = nativeResult.cardNumber; - - /** - * The date Of Issue of the back side of the Singapore Id owner. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - -} - -SingaporeIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SingaporeIdBackRecognizerResult = SingaporeIdBackRecognizerResult; - -/** - * Class for configuring Singapore Id Back Recognizer. - * - * Singapore Id Back recognizer is used for scanning back side of the Singapore Id. - */ -function SingaporeIdBackRecognizer() { - Recognizer.call(this, 'SingaporeIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's address should be extracted from back side of the Singapore Id - * - * - */ - this.extractAddress = true; - - /** - * Defines if owner's address change date should be extracted from back side of the Singapore Id - * - * - */ - this.extractAddressChangeDate = false; - - /** - * Defines if owner's blood type should be extracted from back side of the Singapore Id - * - * - */ - this.extractBloodGroup = true; - - /** - * Defines if owner's date of issue should be extracted from back side of the Singapore Id - * - * - */ - this.extractDateOfIssue = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SingaporeIdBackRecognizerResult(nativeResult); } - -} - -SingaporeIdBackRecognizer.prototype = new Recognizer('SingaporeIdBackRecognizer'); - -BlinkID.prototype.SingaporeIdBackRecognizer = SingaporeIdBackRecognizer; - -/** - * Result object for SingaporeIdFrontRecognizer. - */ -function SingaporeIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The country/place of birth of the Singaporean ID card owner. - */ - this.countryOfBirth = nativeResult.countryOfBirth; - - /** - * The date of birth of the Singaporean ID card owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The identity card number of the Singaporean ID card. - */ - this.identityCardNumber = nativeResult.identityCardNumber; - - /** - * The name of the Singaporean ID card owner. - */ - this.name = nativeResult.name; - - /** - * The race of the Singaporean ID card owner. - */ - this.race = nativeResult.race; - - /** - * The sex of the Singaporean ID card owner. - */ - this.sex = nativeResult.sex; - -} - -SingaporeIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SingaporeIdFrontRecognizerResult = SingaporeIdFrontRecognizerResult; - -/** - * Class for configuring Singapore ID Front Recognizer. - * - * Singapore ID Front recognizer is used for scanning front side of Singapore ID. - */ -function SingaporeIdFrontRecognizer() { - Recognizer.call(this, 'SingaporeIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if country/place of birth of Singaporean ID card owner should be extracted - * - * - */ - this.extractCountryOfBirth = true; - - /** - * Defines if date of birth of Singaporean ID card owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if name of Singaporean ID card owner should be extracted - * - * - */ - this.extractName = true; - - /** - * Defines if race of Singaporean ID card owner should be extracted - * - * - */ - this.extractRace = true; - - /** - * Defines if sex of Singaporean ID card owner should be extracted - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SingaporeIdFrontRecognizerResult(nativeResult); } - -} - -SingaporeIdFrontRecognizer.prototype = new Recognizer('SingaporeIdFrontRecognizer'); - -BlinkID.prototype.SingaporeIdFrontRecognizer = SingaporeIdFrontRecognizer; - -/** - * Result object for SlovakiaCombinedRecognizer. - */ -function SlovakiaCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the Slovak ID owner. - */ - this.address = nativeResult.address; - - /** - * The date of birth of the Slovak ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Slovak ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the Slovak ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Slovak ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Slovak ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The issuing authority of the Slovak ID card. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The last name of the Slovak ID owner. - */ - this.lastName = nativeResult.lastName; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Slovak ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The personal number of the Slovak ID owner. - */ - this.personalNumber = nativeResult.personalNumber; - - /** - * The place of birth of the Slovak ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Slovak ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The special remarks of the Slovak ID owner. - */ - this.specialRemarks = nativeResult.specialRemarks; - - /** - * The surname at birth of the Slovak ID owner. - */ - this.surnameAtBirth = nativeResult.surnameAtBirth; - -} - -SlovakiaCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SlovakiaCombinedRecognizerResult = SlovakiaCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Slovakia national ID cards. - */ -function SlovakiaCombinedRecognizer() { - Recognizer.call(this, 'SlovakiaCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Slovak ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if date of birth of Slovak ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Slovak ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Slovak ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if document number of Slovak ID should be extracted. - * - * - */ - this.extractDocumentNumber = true; - - /** - * Defines if first name of Slovak ID owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Slovak ID should be extracted. - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if last name of Slovak ID owner should be extracted. - * - * - */ - this.extractLastName = true; - - /** - * Defines if nationality of Slovak ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if place of birth of Slovak ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if sex of Slovak ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if special remarks of Slovak ID owner should be extracted. - * - * - */ - this.extractSpecialRemarks = true; - - /** - * Defines if surname at birth of Slovak ID owner should be extracted. - * - * - */ - this.extractSurnameAtBirth = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SlovakiaCombinedRecognizerResult(nativeResult); } - -} - -SlovakiaCombinedRecognizer.prototype = new Recognizer('SlovakiaCombinedRecognizer'); - -BlinkID.prototype.SlovakiaCombinedRecognizer = SlovakiaCombinedRecognizer; - -/** - * Result object for SlovakiaIdBackRecognizer. - */ -function SlovakiaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Slovak ID owner. - */ - this.address = nativeResult.address; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The place of birth of Slovak ID owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * The special remarks of Slovak ID owner. - */ - this.specialRemarks = nativeResult.specialRemarks; - - /** - * The surname at birth of Slovak ID owner. - */ - this.surnameAtBirth = nativeResult.surnameAtBirth; - -} - -SlovakiaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SlovakiaIdBackRecognizerResult = SlovakiaIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Slovak ID cards. - */ -function SlovakiaIdBackRecognizer() { - Recognizer.call(this, 'SlovakiaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Slovak ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if place of birth of Slovak ID owner should be extracted. - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if special remarks of Slovak ID owner should be extracted. - * - * - */ - this.extractSpecialRemarks = true; - - /** - * Defines if surname at birth of Slovak ID owner should be extracted. - * - * - */ - this.extractSurnameAtBirth = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SlovakiaIdBackRecognizerResult(nativeResult); } - -} - -SlovakiaIdBackRecognizer.prototype = new Recognizer('SlovakiaIdBackRecognizer'); - -BlinkID.prototype.SlovakiaIdBackRecognizer = SlovakiaIdBackRecognizer; - -/** - * Result object for SlovakiaIdFrontRecognizer. - */ -function SlovakiaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Slovak ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Slovak ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the Slovak ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * The document number of the Slovak ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Slovak ID owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing authority of the Slovak ID card. - */ - this.issuedBy = nativeResult.issuedBy; - - /** - * The last name of the Slovak ID owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The nationality of the Slovak ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The personal number of the Slovak ID owner. - */ - this.personalNumber = nativeResult.personalNumber; - - /** - * The sex of the Slovak ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - -} - -SlovakiaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SlovakiaIdFrontRecognizerResult = SlovakiaIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Slovak national ID cards. - */ -function SlovakiaIdFrontRecognizer() { - Recognizer.call(this, 'SlovakiaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Slovak ID owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Slovak ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Slovak ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if document number of Slovak ID should be extracted. - * - * - */ - this.extractDocumentNumber = true; - - /** - * Defines if first name of Slovak ID owner should be extracted. - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Slovak ID should be extracted. - * - * - */ - this.extractIssuedBy = true; - - /** - * Defines if last name of Slovak ID owner should be extracted. - * - * - */ - this.extractLastName = true; - - /** - * Defines if nationality of Slovak ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if sex of Slovak ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SlovakiaIdFrontRecognizerResult(nativeResult); } - -} - -SlovakiaIdFrontRecognizer.prototype = new Recognizer('SlovakiaIdFrontRecognizer'); - -BlinkID.prototype.SlovakiaIdFrontRecognizer = SlovakiaIdFrontRecognizer; - -/** - * Result object for SloveniaCombinedRecognizer. - */ -function SloveniaCombinedRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of the Slovenia ID owner. - */ - this.address = nativeResult.address; - - /** - * The administrative unit of the Slovenia ID card. - */ - this.administrativeUnit = nativeResult.administrativeUnit; - - /** - * The date of birth of the Slovenia ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of the Slovenia ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Determines if date of expiry of Slovenian ID card is permanent. - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * The date of issue of the Slovenia ID card. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * Digital signature of the recognition result. Available only if enabled with signResult property. - */ - this.digitalSignature = nativeResult.digitalSignature; - - /** - * Version of the digital signature. Available only if enabled with signResult property. - */ - this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. - */ - this.documentDataMatch = nativeResult.documentDataMatch; - - /** - * The document number of the Slovenia ID card. - */ - this.documentNumber = nativeResult.documentNumber; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * back side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; - - /** - * front side image of the document if enabled with returnFullDocumentImage property. - */ - this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; - - /** - * The given names of the Slovenia ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * Determines if all check digits inside MRZ are correct - */ - this.mrzVerified = nativeResult.mrzVerified; - - /** - * The nationality of the Slovenia ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The pin of the Slovenia ID owner. - */ - this.pin = nativeResult.pin; - - /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. - */ - this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; - - /** - * The sex of the Slovenia ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Slovenia ID owner. - */ - this.surname = nativeResult.surname; - -} - -SloveniaCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SloveniaCombinedRecognizerResult = SloveniaCombinedRecognizerResult; - -/** - * Recognizer which can scan front and back side of Slovenia national ID cards. - */ -function SloveniaCombinedRecognizer() { - Recognizer.call(this, 'SloveniaCombinedRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Slovenian ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if issuing administrative unit of Slovenian ID should be extracted. - * - * - */ - this.extractAdministrativeUnit = true; - - /** - * Defines if date of expiry of Slovenian ID card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Slovenian ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if given names of Slovenian ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if nationality of Slovenian ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if sex of Slovenian ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Slovenian ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Whether or not recognition result should be signed. - * - * - */ - this.signResult = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SloveniaCombinedRecognizerResult(nativeResult); } - -} - -SloveniaCombinedRecognizer.prototype = new Recognizer('SloveniaCombinedRecognizer'); - -BlinkID.prototype.SloveniaCombinedRecognizer = SloveniaCombinedRecognizer; - -/** - * Result object for SloveniaIdBackRecognizer. - */ -function SloveniaIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The address of Slovenian ID owner. - */ - this.address = nativeResult.address; - - /** - * The issuing administrative unit of Slovenian ID. - */ - this.administrativeUnit = nativeResult.administrativeUnit; - - /** - * The date of issue of Slovenian ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - -} - -SloveniaIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SloveniaIdBackRecognizerResult = SloveniaIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Slovenia ID. - */ -function SloveniaIdBackRecognizer() { - Recognizer.call(this, 'SloveniaIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if address of Slovenian ID owner should be extracted. - * - * - */ - this.extractAddress = true; - - /** - * Defines if issuing administrative unit of Slovenian ID should be extracted. - * - * - */ - this.extractAdministrativeUnit = true; - - /** - * Defines if date of issue of Slovenian ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SloveniaIdBackRecognizerResult(nativeResult); } - -} - -SloveniaIdBackRecognizer.prototype = new Recognizer('SloveniaIdBackRecognizer'); - -BlinkID.prototype.SloveniaIdBackRecognizer = SloveniaIdBackRecognizer; - -/** - * Result object for SloveniaIdFrontRecognizer. - */ -function SloveniaIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Slovenian ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Slovenian ID card. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * Determines if date of expiry of Slovenian ID card is permanent. - */ - this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given names of Slovenian ID owner. - */ - this.givenNames = nativeResult.givenNames; - - /** - * The nationality of Slovenian ID owner. - */ - this.nationality = nativeResult.nationality; - - /** - * The sex of Slovenian ID owner. - */ - this.sex = nativeResult.sex; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of Slovenian ID owner. - */ - this.surname = nativeResult.surname; - -} - -SloveniaIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SloveniaIdFrontRecognizerResult = SloveniaIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Slovenia ID. - */ -function SloveniaIdFrontRecognizer() { - Recognizer.call(this, 'SloveniaIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of expiry of Slovenian ID card should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if given names of Slovenian ID owner should be extracted. - * - * - */ - this.extractGivenNames = true; - - /** - * Defines if nationality of Slovenian ID owner should be extracted. - * - * - */ - this.extractNationality = true; - - /** - * Defines if sex of Slovenian ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Slovenian ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SloveniaIdFrontRecognizerResult(nativeResult); } - -} - -SloveniaIdFrontRecognizer.prototype = new Recognizer('SloveniaIdFrontRecognizer'); - -BlinkID.prototype.SloveniaIdFrontRecognizer = SloveniaIdFrontRecognizer; - -/** - * Result object for SpainDlFrontRecognizer. - */ -function SpainDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Spain DL owner - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Spain DL owner - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing authority of the Spain DL - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The licence categories of the Spain DL - */ - this.licenceCategories = nativeResult.licenceCategories; - - /** - * The licence number of the Spain DL - */ - this.number = nativeResult.number; - - /** - * The place of birth of Spain DL owner - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of the Spain DL owner - */ - this.surname = nativeResult.surname; - - /** - * The date of issue of Spain DL - */ - this.validFrom = nativeResult.validFrom != null ? new Date(nativeResult.validFrom) : null; - - /** - * The date of expiry of Spain DL - */ - this.validUntil = nativeResult.validUntil != null ? new Date(nativeResult.validUntil) : null; - -} - -SpainDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SpainDlFrontRecognizerResult = SpainDlFrontRecognizerResult; - -/** - * Spain Driver's License Front Recognizer. - * - * Recognizer which can scan front side of Spain national DL cards - */ -function SpainDlFrontRecognizer() { - Recognizer.call(this, 'SpainDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Spain DL owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if first name of Spain DL owner should be extracted - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority of Spain DL should be extracted - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if licence categories of Spain DL should be extracted - * - * - */ - this.extractLicenceCategories = true; - - /** - * Defines if place of birth of Spain DL owner should be extracted - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if surname of Spain DL owner should be extracted - * - * - */ - this.extractSurname = true; - - /** - * Defines if date of issue of Spain DL should be extracted - * - * - */ - this.extractValidFrom = true; - - /** - * Defines if date of expiry of Spain DL should be extracted - * - * - */ - this.extractValidUntil = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SpainDlFrontRecognizerResult(nativeResult); } - -} - -SpainDlFrontRecognizer.prototype = new Recognizer('SpainDlFrontRecognizer'); - -BlinkID.prototype.SpainDlFrontRecognizer = SpainDlFrontRecognizer; - -/** - * Result object for SwedenDlFrontRecognizer. - */ -function SwedenDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Sweden DL owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Sweden DL. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Sweden DL. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing agency of Sweden DL. - */ - this.issuingAgency = nativeResult.issuingAgency; - - /** - * The licence categories of Sweden DL. - */ - this.licenceCategories = nativeResult.licenceCategories; - - /** - * The licence number of Sweden DL. - */ - this.licenceNumber = nativeResult.licenceNumber; - - /** - * The name of Sweden DL owner. - */ - this.name = nativeResult.name; - - /** - * The reference number of Sweden DL. - */ - this.referenceNumber = nativeResult.referenceNumber; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of Sweden DL owner. - */ - this.surname = nativeResult.surname; - -} - -SwedenDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SwedenDlFrontRecognizerResult = SwedenDlFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Sweden DL. - */ -function SwedenDlFrontRecognizer() { - Recognizer.call(this, 'SwedenDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of Sweden DL owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Sweden DL should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Sweden DL should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if issuing agency of Sweden DL should be extracted. - * - * - */ - this.extractIssuingAgency = true; - - /** - * Defines if licence categories of Sweden DL should be extracted. - * - * - */ - this.extractLicenceCategories = true; - - /** - * Defines if name of Sweden DL owner should be extracted. - * - * - */ - this.extractName = true; - - /** - * Defines if reference number of Sweden DL should be extracted. - * - * - */ - this.extractReferenceNumber = true; - - /** - * Defines if surname of Sweden DL owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SwedenDlFrontRecognizerResult(nativeResult); } - -} - -SwedenDlFrontRecognizer.prototype = new Recognizer('SwedenDlFrontRecognizer'); - -BlinkID.prototype.SwedenDlFrontRecognizer = SwedenDlFrontRecognizer; - -/** - * Result object for SwitzerlandDlFrontRecognizer. - */ -function SwitzerlandDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of the Switzerland DL owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of rxpiry of the Switzerland DL. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of the Switzerland DL. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * If true, then this Switzerland DL will never expire. - */ - this.expiryDatePermanent = nativeResult.expiryDatePermanent; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * The first name of the Switzerland DL owner. - */ - this.firstName = nativeResult.firstName; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The issuing authority of the Switzerland DL. - */ - this.issuingAuthority = nativeResult.issuingAuthority; - - /** - * The last name of the Switzerland DL owner. - */ - this.lastName = nativeResult.lastName; - - /** - * The license number of the Switzerland DL. - */ - this.licenseNumber = nativeResult.licenseNumber; - - /** - * The place of birth of the Switzerland DL owner. - */ - this.placeOfBirth = nativeResult.placeOfBirth; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The vehicle categories of the Switzerland DL. - */ - this.vehicleCategories = nativeResult.vehicleCategories; - -} - -SwitzerlandDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SwitzerlandDlFrontRecognizerResult = SwitzerlandDlFrontRecognizerResult; - -/** - * Class for configuring Switzerland DL Front Recognizer. - * - * Switzerland DL Front recognizer is used for scanning front side of the Switzerland DL. - */ -function SwitzerlandDlFrontRecognizer() { - Recognizer.call(this, 'SwitzerlandDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if owner's date of birth should be extracted from front side of the Switzerland DL - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry should be extracted from front side of the Switzerland DL - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue should be extracted from front side of the Switzerland DL - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if owner's first name should be extracted from front side of the Switzerland DL - * - * - */ - this.extractFirstName = true; - - /** - * Defines if issuing authority should be extracted from front side of the Switzerland DL - * - * - */ - this.extractIssuingAuthority = true; - - /** - * Defines if owner's last name should be extracted from front side of the Switzerland DL - * - * - */ - this.extractLastName = true; - - /** - * Defines if owner's place of birth should be extracted from front side of the Switzerland DL - * - * - */ - this.extractPlaceOfBirth = true; - - /** - * Defines if vehicle categories should be extracted from front side of the Switzerland DL - * - * - */ - this.extractVehicleCategories = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SwitzerlandDlFrontRecognizerResult(nativeResult); } - -} - -SwitzerlandDlFrontRecognizer.prototype = new Recognizer('SwitzerlandDlFrontRecognizer'); - -BlinkID.prototype.SwitzerlandDlFrontRecognizer = SwitzerlandDlFrontRecognizer; - -/** - * Result object for SwitzerlandIdBackRecognizer. - */ -function SwitzerlandIdBackRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The issuing authority of Switzerland ID. - */ - this.authority = nativeResult.authority; - - /** - * The date of expiry of Switzerland ID. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Switzerland ID. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The height of Switzerland ID owner. - */ - this.height = nativeResult.height; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The place of origin of Switzerland ID owner. - */ - this.placeOfOrigin = nativeResult.placeOfOrigin; - - /** - * The sex of Switzerland ID owner. - */ - this.sex = nativeResult.sex; - -} - -SwitzerlandIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SwitzerlandIdBackRecognizerResult = SwitzerlandIdBackRecognizerResult; - -/** - * Recognizer which can scan back side of Switzerland ID. - */ -function SwitzerlandIdBackRecognizer() { - Recognizer.call(this, 'SwitzerlandIdBackRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if issuing authority of Switzerland ID should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if date of expiry of Switzerland ID should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Switzerland ID should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if height of Switzerland ID owner should be extracted. - * - * - */ - this.extractHeight = true; - - /** - * Defines if place of origin of Switzerland ID owner should be extracted. - * - * - */ - this.extractPlaceOfOrigin = true; - - /** - * Defines if sex of Switzerland ID owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SwitzerlandIdBackRecognizerResult(nativeResult); } - -} - -SwitzerlandIdBackRecognizer.prototype = new Recognizer('SwitzerlandIdBackRecognizer'); - -BlinkID.prototype.SwitzerlandIdBackRecognizer = SwitzerlandIdBackRecognizer; - -/** - * Result object for SwitzerlandIdFrontRecognizer. - */ -function SwitzerlandIdFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date of birth of Switzerland ID owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given name of Switzerland ID owner. - */ - this.givenName = nativeResult.givenName; - - /** - * image of the signature if enabled with returnSignatureImage property. - */ - this.signatureImage = nativeResult.signatureImage; - - /** - * The surname of Switzerland ID owner. - */ - this.surname = nativeResult.surname; - -} - -SwitzerlandIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SwitzerlandIdFrontRecognizerResult = SwitzerlandIdFrontRecognizerResult; - -/** - * Recognizer which can scan front side of Switzerland ID. - */ -function SwitzerlandIdFrontRecognizer() { - Recognizer.call(this, 'SwitzerlandIdFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if given name of Switzerland ID owner should be extracted. - * - * - */ - this.extractGivenName = true; - - /** - * Defines if surname of Switzerland ID owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - /** - * Sets whether signature image from ID card should be extracted. - * - * - */ - this.returnSignatureImage = false; - - /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.signatureImageDpi = 250; - - this.createResultFromNative = function (nativeResult) { return new SwitzerlandIdFrontRecognizerResult(nativeResult); } - -} - -SwitzerlandIdFrontRecognizer.prototype = new Recognizer('SwitzerlandIdFrontRecognizer'); - -BlinkID.prototype.SwitzerlandIdFrontRecognizer = SwitzerlandIdFrontRecognizer; - -/** - * Result object for SwitzerlandPassportRecognizer. - */ -function SwitzerlandPassportRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The issuing authority of Switzerland passport. - */ - this.authority = nativeResult.authority; - - /** - * The date of birth of Switzerland passport owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The date of expiry of Switzerland passport. - */ - this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; - - /** - * The date of issue of Switzerland passport. - */ - this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; - - /** - * face image from the document if enabled with returnFaceImage property. - */ - this.faceImage = nativeResult.faceImage; - - /** - * full document image if enabled with returnFullDocumentImage property. - */ - this.fullDocumentImage = nativeResult.fullDocumentImage; - - /** - * The given name of Switzerland passport owner. - */ - this.givenName = nativeResult.givenName; - - /** - * The height of Switzerland passport owner. - */ - this.height = nativeResult.height; - - /** - * The data extracted from the machine readable zone. - */ - this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; - - /** - * The passport number of Switzerland passport. - */ - this.passportNumber = nativeResult.passportNumber; - - /** - * The place of origin of Switzerland passport owner. - */ - this.placeOfOrigin = nativeResult.placeOfOrigin; - - /** - * The sex of Switzerland passport owner. - */ - this.sex = nativeResult.sex; - - /** - * The surname of Switzerland passport owner. - */ - this.surname = nativeResult.surname; - -} - -SwitzerlandPassportRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.SwitzerlandPassportRecognizerResult = SwitzerlandPassportRecognizerResult; - -/** - * Recognizer which can scan Switzerland passport. - */ -function SwitzerlandPassportRecognizer() { - Recognizer.call(this, 'SwitzerlandPassportRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if issuing authority of Switzerland passport should be extracted. - * - * - */ - this.extractAuthority = true; - - /** - * Defines if date of birth of Switzerland passport owner should be extracted. - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if date of expiry of Switzerland passport should be extracted. - * - * - */ - this.extractDateOfExpiry = true; - - /** - * Defines if date of issue of Switzerland passport should be extracted. - * - * - */ - this.extractDateOfIssue = true; - - /** - * Defines if given name of Switzerland passport owner should be extracted. - * - * - */ - this.extractGivenName = true; - - /** - * Defines if height of Switzerland passport owner should be extracted. - * - * - */ - this.extractHeight = true; - - /** - * Defines if passport number of Switzerland passport should be extracted. - * - * - */ - this.extractPassportNumber = true; - - /** - * Defines if place of origin of Switzerland passport owner should be extracted. - * - * - */ - this.extractPlaceOfOrigin = true; - - /** - * Defines if sex of Switzerland passport owner should be extracted. - * - * - */ - this.extractSex = true; - - /** - * Defines if surname of Switzerland passport owner should be extracted. - * - * - */ - this.extractSurname = true; - - /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.faceImageDpi = 250; - - /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * - */ - this.fullDocumentImageDpi = 250; - - /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * - */ - this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); - - /** - * Sets whether face image from ID card should be extracted - * - * - */ - this.returnFaceImage = false; - - /** - * Sets whether full document image of ID card should be extracted. - * - * - */ - this.returnFullDocumentImage = false; - - this.createResultFromNative = function (nativeResult) { return new SwitzerlandPassportRecognizerResult(nativeResult); } - -} - -SwitzerlandPassportRecognizer.prototype = new Recognizer('SwitzerlandPassportRecognizer'); - -BlinkID.prototype.SwitzerlandPassportRecognizer = SwitzerlandPassportRecognizer; - -/** - * Result object for UnitedArabEmiratesDlFrontRecognizer. - */ -function UnitedArabEmiratesDlFrontRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * The date Of Birth of the front side of the United Arab Emirates Dl owner. - */ - this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; - - /** - * The expiry Date of the front side of the United Arab Emirates Dl owner. - */ - this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null; +function MrtdCombinedRecognizerResult(nativeResult) { + RecognizerResult.call(this, nativeResult.resultState); /** - * face image from the document if enabled with returnFaceImage property. + * Digital signature of the recognition result. Available only if enabled with signResult property. */ - this.faceImage = nativeResult.faceImage; + this.digitalSignature = nativeResult.digitalSignature; /** - * full document image if enabled with returnFullDocumentImage property. + * Version of the digital signature. Available only if enabled with signResult property. */ - this.fullDocumentImage = nativeResult.fullDocumentImage; + this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; /** - * The issue Date of the front side of the United Arab Emirates Dl owner. + * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, + * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side + * of the document and values do not match, this method will return DataMatchResultFailed. Result will + * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. */ - this.issueDate = nativeResult.issueDate != null ? new Date(nativeResult.issueDate) : null; + this.documentDataMatch = nativeResult.documentDataMatch; /** - * The license Number of the front side of the United Arab Emirates Dl owner. + * face image from the document if enabled with returnFaceImage property. */ - this.licenseNumber = nativeResult.licenseNumber; + this.faceImage = nativeResult.faceImage; /** - * The licensing Authority of the front side of the United Arab Emirates Dl owner. + * back side image of the document if enabled with returnFullDocumentImage property. */ - this.licensingAuthority = nativeResult.licensingAuthority; + this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * The name of the front side of the United Arab Emirates Dl owner. + * front side image of the document if enabled with returnFullDocumentImage property. */ - this.name = nativeResult.name; + this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; /** - * The nationality of the front side of the United Arab Emirates Dl owner. + * Returns the Data extracted from the machine readable zone. */ - this.nationality = nativeResult.nationality; + this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; /** - * The place Of Issue of the front side of the United Arab Emirates Dl owner. + * Returns true if recognizer has finished scanning first side and is now scanning back side, + * false if it's still scanning first side. */ - this.placeOfIssue = nativeResult.placeOfIssue; + this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; } -UnitedArabEmiratesDlFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); +MrtdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); -BlinkID.prototype.UnitedArabEmiratesDlFrontRecognizerResult = UnitedArabEmiratesDlFrontRecognizerResult; +BlinkID.prototype.MrtdCombinedRecognizerResult = MrtdCombinedRecognizerResult; /** - * Recognizer which can scan front side of UAE drivers license. + * MRTD Combined recognizer + * + * MRTD Combined recognizer is used for scanning both front and back side of generic IDs. */ -function UnitedArabEmiratesDlFrontRecognizer() { - Recognizer.call(this, 'UnitedArabEmiratesDlFrontRecognizer'); - - /** - * Defines if glare detection should be turned on/off. - * - * - */ - this.detectGlare = true; - - /** - * Defines if date of birth of UAE DL owner should be extracted - * - * - */ - this.extractDateOfBirth = true; - - /** - * Defines if issue date of UAE DL should be extracted - * - * - */ - this.extractIssueDate = true; - - /** - * Defines if license number of UAE DL should be extracted - * - * - */ - this.extractLicenseNumber = true; +function MrtdCombinedRecognizer() { + Recognizer.call(this, 'MrtdCombinedRecognizer'); /** - * Defines if licensing authority code of UAE DL should be extracted - * - * + * Whether special characters are allowed + * + * */ - this.extractLicensingAuthority = true; + this.allowSpecialCharacters = false; /** - * Defines if name of UAE DL owner should be extracted - * - * + * Whether returning of unparsed results is allowed + * + * */ - this.extractName = true; + this.allowUnparsedResults = false; /** - * Defines if nationality of UAE DL owner should be extracted - * - * + * Whether returning of unverified results is allowed + * Unverified result is result that is parsed, but check digits are incorrect. + * + * */ - this.extractNationality = true; + this.allowUnverifiedResults = false; /** - * Defines if place of issue of UAE DL should be extracted - * - * + * Type of document this recognizer will scan. + * + * */ - this.extractPlaceOfIssue = true; + this.detectorType = DocumentFaceDetectorType.TD1; /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); + /** + * Defines how many times the same document should be detected before the detector + * returns this document as a result of the deteciton + * + * Higher number means more reliable detection, but slower processing + * + * + */ + this.numStableDetectionsThreshold = 6; + /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - this.createResultFromNative = function (nativeResult) { return new UnitedArabEmiratesDlFrontRecognizerResult(nativeResult); } + /** + * Whether or not recognition result should be signed. + * + * + */ + this.signResult = false; + + this.createResultFromNative = function (nativeResult) { return new MrtdCombinedRecognizerResult(nativeResult); } } -UnitedArabEmiratesDlFrontRecognizer.prototype = new Recognizer('UnitedArabEmiratesDlFrontRecognizer'); +MrtdCombinedRecognizer.prototype = new Recognizer('MrtdCombinedRecognizer'); -BlinkID.prototype.UnitedArabEmiratesDlFrontRecognizer = UnitedArabEmiratesDlFrontRecognizer; +BlinkID.prototype.MrtdCombinedRecognizer = MrtdCombinedRecognizer; /** - * Result object for UnitedArabEmiratesIdBackRecognizer. + * Result object for MrtdRecognizer. */ -function UnitedArabEmiratesIdBackRecognizerResult(nativeResult) { +function MrtdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * full document image if enabled with returnFullDocumentImage property. + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; /** - * The mrz of the back side of United Arab Emirates ID owner. + * Returns the Data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; } -UnitedArabEmiratesIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); +MrtdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); -BlinkID.prototype.UnitedArabEmiratesIdBackRecognizerResult = UnitedArabEmiratesIdBackRecognizerResult; +BlinkID.prototype.MrtdRecognizerResult = MrtdRecognizerResult; /** - * Class for configuring United Arab Emirates ID Back Recognizer. - * - * United Arab Emirates ID Back recognizer is used for scanning back side of United Arab Emirates ID. + * Recognizer that can recognizer Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) */ -function UnitedArabEmiratesIdBackRecognizer() { - Recognizer.call(this, 'UnitedArabEmiratesIdBackRecognizer'); +function MrtdRecognizer() { + Recognizer.call(this, 'MrtdRecognizer'); + + /** + * Whether special characters are allowed + * + * + */ + this.allowSpecialCharacters = false; + + /** + * Whether returning of unparsed results is allowed + * + * + */ + this.allowUnparsedResults = false; + + /** + * Whether returning of unverified results is allowed + * Unverified result is result that is parsed, but check digits are incorrect. + * + * + */ + this.allowUnverifiedResults = false; /** * Defines if glare detection should be turned on/off. - * - * + * + * */ this.detectGlare = true; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - this.createResultFromNative = function (nativeResult) { return new UnitedArabEmiratesIdBackRecognizerResult(nativeResult); } + this.createResultFromNative = function (nativeResult) { return new MrtdRecognizerResult(nativeResult); } } -UnitedArabEmiratesIdBackRecognizer.prototype = new Recognizer('UnitedArabEmiratesIdBackRecognizer'); +MrtdRecognizer.prototype = new Recognizer('MrtdRecognizer'); -BlinkID.prototype.UnitedArabEmiratesIdBackRecognizer = UnitedArabEmiratesIdBackRecognizer; +BlinkID.prototype.MrtdRecognizer = MrtdRecognizer; /** - * Result object for UnitedArabEmiratesIdFrontRecognizer. + * Result object for PassportRecognizer. */ -function UnitedArabEmiratesIdFrontRecognizerResult(nativeResult) { +function PassportRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * face image from the document if enabled with returnFaceImage property. + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * full document image if enabled with returnFullDocumentImage property. + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; /** - * The id Number of the front side of United Arab Emirates ID owner. - */ - this.idNumber = nativeResult.idNumber; - - /** - * The name of the front side of United Arab Emirates ID owner. - */ - this.name = nativeResult.name; - - /** - * The nationality of the front side of United Arab Emirates ID owner. + * The data extracted from the machine readable zone. */ - this.nationality = nativeResult.nationality; + this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; } -UnitedArabEmiratesIdFrontRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); +PassportRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); -BlinkID.prototype.UnitedArabEmiratesIdFrontRecognizerResult = UnitedArabEmiratesIdFrontRecognizerResult; +BlinkID.prototype.PassportRecognizerResult = PassportRecognizerResult; /** - * Class for configuring United Arab Emirates ID Front Recognizer. - * - * United Arab Emirates ID Front recognizer is used for scanning front side of United Arab Emirates ID. + * Recognizer which can scan all passports with MRZ. */ -function UnitedArabEmiratesIdFrontRecognizer() { - Recognizer.call(this, 'UnitedArabEmiratesIdFrontRecognizer'); +function PassportRecognizer() { + Recognizer.call(this, 'PassportRecognizer'); /** * Defines if glare detection should be turned on/off. - * - * + * + * */ this.detectGlare = true; - /** - * Defines if owner's name should be extracted from front side of United Arab Emirates ID - * - * - */ - this.extractName = true; - - /** - * Defines if owner's nationality should be extracted from front side of United Arab Emirates ID - * - * - */ - this.extractNationality = true; - /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; - this.createResultFromNative = function (nativeResult) { return new UnitedArabEmiratesIdFrontRecognizerResult(nativeResult); } - -} - -UnitedArabEmiratesIdFrontRecognizer.prototype = new Recognizer('UnitedArabEmiratesIdFrontRecognizer'); - -BlinkID.prototype.UnitedArabEmiratesIdFrontRecognizer = UnitedArabEmiratesIdFrontRecognizer; - -/** - * Result object for VinRecognizer. - */ -function VinRecognizerResult(nativeResult) { - RecognizerResult.call(this, nativeResult.resultState); - - /** - * Returns the recognized VIN or empty string if recognition failed. - */ - this.vin = nativeResult.vin; - -} - -VinRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); - -BlinkID.prototype.VinRecognizerResult = VinRecognizerResult; - -/** - * Recognizer that can perform recognition of VINs (Vehicle Identification Number). - */ -function VinRecognizer() { - Recognizer.call(this, 'VinRecognizer'); - - this.createResultFromNative = function (nativeResult) { return new VinRecognizerResult(nativeResult); } + this.createResultFromNative = function (nativeResult) { return new PassportRecognizerResult(nativeResult); } } -VinRecognizer.prototype = new Recognizer('VinRecognizer'); +PassportRecognizer.prototype = new Recognizer('PassportRecognizer'); -BlinkID.prototype.VinRecognizer = VinRecognizer; +BlinkID.prototype.PassportRecognizer = PassportRecognizer; /** * Result object for VisaRecognizer. @@ -15270,12 +1326,12 @@ function VisaRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * face image from the document if enabled with returnFaceImage property. + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * full document image if enabled with returnFullDocumentImage property. + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -15298,46 +1354,46 @@ function VisaRecognizer() { /** * Defines if glare detection should be turned on/off. - * - * + * + * */ this.detectGlare = true; /** * Property for setting DPI for face images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.faceImageDpi = 250; /** * Property for setting DPI for full document images * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * + * */ this.fullDocumentImageDpi = 250; /** * Image extension factors for full document image. - * + * * @see ImageExtensionFactors - * + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Sets whether face image from ID card should be extracted - * - * + * + * */ this.returnFaceImage = false; /** * Sets whether full document image of ID card should be extracted. - * - * + * + * */ this.returnFullDocumentImage = false; @@ -16339,7 +2395,7 @@ function UsdlCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Digital signature of the recognition result. Available only if enabled with signResult property. + * Digital signature of the recognition result. Available only if enabled with signResult property. */ this.digitalSignature = nativeResult.digitalSignature; @@ -16348,21 +2404,18 @@ function UsdlCombinedRecognizerResult(nativeResult) { */ this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; - /** - * Returns true if data from scanned parts/sides of the document match, - * false otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return false. Result will - * be true only if scanned values for all fields that are compared are the same. + /** + * Returns the result of the data matching algorithm for scanned parts/sides of the document. */ this.documentDataMatch = nativeResult.documentDataMatch; /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * full document image if enabled with returnFullDocumentImage property. + * Full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; diff --git a/README.md b/README.md index 99d1965..578458f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains example wrapper for BlinkID native SDKs ([iOS](https://github.com/BlinkID/blinkid-ios) and [Android](https://github.com/BlinkID/blinkid-android)). Not all features of native SDKs are available in PhoneGap wrapper. However, the wrapper is open source, so you can easily add features that you need. For 100% of features and maximum control, consider using native SDKs. ## Cordova version -BlinkID PhoneGap requires Cordova **v7.0.0 or later** and cordova-android plugin **v7.0.0 or later**. +BlinkID PhoneGap requires Cordova **v7.0.0 or later** and cordova-android plugin **v8.0.0 or later**. ## Ionic version @@ -25,6 +25,7 @@ In the repository you will find scripts to create sample applications. Downloading a repository just downloads the files from the most recent commit of the default branch but without all the dependencies which are in submodules. We recommend that you clone directory. With a clone option you will get a copy of the history and it’s functional git repository. To clone repository: + + **Copy URL from the `Clone or download` button: https://github.com/BlinkID/blinkid-phonegap.git** + **Open terminal on Mac/Linux or [GitBash](https://git-for-windows.github.io/) on Windows.** + **cd into directory where you want the cloned directory to be made.** diff --git a/Release notes.md b/Release notes.md index 6737f97..930f7e6 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,6 @@ +## 5.0.0 +- Updated to [Android SDK v5.0.0](https://github.com/BlinkID/blinkid-android/releases/tag/v5.0.0) and [iOS SDK v5.0.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v5.0.0) + ## 4.11.1 - Updated to [Android SDK v4.11.1](https://github.com/BlinkID/blinkid-android/releases/tag/v4.11.1) diff --git a/www/js/index.js b/www/js/index.js index 79286e4..d8c1e42 100644 --- a/www/js/index.js +++ b/www/js/index.js @@ -51,39 +51,30 @@ var app = { documentImageDiv.style.visibility = "hidden" faceImageDiv.style.visibility = "hidden" - // to scan EU driver's licences, use EudlRecognizer - var eudlRecognizer = new cordova.plugins.BlinkID.EudlRecognizer(); - eudlRecognizer.returnFaceImage = true; - eudlRecognizer.returnFullDocumentImage = true; - - // if you also want to obtain camera frame on which specific recognizer has - // finished its recognition, wrap it with SuccessFrameGrabberRecognizer and use - // the wrapper instead of original for building RecognizerCollection - var eudlSuccessFrameGrabber = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(eudlRecognizer); - - // to scan US driver's licenses, use UsdlRecognizer - var usdlRecognizer = new cordova.plugins.BlinkID.UsdlRecognizer(); - - var usdlSuccessFrameGrabber = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(usdlRecognizer); - // to scan any machine readable travel document (passports, visa's and IDs with // machine readable zone), use MrtdRecognizer - var mrtdRecognizer = new cordova.plugins.BlinkID.MrtdRecognizer(); - mrtdRecognizer.returnFullDocumentImage = true; +// var mrtdRecognizer = new cordova.plugins.BlinkID.MrtdRecognizer(); +// mrtdRecognizer.returnFullDocumentImage = true; + // wrap recognizer with SuccessFrameGrabberRecognizer to obtain camera frame from the successful scan +// var mrtdSuccessFrameGrabber = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(mrtdRecognizer); - var mrtdSuccessFrameGrabber = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(mrtdRecognizer); + // BlinkIDRecognizer automatically classifies different document types and scans the data from + // the supported document + var blinkIdRecognizer = new cordova.plugins.BlinkID.BlinkIdRecognizer(); + blinkIdRecognizer.returnFullDocumentImage = true; + blinkIdRecognizer.returnFaceImage = true; // there are lots of Recognizer objects in BlinkID - check blinkIdScanner.js for full reference - var documentOverlaySettings = new cordova.plugins.BlinkID.DocumentOverlaySettings(); + var blinkidOverlaySettings = new cordova.plugins.BlinkID.BlinkIdOverlaySettings(); // create RecognizerCollection from any number of recognizers that should perform recognition - var recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([eudlSuccessFrameGrabber, usdlSuccessFrameGrabber, mrtdSuccessFrameGrabber]); + var recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([blinkIdRecognizer /*, mrtdSuccessFrameGrabber */]); // package name/bundleID com.microblink.blinkid var licenseKeys = { - android: 'sRwAAAAWY29tLm1pY3JvYmxpbmsuYmxpbmtpZJ9ew00uWSf86/ux5PdQApJLUPzlGZQQniC8pjz/86XhMJztb5SZMedvP2uWZiyPE3zStafCO++dkPZAyb511hRVtSC3FJ5bGH/CQaXQLXpkMElVJRqO54iThgexIWWow3SVUWRySCSj8My/IpnXgmRUg9XrNUzy2475z8XR6omoX+pe0jfdmqeuV/2u5/WnjfOgx+W6Z83e80BfcX1k/1DixHlKAstcJl+D6vH4cRde+WAcTADiR0StcG0sN8EM3EO8', - ios: 'sRwAAAEWY29tLm1pY3JvYmxpbmsuYmxpbmtpZFG2rW9X4lA0y++ptboR69ypRSJvTVDmZZWdCfGEKT2PSYI2e6goCTXvROwYexCNWL3Ew5HzJwdKs0ugrPpKvGqOG4iiF+yrTCplrislVppjfV6v1NFN3y3b053kMcZwZFnL2dVTg5cfF2nkep2LoCsBF+eSG1u6c0uWITOTv96UzBZljFNLsokRGLtMQoN0V4WsrXCIzzhDgt0xbBHQWSW1QDFKAT9CiJ9qbljtk5UwjqLvDUMW372IPybPYco7D2zR' + android: 'sRwAAAAWY29tLm1pY3JvYmxpbmsuYmxpbmtpZJ9ew00uWSf86/uxZPHEBpL6LHXqPogMlETCNKjFP9T0z4TWTOJHROqlTx/kfMKYmpqvZN7v3J6f3+/kQflgDR0tvDECMzG1iXlfUJWnQXpABOO6F8sLzJmbJO7TjJv1DAjuv+2D1uez1LjErzyqCy7jFrtjpza9uUCLMrFopL9KuQ1/N+jxW/byQl6BtUeaj1IYBZzAhrUDBofLSlv6WC9GUrCqmO+TdgQvjUiSfx/60kU7bmBZX/T6A2hAfGvRWpfKo12NYs3a', + ios: 'sRwAAAEWY29tLm1pY3JvYmxpbmsuYmxpbmtpZFG2rW9X4lA0y++pNbzF7dz9sUsKWf1O171v7p1KOz04YJKGXS2t3YVBp5x38oTYfdsfXwga2Ki4o9RYh+wdvBZ9bAE08ZydNo4qTKZjU/oLXyLApN6fUTtpRfiLZylZNy/lUIq54jhl630DoQxMvx4FahFrhvpXvr97k+s+W1S/+recESxqIr4wn096VTnymYygiS3QUzv8NZRmSYzfk6QBQ1Lz61UjTBgGHI45atU1HU9FMzjullnPrW3pU6lQYDlx3h7Jcn59' }; scanButton.addEventListener('click', function() { @@ -91,6 +82,8 @@ var app = { // Register the callback handler function callback(cancelled) { + + resultDiv.innerHTML = ""; // handle cancelled scanning if (cancelled) { @@ -104,113 +97,50 @@ var app = { documentImageDiv.style.visibility = "hidden" faceImageDiv.style.visibility = "hidden" - if (eudlRecognizer.result.resultState == cordova.plugins.BlinkID.RecognizerResultState.valid) { - // Document image is returned as Base64 encoded JPEG - var resultDocumentImage = eudlRecognizer.result.fullDocumentImage; + if (blinkIdRecognizer.result.resultState == cordova.plugins.BlinkID.RecognizerResultState.valid) { + var resultDocumentImage = blinkIdRecognizer.result.fullDocumentImage; if (resultDocumentImage) { documentImage.src = "data:image/jpg;base64, " + resultDocumentImage; documentImageDiv.style.visibility = "visible"; - } else { - documentImageDiv.style.visibility = "hidden"; } - - // Face image is returned as Base64 encoded JPEG - var resultFaceImage = eudlRecognizer.result.faceImage; + var resultFaceImage = blinkIdRecognizer.result.faceImage; if (resultFaceImage) { faceImage.src = "data:image/jpg;base64, " + resultFaceImage; faceImageDiv.style.visibility = "visible"; - } else { - faceImageDiv.style.visibility = "hidden"; - } - - // success frame is available in eudlRecognizer's successFrameGrabber wrapper's result as Base64 encoded JPEG - var successFrame = eudlSuccessFrameGrabber.result.successFrame; - if (successFrame) { - successfulImage.src = "data:image/jpg;base64, " + successFrame; - successfulImageDiv.style.visibility = "visible"; - } else { - successfulImageDiv.style.visibility = "hidden"; } - // fill data - resultDiv.innerHTML = /** Personal information */ - "First name: " + eudlRecognizer.result.firstName + "
" + - "Last name: " + eudlRecognizer.result.lastName + "
" + - "Address: " + eudlRecognizer.result.address + "
" + - "Personal number: " + eudlRecognizer.result.personalNumber + "
" + - "Driver number: " + eudlRecognizer.result.driverNumber + "
"; - } else if (mrtdRecognizer.result.resultState == cordova.plugins.BlinkID.RecognizerResultState.valid) { - // Document image is returned as Base64 encoded JPEG - var resultDocumentImage = mrtdRecognizer.result.fullDocumentImage; - if (resultDocumentImage) { - documentImage.src = "data:image/jpg;base64, " + resultDocumentImage; - documentImageDiv.style.visibility = "visible"; - } else { - documentImageDiv.style.visibility = "hidden"; + var fieldDelim = "
"; + var blinkIdResult = blinkIdRecognizer.result; + + var resultString = + "First name: " + blinkIdResult.firstName + fieldDelim + + "Last name: " + blinkIdResult.lastName + fieldDelim + + "Address: " + blinkIdResult.address + fieldDelim + + "Document number: " + blinkIdResult.documentNumber + fieldDelim + + "Sex: " + blinkIdResult.sex + fieldDelim; + if (blinkIdResult.dateOfBirth) { + resultString += + "Date of birth: " + + blinkIdResult.dateOfBirth.day + "." + + blinkIdResult.dateOfBirth.month + "." + + blinkIdResult.dateOfBirth.year + "." + fieldDelim; } - - // MrtdRecognizer does not support face image extraction - faceImageDiv.style.visibility = "hidden"; - - // success frame is available in mrtdRecognizer's successFrameGrabber wrapper's result as Base64 encoded JPEG - var successFrame = mrtdSuccessFrameGrabber.result.successFrame; - if (successFrame) { - successfulImage.src = "data:image/jpg;base64, " + successFrame; - successfulImageDiv.style.visibility = "visible"; - } else { - successfulImageDiv.style.visibility = "hidden"; + if (blinkIdResult.dateOfIssue) { + resultString += + "Date of issue: " + + blinkIdResult.dateOfIssue.day + "." + + blinkIdResult.dateOfIssue.month + "." + + blinkIdResult.dateOfIssue.year + "." + fieldDelim; } - - // fill data - resultDiv.innerHTML = /** Personal information */ - "First name: " + mrtdRecognizer.result.mrzResult.secondaryId + "
" + - "Last name: " + mrtdRecognizer.result.mrzResult.primaryId + "
" + - "Nationality: " + mrtdRecognizer.result.mrzResult.nationality + "
" + - "Gender: " + mrtdRecognizer.result.mrzResult.gender + "
" + - "Date of birth: " + - mrtdRecognizer.result.mrzResult.dateOfBirth.day + "." + - mrtdRecognizer.result.mrzResult.dateOfBirth.month + "." + - mrtdRecognizer.result.mrzResult.dateOfBirth.year + ".
"; - } else if (usdlRecognizer.result.resultState == cordova.plugins.BlinkID.RecognizerResultState.valid) { - // UsdlRecognizer does not support face image extraction - faceImageDiv.style.visibility = "hidden"; - // UsdlRecognizer does not support full document image extraction - faceImageDiv.style.visibility = "hidden"; - - // success frame is available in usdlRecognizer's successFrameGrabber wrapper's result as Base64 encoded JPEG - var successFrame = usdlSuccessFrameGrabber.result.successFrame; - if (successFrame) { - successfulImage.src = "data:image/jpg;base64, " + successFrame; - successfulImageDiv.style.visibility = "visible"; - } else { - successfulImageDiv.style.visibility = "hidden"; + if (blinkIdResult.dateOfExpiry) { + resultString += + "Date of expiry: " + + blinkIdResult.dateOfExpiry.day + "." + + blinkIdResult.dateOfExpiry.month + "." + + blinkIdResult.dateOfExpiry.year + "." + fieldDelim; } - - var fieldDelim = "
"; - var usdlResult = usdlRecognizer.result; - - resultDiv.innerHTML = /** Personal information */ - "First name: " + usdlResult.firstName + fieldDelim + - "Last name: " + usdlResult.lastName + fieldDelim + - "Full name: " + usdlResult.fullName + fieldDelim + - "Address: " + usdlResult.address + fieldDelim + - "Document number: " + usdlResult.documentNumber + fieldDelim + - "Sex: " + usdlResult.sex + fieldDelim + - "Restrictions: " + usdlResult.restrictions + fieldDelim + - "Endorsments: " + usdlResult.endorsements + fieldDelim + - "Vehicle class: " + usdlResult.vehicleClass + fieldDelim + - "Date of birth: " + - usdlResult.dateOfBirth.day + "." + - usdlResult.dateOfBirth.month + "." + - usdlResult.dateOfBirth.year + "." + fieldDelim + - "Date of issue: " + - usdlResult.dateOfIssue.day + "." + - usdlResult.dateOfIssue.month + "." + - usdlResult.dateOfIssue.year + "." + fieldDelim + - "Date of expiry: " + - usdlResult.dateOfExpiry.day + "." + - usdlResult.dateOfExpiry.month + "." + - usdlResult.dateOfExpiry.year + "." + fieldDelim; + // there are other fields to extract - check blinkIdScanner.js for full reference + resultDiv.innerHTML = resultString; } else { resultDiv.innerHTML = "Result is empty!"; } @@ -221,7 +151,7 @@ var app = { alert('Error: ' + err); }, - documentOverlaySettings, recognizerCollection, licenseKeys + blinkidOverlaySettings, recognizerCollection, licenseKeys ); });