Skip to content

Commit bdfb1a3

Browse files
Merge pull request #32 from dynamsoft-docs/preview
update to internal commit 818f3d12
2 parents 30671c9 + 7afd590 commit bdfb1a3

File tree

7 files changed

+504
-0
lines changed

7 files changed

+504
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default-layout
3+
title: CodeParserModule Class - Dynamsoft Code Parser Module Java Edition API Reference
4+
description: Definition of the CodeParserModule class in Dynamsoft Code Parser Module Java Edition.
5+
keywords: CodeParserModule, api reference, java
6+
needAutoGenerateSidebar: true
7+
---
8+
9+
# CodeParserModule Class
10+
11+
The `CodeParserModule` class defines general functions in the code parser module.
12+
13+
## Definition
14+
15+
*Package:* com.dynamsoft.dcp
16+
17+
```java
18+
public final class CodeParserModule
19+
```
20+
21+
## Methods
22+
23+
| Method | Description |
24+
|----------------------|-------------|
25+
| [`getVersion`](#getversion) | Returns the version of the code parser module.|
26+
27+
28+
### getVersion
29+
30+
Returns the version of the code parser module.
31+
32+
```java
33+
public static String getVersion()
34+
```
35+
36+
**Return Value**
37+
38+
Returns a string representing the version of the code parser module.
39+
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
layout: default-layout
3+
title: CodeParser Class - Dynamsoft Code Parser Module Java Edition API Reference
4+
description: Definition of the CodeParser class in Dynamsoft Code Parser Module Java Edition.
5+
keywords: CodeParser, api reference, java
6+
needAutoGenerateSidebar: true
7+
---
8+
9+
# CodeParser Class
10+
11+
The `CodeParser` class provides functionality for parsing codes from byte data.
12+
13+
## Definition
14+
15+
*Package:* com.dynamsoft.dcp
16+
17+
```java
18+
public class CodeParser
19+
```
20+
21+
## Constructors
22+
23+
| Constructor | Description |
24+
|---------------------------|-------------|
25+
| [`CodeParser`](#codeparser) | Constructor to create a new CodeParser instance.|
26+
27+
## Methods
28+
29+
| Method | Description |
30+
|----------------------|-------------|
31+
| [`Parse`](#parse) | Parses code from byte data. |
32+
| [`InitSettings`](#initsettings) | Initializes the code parser with JSON settings. |
33+
| [`InitSettingsFromFile`](#initsettingsfromfile) | Initializes the code parser with settings from a file. |
34+
| [`ResetSettings`](#resetsettings) | Resets the code parser settings to default. |
35+
36+
### CodeParser
37+
38+
Constructor to create a new CodeParser instance.
39+
40+
```java
41+
public CodeParser()
42+
```
43+
44+
### Parse
45+
46+
Parses code from byte data.
47+
48+
```java
49+
public ParsedResultItem Parse(byte[] data) throws CodeParserException
50+
```
51+
52+
**Parameters**
53+
54+
`data` The byte array containing the data to parse.
55+
56+
**Return Value**
57+
58+
Returns a `ParsedResultItem` object containing the parsed result.
59+
60+
**Exceptions**
61+
62+
`CodeParserException` Thrown when an error occurs during parsing.
63+
64+
**See Also**
65+
66+
[ParsedResultItem]({{ site.dcp_java_api }}parsed-result-item.html)
67+
[CodeParserException]({{ site.dcp_java_api }}code-parser-exception.html)
68+
69+
---
70+
71+
```java
72+
public ParsedResultItem Parse(byte[] data, String taskSettingName) throws CodeParserException
73+
```
74+
75+
**Parameters**
76+
77+
`data` The byte array containing the data to parse.
78+
`taskSettingName` The name of the task setting to use for parsing.
79+
80+
**Return Value**
81+
82+
Returns a `ParsedResultItem` object containing the parsed result.
83+
84+
**Exceptions**
85+
86+
`CodeParserException` Thrown when an error occurs during parsing.
87+
88+
**See Also**
89+
90+
[ParsedResultItem]({{ site.dcp_java_api }}parsed-result-item.html)
91+
[CodeParserException]({{ site.dcp_java_api }}code-parser-exception.html)
92+
93+
### InitSettings
94+
95+
Initializes the code parser with JSON settings.
96+
97+
```java
98+
public void InitSettings(String content) throws CodeParserException
99+
```
100+
101+
**Parameters**
102+
103+
`content` A JSON string containing the settings.
104+
105+
**Exceptions**
106+
107+
`CodeParserException` Thrown when an error occurs during initialization.
108+
109+
**See Also**
110+
111+
[CodeParserException]({{ site.dcp_java_api }}code-parser-exception.html)
112+
113+
### InitSettingsFromFile
114+
115+
Initializes the code parser with settings from a file.
116+
117+
```java
118+
public void InitSettingsFromFile(String filePath) throws CodeParserException
119+
```
120+
121+
**Parameters**
122+
123+
`filePath` The path to the file containing the settings.
124+
125+
**Exceptions**
126+
127+
`CodeParserException` Thrown when an error occurs during initialization.
128+
129+
**See Also**
130+
131+
[CodeParserException]({{ site.dcp_java_api }}code-parser-exception.html)
132+
133+
### ResetSettings
134+
135+
Resets the code parser settings to default.
136+
137+
```java
138+
public void ResetSettings() throws CodeParserException
139+
```
140+
141+
**Exceptions**
142+
143+
`CodeParserException` Thrown when an error occurs during reset.
144+
145+
**See Also**
146+
147+
[CodeParserException]({{ site.dcp_java_api }}code-parser-exception.html)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default-layout
3+
title: CodeType - Dynamsoft Code Parser Java Enumerations
4+
description: The enumeration CodeType of Dynamsoft Code Parser represents all supported code type strings.
5+
keywords: code type, java
6+
---
7+
8+
# CodeType
9+
10+
The `CodeType` class enumerates all supported code type strings.
11+
12+
```java
13+
public @interface EnumCodeType {
14+
//The code type string is "MRTD_TD1_ID"
15+
String CT_MRTD_TD1_ID = "MRTD_TD1_ID";
16+
//The code type string is "MRTD_TD2_ID"
17+
String CT_MRTD_TD2_ID = "MRTD_TD2_ID";
18+
//The code type string is "MRTD_TD2_VISA"
19+
String CT_MRTD_TD2_VISA = "MRTD_TD2_VISA";
20+
//The code type string is "MRTD_TD3_PASSPORT"
21+
String CT_MRTD_TD3_PASSPORT = "MRTD_TD3_PASSPORT";
22+
//The code type string is "MRTD_TD3_VISA"
23+
String CT_MRTD_TD3_VISA = "MRTD_TD3_VISA";
24+
//The code type string is "MRTD_TD2_FRENCH_ID"
25+
String CT_MRTD_TD2_FRENCH_ID = "MRTD_TD2_FRENCH_ID";
26+
//The code type string is "AAMVA_DL_ID"
27+
String CT_AAMVA_DL_ID = "AAMVA_DL_ID";
28+
//The code type string is "AAMVA_DL_ID_WITH_MAG_STRIPE"
29+
String CT_AAMVA_DL_ID_WITH_MAG_STRIPE = "AAMVA_DL_ID_WITH_MAG_STRIPE";
30+
//The code type string is "SOUTH_AFRICA_DL"
31+
String CT_SOUTH_AFRICA_DL = "SOUTH_AFRICA_DL";
32+
//The code type string is "AADHAAR"
33+
String CT_AADHAAR = "AADHAAR";
34+
//The code type string is "VIN"
35+
String CT_VIN = "VIN";
36+
//The code type string is "GS1_AI"
37+
String CT_GS1_AI = "GS1_AI";
38+
}
39+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: default-layout
3+
title: MappingStatus - Dynamsoft Code Parser Java Enumerations
4+
description: The enumeration MappingStatus of Dynamsoft Code Parser represents the outcome of a mapping operation on a field.
5+
keywords: Mapping status
6+
---
7+
8+
# Enumeration MappingStatus
9+
10+
`MappingStatus` represents the outcome of a mapping operation on a field.
11+
12+
```java
13+
@Retention(RetentionPolicy.CLASS)
14+
public @interface EnumMappingStatus {
15+
//The field has no mapping specified.
16+
int MS_NONE = 0;
17+
//Find a mapping for the field value.
18+
int MS_SUCCEEDED = 1;
19+
//Failed to find a mapping for the field value.
20+
int MS_FAILED = 2;
21+
}
22+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: default-layout
3+
title: ValidationStatus - Dynamsoft Code Parser Java Enumerations
4+
description: The enumeration ValidationStatus of Dynamsoft Code Parser describes the outcome of a validation process on a field.
5+
keywords: Validation status
6+
---
7+
8+
# Enumeration ValidationStatus
9+
10+
`ValidationStatus` describes the outcome of a validation process on a field.
11+
12+
```java
13+
@Retention(RetentionPolicy.CLASS)
14+
public @interface EnumValidationStatus {
15+
//The field has no validation specified.
16+
int VS_NONE = 0;
17+
//The validation for the field has been succeeded.
18+
int VS_SUCCEEDED = 1;
19+
//The validation for the field has been failed.
20+
int VS_FAILED = 2;
21+
}
22+
```

0 commit comments

Comments
 (0)