| layout | default-layout |
|---|---|
| title | CaptureVisionRouter Settings - Dynamsoft Capture Vision Router Module Java Edition API Reference |
| description | API reference for the settings methods of the CaptureVisionRouter class in Dynamsoft Capture Vision Java Edition, including template management and parameter configuration. |
| keywords | capture vision, router, settings, api reference, java |
| needAutoGenerateSidebar | true |
| needGenerateH3Content | false |
| Method | Description |
|---|---|
initSettings |
Loads and initializes a template from a string. |
initSettingsFromFile |
Loads and initializes a template from a file. |
outputSettings |
Exports a specific CaptureVisionTemplate to a string. |
outputSettingsToFile |
Exports a specific CaptureVisionTemplate to a file. |
getSimplifiedSettings |
Retrieves a SimplifiedCaptureVisionSettings object for a specific CaptureVisionTemplate. |
updateSettings |
Updates a CaptureVisionTemplate with SimplifiedCaptureVisionSettings object. |
resetSettings |
Resets all templates to factory settings. |
getParameterTemplateCount |
Gets the total number of available parameter templates. |
getParameterTemplateName |
Gets the name of a specific parameter template by its index. |
Loads and initializes a template from a string.
public CaptureVisionError initSettings(String content) throws CaptureVisionExceptionParameters
content The string containing the template.
Return Value
Returns a CaptureVisionError object that contains error information.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
See Also
[CaptureVisionError]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-error.html)
Loads and initializes a template from a file.
public CaptureVisionError initSettingsFromFile(String filePath) throws CaptureVisionExceptionParameters
filePath The path to the file containing the template.
Return Value
Returns a CaptureVisionError object that contains error information.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
See Also
[CaptureVisionError]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-error.html)
Exports a specific template to a string.
public String outputSettings(String templateName) throws CaptureVisionException
public String outputSettings(String templateName, boolean includeDefaultValues) throws CaptureVisionExceptionParameters
templateName The name of the CaptureVisionTemplate to be exported.
includeDefaultValues Specifies whether to include default values in the exported template.
Remarks
- It is supported to export all loaded templates by specifying the
templateNameas '*'. - There are two types of
CaptureVisionTemplate: the [preset ones]({{ site.dcvb_java_api }}capture-vision-router/enum-preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [initSettings]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettings) / [initSettingsFromFile]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettingsfromfile). - When using a custom template, the parameter
templateNameshould be the name of the [CaptureVisionTemplateobject]({{ site.dcvb_parameters }}file/capture-vision-template.html) in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinitSettings/initSettingsFromFileand pass his own settings. - If parameter
templateNameis not specified, the preset one named 'Default' will be used. However, if the preset ones have been overwritten as described above, the firstCaptureVisionTemplatefrom the user's own settings will be used instead.
Return Value
Returns a string containing the exported template.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
Exports a specific template to a file.
public void outputSettingsToFile(String templateName, String filePath) throws CaptureVisionException
public void outputSettingsToFile(String templateName, String filePath, boolean includeDefaultValues) throws CaptureVisionExceptionParameters
templateName The name of the template to be exported.
filePath The path to the output file.
includeDefaultValues Specifies whether to include default values in the exported template.
Remarks
- It is supported to export all loaded templates by specifying the
templateNameas '*'. - There are two types of
CaptureVisionTemplate: the [preset ones]({{ site.dcvb_java_api }}capture-vision-router/enum-preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [initSettings]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettings) / [initSettingsFromFile]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettingsfromfile). - When using a custom template, the parameter
templateNameshould be the name of the [CaptureVisionTemplateobject]({{ site.dcvb_parameters }}file/capture-vision-template.html) in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinitSettings/initSettingsFromFileand pass his own settings. - If parameter
templateNameis not specified, the preset one named 'Default' will be used. However, if the preset ones have been overwritten as described above, the firstCaptureVisionTemplatefrom the user's own settings will be used instead.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
Retrieves a simplified version of the capture settings for a specific template.
public SimplifiedCaptureVisionSettings getSimplifiedSettings(String templateName) throws CaptureVisionExceptionParameters
templateName The name of the template.
Remarks
- There are two types of
CaptureVisionTemplate: the [preset ones]({{ site.dcvb_java_api }}capture-vision-router/enum-preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [initSettings]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettings) / [initSettingsFromFile]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettingsfromfile). - When using a custom template, the parameter
templateNameshould be the name of the [CaptureVisionTemplateobject]({{ site.dcvb_parameters }}file/capture-vision-template.html) in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinitSettings/initSettingsFromFileand pass his own settings. - If parameter
templateNameis not specified, the preset one named 'Default' will be used. However, if the preset ones have been overwritten as described above, the firstCaptureVisionTemplatefrom the user's own settings will be used instead.
Return Value
Returns a SimplifiedCaptureVisionSettings object containing all settings.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
See Also
[SimplifiedCaptureVisionSettings]({{ site.dcvb_java_api }}capture-vision-router/auxiliary-classes/simplified-capture-vision-settings.html)
Updates a template with simplified capture settings.
public void updateSettings(String templateName, SimplifiedCaptureVisionSettings settings) throws CaptureVisionExceptionParameters
templateName The name of the template to be updated.
settings A SimplifiedCaptureVisionSettings object.
Remarks
- There are two types of
CaptureVisionTemplate: the [preset ones]({{ site.dcvb_java_api }}capture-vision-router/enum-preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [initSettings]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettings) / [initSettingsFromFile]({{ site.dcvb_java_api }}capture-vision-router/settings.html#initsettingsfromfile). - When using a custom template, the parameter
templateNameshould be the name of the [CaptureVisionTemplateobject]({{ site.dcvb_parameters }}file/capture-vision-template.html) in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinitSettings/initSettingsFromFileand pass his own settings. - If parameter
templateNameis not specified, the preset one named 'Default' will be used. However, if the preset ones have been overwritten as described above, the firstCaptureVisionTemplatefrom the user's own settings will be used instead.
Exceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
See Also
[SimplifiedCaptureVisionSettings]({{ site.dcvb_java_api }}capture-vision-router/auxiliary-classes/simplified-capture-vision-settings.html)
Resets all templates to factory settings.
public void resetSettings() throws CaptureVisionExceptionExceptions
[CaptureVisionException]({{ site.dcvb_java_api }}capture-vision-router/capture-vision-exception.html)
Gets the total number of available parameter templates.
public int getParameterTemplateCount()Return value
Returns an integer representing the count of parameter templates.
Gets the name of a specific parameter template by its index.
public String getParameterTemplateName(int index)Parameters
index The index of the parameter template to get.
Return value
Returns a string containing the name of the parameter template.