From d77bea8ddcca7b18d4b4ba86f7b44efa463d62c4 Mon Sep 17 00:00:00 2001 From: DMGithubPublisher Date: Tue, 3 Dec 2024 16:50:43 +0800 Subject: [PATCH] update to internal commit 116e9e9a --- .../parsed-result-item-v2.4.2000.md | 133 +++++++++++++ .../api-reference/parsed-result-item.md | 17 ++ .../parsed-result-item-v2.4.2000.md | 187 ++++++++++++++++++ .../ios/api-reference/parsed-result-item.md | 26 +++ 4 files changed, 363 insertions(+) create mode 100644 programming/android/api-reference/parsed-result-item-v2.4.2000.md create mode 100644 programming/ios/api-reference/parsed-result-item-v2.4.2000.md diff --git a/programming/android/api-reference/parsed-result-item-v2.4.2000.md b/programming/android/api-reference/parsed-result-item-v2.4.2000.md new file mode 100644 index 0000000..9175147 --- /dev/null +++ b/programming/android/api-reference/parsed-result-item-v2.4.2000.md @@ -0,0 +1,133 @@ +--- +layout: default-layout +title: ParsedResultItem Class - Dynamsoft Code Parser SDK Android Edition API Reference +description: This page shows ParsedResultItem Class of Dynamsoft Code Parser SDK Android Edition. +keywords: ParsedResultItem, api reference, Android +needAutoGenerateSidebar: true +--- + +# ParsedResultItem Class + +`ParsedResultItem` is the basic unit of a parsed result. It stores the field name, value and additional information. + +## Definition + +*Namespace:* com.dynamsoft.dcp + +*Assembly:* DynamsoftCodeParser.aar + +```java +class ParsedResultItem extends CapturedResultItem +``` + + | Method | Description | + |----------------------|-------------| + | [`getCodeType`](#getcodetype) | Gets the code type of the parsed result. | + | [`getFieldMappingStatus`](#getfieldmappingstatus) | Gets the mapping status of a specified field from the parsed result. | + | [`getFieldValidationStatus`](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. | + | [`getFieldValue`](#getfieldvalue) | Gets the value of a specified field from the parsed result. | + | [`getJsonString`](#getjsonstring) | Gets the parsed result as a JSON formatted string. | + +## getCodeType + +Gets the code type of the parsed result. + +```java +String getCodeType(); +``` + +**Return Value** + +Returns a string value representing the code type. It can be one of the following: + +- "AADHAAR" +- "AAMVA_DL_ID" +- "AAMVA_DL_ID_WITH_MAG_STRIPE" +- "MRTD_TD1_ID" +- "MRTD_TD2_ID" +- "MRTD_TD2_VISA" +- "MRTD_TD3_PASSPORT" +- "MRTD_TD3_VISA" +- "MRTD_TD2_FRENCH_ID" +- "SOUTH_AFRICA_DL" +- "VIN" + +## getJsonString + +Gets the parsed result as a JSON formatted string. + +```java +String getJsonString(); +``` + +**Return Value** + +Returns a JSON formatted string representing the parsed result. + +## getFieldValue + +Gets the value of a specified field from the parsed result. + +```java +String getFieldValue(String fieldName); +``` + +**Parameters** + +`[in] fieldName`: The name of the field. + +**Return Value** + +Returns a string representing the specified field value. + +## getFieldMappingStatus + +Gets the mapping status of a specified field from the parsed result. Certain fields in the parsed result, such as the residing province or state, are abbreviated (e.g. BC standing for British Columbia). The library takes such fields and maps them to their full form. If the mapping is successful, the `MappingStatus` will be `MS_SUCCEEDED`. To learn of the other options of `MappingStatus`, please refer to the link below. + +```java +EnumMappingStatus getFieldMappingStatus(String fieldName); +``` + +**Parameters** + +`[in] fieldName`: The name of the field. + +**Return Value** + +Returns a [MappingStatus]({{ site.dcv_enumerations }}code-parser/mapping-status.html?lang=android) enumeration value representing the mapping status of a specified field. + +**See Also** + +[MappingStatus]({{ site.dcv_enumerations }}code-parser/mapping-status.html?lang=android) + +## getFieldValidationStatus + +Gets the validation status of a specified field from the parsed result. Certain fields can be validated with one of four possible validation methods: certification, checksum, length, and regex. Whether a field is validated or not, as well as the validation method, is determined by the code specification e.g. AAMVA specification. + +```java +EnumValidationStatus getFieldValidationStatus(String fieldName); +``` + +**Parameters** + +`[in] fieldName`: The name of the field. + +**Return Value** + +Returns a [ValidationStatus]({{ site.dcv_enumerations }}code-parser/validation-status.html?lang=android) enumeration value saying whether the validation of a specified field was successful, failed, or if it did not require validation. + +**See Also** + +[ValidationStatus]({{ site.dcv_enumerations }}code-parser/validation-status.html?lang=android) + +## getParsedFields + +Get the field names and values of the parsed fields as a `HashMap`. The field names are stored as the key of the HashMap while the field values are stored as the value. + +```java +HashMap getParsedFields(); +``` + +**Return Value** + +A HashMap that contains the names and values of the parsed fields. diff --git a/programming/android/api-reference/parsed-result-item.md b/programming/android/api-reference/parsed-result-item.md index 3048644..48534a8 100644 --- a/programming/android/api-reference/parsed-result-item.md +++ b/programming/android/api-reference/parsed-result-item.md @@ -25,6 +25,7 @@ class ParsedResultItem extends CapturedResultItem | [`getCodeType`](#getcodetype) | Gets the code type of the parsed result. | | [`getFieldMappingStatus`](#getfieldmappingstatus) | Gets the mapping status of a specified field from the parsed result. | | [`getFieldValidationStatus`](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. | + | [`getFieldRawValue`](#getfieldrawvalue) | Gets the raw value of the specified field. | | [`getFieldValue`](#getfieldvalue) | Gets the value of a specified field from the parsed result. | | [`getJsonString`](#getjsonstring) | Gets the parsed result as a JSON formatted string. | @@ -64,6 +65,22 @@ String getJsonString(); Returns a JSON formatted string representing the parsed result. +## getFieldRawValue + +Gets the raw value of the specified field. + +```java +String getFieldRawValue(String fieldName); +``` + +**Parameters** + +`[in] fieldName`: The name of the field. + +**Return Value** + +Returns a string representing the specified field raw value. + ## getFieldValue Gets the value of a specified field from the parsed result. diff --git a/programming/ios/api-reference/parsed-result-item-v2.4.2000.md b/programming/ios/api-reference/parsed-result-item-v2.4.2000.md new file mode 100644 index 0000000..eacda15 --- /dev/null +++ b/programming/ios/api-reference/parsed-result-item-v2.4.2000.md @@ -0,0 +1,187 @@ +--- +layout: default-layout +title: DSParsedResultItem Class - Dynamsoft Code Parser SDK iOS Edition API Reference +description: This page shows DSParsedResultItem Class of Dynamsoft Code Parser SDK iOS Edition. +keywords: DSParsedResultItem, api reference, iOS +needAutoGenerateSidebar: true +--- + + +# DSParsedResultItem Class + +`ParsedResultItem` it the basic unit of a parsed result. It stores the field name, value and additional information. + +## Definition + +*Assembly:* DynamsoftCodeParser.xcframework + +
+>- Objective-C +>- Swift +> +>1. +```objc +@interface DSParsedResultItem: DSCapturedResultItem +``` +2. +```swift +class ParsedResultItem : CapturedResultItem +``` + +## Method Summary + +| Method | Description | +| ------ | ----------- | +| [`getFieldMappingStatus`](#getfieldmappingstatus) | Gets the mapping status of a specified field from the parsed result. | +| [`getFieldValidationStatus`](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. | +| [`getFieldValue`](#getfieldvalue) | Gets the value of a specified field from the parsed result. | + +## Property Summary + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`codeType`](#codetype) | *NSString* | Gets the code type of the parsed result. | +| [`jsonString`](#jsonstring) | *NSString* | Gets the parsed result as a JSON formatted string. | +| [`parsedFields`](#parsedfields) | *NSDictionary* | A `NSDictionary` object stores the field names and values of the parsed fields. | + +## Method Detail + +### getFieldMappingStatus + +Gets the mapping status of a specified field from the parsed result. Certain fields in the parsed result, such as the residing province or state, are abbreviated (e.g. BC standing for British Columbia). The library takes such fields and maps them to their full form. If the mapping is successful, the `MappingStatus` will be `DSMappingStatusSucceeded`. To learn of the other options of `MappingStatus`, please refer to the link below. + +
+>- Objective-C +>- Swift +> +>1. +```objc +- (DSMappingStatus *)getFieldMappingStatus(NSString *)fieldName; +``` +2. +```swift +func getFieldMappingStatus(_ fieldName:String) -> MappingStatus +``` + +**Parameters** + +`fieldName`: The name of the field. + +**Return Value** + +Returns a [MappingStatus]({{ site.dcv_enumerations }}code-parser/mapping-status.html?lang=objc,swift) enumeration value representing the mapping status of a specified field. + +### getFieldValidationStatus + +Gets the validation status of a specified field from the parsed result. Certain fields can be validated with one of four possible validation methods: certification, checksum, length, and regex. Whether a field is validated or not, as well as the validation method, is determined by the code specification e.g. AAMVA specification. + +
+>- Objective-C +>- Swift +> +>1. +```objc +- (DSValidationStatus *)getFieldValidationStatus(NSString *)fieldName; +``` +2. +```swift +func getFieldValidationStatus(_ fieldName:String) -> ValidationStatus +``` + +**Parameters** + +`fieldName`: The name of the field. + +**Return Value** + +Returns a [ValidationStatus]({{ site.dcv_enumerations }}code-parser/validation-status.html?lang=objc,swift) enumeration value saying whether the validation of a specified field was successful, failed, or if it did not require validation.. + +### getFieldValue + +Gets the value of a specified field from the parsed result. + +
+>- Objective-C +>- Swift +> +>1. +```objc +- (NSString *)getFieldValue(NSString *)fieldName; +``` +2. +```swift +func getFieldValue(_ fieldName:String) -> String +``` + +**Parameters** + +`fieldName`: The name of the field. + +**Return Value** + +Returns a string representing the specified field value. + +## Property Detail + +### codeType + +Returns the code type of the parsed result. It can be one of the following: + +- "AADHAAR" +- "AAMVA_DL_ID" +- "AAMVA_DL_ID_WITH_MAG_STRIPE" +- "MRTD_TD1_ID" +- "MRTD_TD2_ID" +- "MRTD_TD2_VISA" +- "MRTD_TD3_PASSPORT" +- "MRTD_TD3_VISA" +- "MRTD_TD2_FRENCH_ID" +- "SOUTH_AFRICA_DL" +- "VIN" + +
+>- Objective-C +>- Swift +> +>1. +```objc +@property (nonatomic, readonly) NSString * codeType; +``` +2. +```swift +var codeType: String? { get } +``` + +### jsonString + +The parsed result as a JSON formatted string. + +
+>- Objective-C +>- Swift +> +>1. +```objc +@property (nonatomic, readonly) NSString * jsonString; +``` +2. +```swift +var jsonString: String? { get } +``` + +### parsedFields + +A `NSDictionary` object stores the field names and values of the parsed fields. The field names are stored as the key of the HashMap while the field values are stored as the value. + +
+>- Objective-C +>- Swift +> +>1. +```objc +@property (nonatomic, readonly) NSDictionary * parsedFields; +``` +2. +```swift +var parsedFields: NSDictionary { get } +``` diff --git a/programming/ios/api-reference/parsed-result-item.md b/programming/ios/api-reference/parsed-result-item.md index 94535dc..cd99bfe 100644 --- a/programming/ios/api-reference/parsed-result-item.md +++ b/programming/ios/api-reference/parsed-result-item.md @@ -34,6 +34,7 @@ class ParsedResultItem : CapturedResultItem | ------ | ----------- | | [`getFieldMappingStatus`](#getfieldmappingstatus) | Gets the mapping status of a specified field from the parsed result. | | [`getFieldValidationStatus`](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. | +| [`getFieldRawValue`](#getfieldrawvalue) | Gets the raw value of the specified field. | | [`getFieldValue`](#getfieldvalue) | Gets the value of a specified field from the parsed result. | ## Property Summary @@ -96,6 +97,31 @@ func getFieldValidationStatus(_ fieldName:String) -> ValidationStatus Returns a [ValidationStatus]({{ site.dcv_enumerations }}code-parser/validation-status.html?lang=objc,swift) enumeration value saying whether the validation of a specified field was successful, failed, or if it did not require validation.. +### getFieldRawValue + +Gets the raw value of the specified field. + +
+>- Objective-C +>- Swift +> +>1. +```objc +- (NSString *)getFieldRawValue(NSString *)fieldName; +``` +2. +```swift +func getFieldRawValue(_ fieldName:String) -> String +``` + +**Parameters** + +`fieldName`: The name of the field. + +**Return Value** + +Returns a string representing the specified field raw value. + ### getFieldValue Gets the value of a specified field from the parsed result.