Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

Version 1 Aktuelle »


IBulkCheckService interface

Interface definition
public interface IBulkCheckService
{
    string CreateSecurityToken(string login, string password);
	void ReleaseSecurityToken(string securityToken);
    IEnumerable<string> GetRuleSets(string securityToken);    
    LinguisticCheckResult CheckDocument(string securityToken, string xml, string ruleSetName);    
    LinguisticCheckResult CheckDocument2(string securityToken, string xml, string ruleSetName, Options options);    
    LinguisticCheckResult2 CheckDocument3(string securityToken, string xml, string ruleSetName, Options options);    
    string StartCheckDocumentTask(string securityToken, string xml, string ruleSetName, Options options);    
    string StartCheckDocumentTask2(string securityToken, string xml, string ruleSetName, Options options);    
    TaskStatus GetTaskStatus(string securityToken, string taskToken);    
    TaskResult GetTaskResult(string securityToken, string taskToken);    
    void AddTermCandidates(string securityToken, TermCandidateModel[] termCandidates, string ruleSetName, bool addOnlyUnknown);    
    VersionInfo GetCongreeVersion();    
    ApiVersionInfo GetApiVersion();    
    IEnumerable<CongreeComponentInfo> GetAvailableComponents(string securityToken);
}

CreateSecurityToken method

Method signature
string CreateSecurityToken(string login, string password);

Creates security token for the specified credentials.

Arguments:

ArgumentMeaning
loginCongree login name to work under
passwordPassword for the specified user

Returned value:

If successful, the security token string is returned.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault

ReleaseSecurityToken method

Method signature
void ReleaseSecurityToken(string securityToken);

Releases the specified security token.

Arguments:

ArgumentMeaning
securityTokenSecurity token to be released

Returned value:

None.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenReleaseLicenseFault

GetRuleSets method

Method signature
IEnumerable<string> GetRuleSets(string securityToken);

Gets available rule set names which can be used to specify search rules and options.

Arguments:

ArgumentMeaning
securityTokenSecurity token acquired by calling CreateSecurityToken

Returned value:

Collection of available rule set names.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

CheckDocument method

Method signature
LinguisticCheckResult CheckDocument(string securityToken, string xml, string ruleSetName);

Checks the document using the rule set specified.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
xmlXML to be checked. Note: value should represent a valid XML document.
ruleSetNameName of the rule set to use

Returned value:

Instance of LinguisticCheckResult containing check results.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

CheckDocument2 method

Method signature
LinguisticCheckResult CheckDocument2(string securityToken, string xml, string ruleSetName, Options options);

Checks the document using the specified rule set and options.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
xmlXML to be checked. Note: value should represent a valid XML document.
ruleSetNameName of the rule set to use
optionsLanguage check options

Returned value:

Instance of LinguisticCheckResult containing check results.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

CheckDocument3 method

Method signature
LinguisticCheckResult2 CheckDocument3(string securityToken, string xml, string ruleSetName, Options options);

Checks the document using the specified rule set and options. Extended output is formed.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
xmlXML to be checked. Note: value should represent a valid XML document.
ruleSetNameName of the rule set to use
optionsLanguage check options

Returned value:

Instance of LinguisticCheckResult2 containing extended check results.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

StartCheckDocumentTask method

Method signature
string StartCheckDocumentTask(string securityToken, string xml, string ruleSetName, Options options);

Starts an asynchronous document check task using the specified rule set name and options. LinguisticCheckResult2 instance is formed as a result.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
xmlXML to be checked. Note: value should represent a valid XML document.
ruleSetNameName of the rule set to use
optionsLanguage check options

Returned value:

Token of the started task.

Task result:

Instance of LinguisticCheckResult2.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

StartCheckDocumentTask2 method

Method signature
string StartCheckDocumentTask2(string securityToken, string xml, string ruleSetName, Options options);

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:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
xmlXML to be checked. Note: value should represent a valid XML document.
ruleSetNameName of the rule set to use
optionsLanguage check options

Returned value:

Token of the started task.

Task result:

Instance of LinguisticCheckResult3.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

GetTaskStatus method

Method signature
TaskStatus GetTaskStatus(string securityToken, string taskToken);

Gets current task status.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by callint CreateSecurityToken
taskTokenToken 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

Method signature
TaskResult GetTaskResult(string securityToken, string taskToken);

Gets result of an asynchronous task started with StartCheckDocumentTask* method.

The result can be obtained only for tasks of "Success" or "Failed" state.

Arguments:

ArgumentMeaning
securityTokenSecurity 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

Method signature
void AddTermCandidates(string securityToken, TermCandidateModel[] termCandidates, string ruleSetName, bool addOnlyUnknown);

Stores terminology candidates in Congree DataGrooming.

Arguments:

ArgumentMeaning
securityTokenSecurity token string acquired by calling CreateSecurityToken
termCandidatesArray of term candidates to be added
ruleSetNameName of the rule set to use
addOnlyUnknownIf true, only unknown term candidates will be added

Returned value:

None.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

GetCongreeVersion method

Method signature
VersionInfo GetCongreeVersion();

Gets congree version info.

Arguments:

None.

Returned value:

VersionInfo instance, containing versions of Congree components.

Faults:

  • CongreeBulkCheckFault
  • WrongCredentialsFault
  • SecurityTokenNotExistFault
  • SecurityTokenLockedFault

GetApiVersion method

Method signature
ApiVersionInfo GetApiVersion();

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

Method signature
IEnumerable<CongreeComponentInfo> GetAvailableComponents(string securityToken);

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:

ArgumentMeaning
securityTokenSecurity 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:

  1. Call appropriate StartCheckDocumentTask method and save the task token.
  2. Check task status by calling GetTaskStatus with some time period.
    1. If State is Success then your result is ready.
    2. Failed state means that someting went wrong. In this case ErrorInfo contains error information. No result will be available.
    3. Pending or InProgress states mean that the check has not started or finished yet.
  3. 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:


  • Keine Stichwörter