Type definitions: IBulkCheckService
IBulkCheckService interface
CreateSecurityToken method
Creates security token for the specified credentials.
Arguments:
Argument | Meaning |
---|---|
login | Congree login name to work under |
password | Password for the specified user |
Returned value:
If successful, the security token string is returned.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
ReleaseSecurityToken method
Releases the specified security token.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token to be released |
Returned value:
None.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenReleaseLicenseFault
GetRuleSets method
Gets available rule set names which can be used to specify search rules and options.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token acquired by calling CreateSecurityToken |
Returned value:
Collection of available rule set names.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
CheckDocument method
Checks the document using the rule set specified.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
xml | XML to be checked. Note: value should represent a valid XML document. |
ruleSetName | Name of the rule set to use |
Returned value:
Instance of LinguisticCheckResult containing check results.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
CheckDocument2 method
Checks the document using the specified rule set and options.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
xml | XML to be checked. Note: value should represent a valid XML document. |
ruleSetName | Name of the rule set to use |
options | Language check options |
Returned value:
Instance of LinguisticCheckResult containing check results.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
CheckDocument3 method
Checks the document using the specified rule set and options. Extended output is formed.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
xml | XML to be checked. Note: value should represent a valid XML document. |
ruleSetName | Name of the rule set to use |
options | Language check options |
Returned value:
Instance of LinguisticCheckResult2 containing extended check results.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
StartCheckDocumentTask method
Starts an asynchronous document check task using the specified rule set name and options. LinguisticCheckResult2 instance is formed as a result.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
xml | XML to be checked. Note: value should represent a valid XML document. |
ruleSetName | Name of the rule set to use |
options | Language check options |
Returned value:
Token of the started task.
Task result:
Instance of LinguisticCheckResult2.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
StartCheckDocumentTask2 method
Starts an asynchronous document check task using the specified rule set name and options. Failed content is considered in the output, so LinguisticCheckResult3 instance is formed as a result.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
xml | XML to be checked. Note: value should represent a valid XML document. |
ruleSetName | Name of the rule set to use |
options | Language check options |
Returned value:
Token of the started task.
Task result:
Instance of LinguisticCheckResult3.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
GetTaskStatus method
Gets current task status.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by callint CreateSecurityToken |
taskToken | Token of the task returned by a StartCheckDocumentTask* method |
Returned value:
Instance of TaskStatus representing the current status of the task referred to by the token specified.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
GetTaskResult method
Gets result of an asynchronous task started with StartCheckDocumentTask* method.
The result can be obtained only for tasks of "Success" or "Failed" state.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken to be released |
Returned value:
Instance of a class derived from TaskResult representing result of the task. Concrete type depends on the method used to start the task (see "Task result" section).
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
AddTermCandidates method
Stores terminology candidates in Congree DataGrooming.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
termCandidates | Array of term candidates to be added |
ruleSetName | Name of the rule set to use |
addOnlyUnknown | If true, only unknown term candidates will be added |
Returned value:
None.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
GetCongreeVersion method
Gets congree version info.
Arguments:
None.
Returned value:
VersionInfo instance, containing versions of Congree components.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
GetApiVersion method
Gets Congree Bulk Check Service API version info.
Arguments:
None.
Returned value:
ApiVersionInfo instance, containing Congree Bulk Check Service version information.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
GetAvailableComponents method
Gets a collection of CongreeComponentInfo objects describing currently available components.
Note: In the current state the collection returned contains all licensed components, i.e. presence of a component in the collection does not guarantee that it was installed.
Arguments:
Argument | Meaning |
---|---|
securityToken | Security token string acquired by calling CreateSecurityToken |
Returned value:
Collection of available Congree components.
Faults:
- CongreeBulkCheckFault
- WrongCredentialsFault
- SecurityTokenNotExistFault
- SecurityTokenLockedFault
Notes
Choosing CheckDocument method
There are 3 variants of CheckDocument method in the interface. You can select the appropriate one according to your needs.
- CheckDocument accepts no additional configuration and returns basic information (LinguisticCheckResult) as a result.
- CheckDocument2 does the same as above, but allows you to configure output by passing an instance of Options class.
- CheckDocument3 is similar to CheckDocument2, but its result (LinguisticCheckResult2) contains extended error information which includes concept identifiers for proposals returned in Errors array.
Checking document in asynchronous way
Bulk Check service supports checking documents asynchronously. You can start the check by calling either StartCheckDocumentTask or StartCheckDocumentTask2 method.
- StartCheckDocumentTask is similar to CheckDocument3, and it also produces LinguisticCheckResult2.
- StartCheckDocumentTask2 produces LinguisticCheckResult3 which contains additional information (collection of paragraphs Congree was unable to check).
Both methods return a token which identifies the task. You will need it to check task status or get the result.
In order to check a document in asynchronous way, you should follow the next steps:
- Call appropriate StartCheckDocumentTask method and save the task token.
- Check task status by calling GetTaskStatus with some time period.
- If State is Success then your result is ready.
- Failed state means that someting went wrong. In this case ErrorInfo contains error information. No result will be available.
- Pending or InProgress states mean that the check has not started or finished yet.
- When the result is available, acquire it by calling GetTaskResult. Note that as described above, the concrete type returned will vary depending on which method was used to start the task.
Related topics
For further information see:
- Linguistic-related types
- DataGrooming-related types
- Terminology-related types
- Auxiliary types
- Asynchronous task-related types