NAME

DTA::CAB::Client::XmlRpc - DTA::CAB XML-RPC server clients

SYNOPSIS

use DTA::CAB::Client::XmlRpc;

##========================================================================
## Constructors etc.

$cli = DTA::CAB::Client::XmlRpc->new(%args);

##========================================================================
## Methods: Generic Client API: Connections

$bool = $cli->connected();
$bool = $cli->connect();
$bool = $cli->disconnect();
@analyzers = $cli->analyzers();

##========================================================================
## Methods: Utils

$rsp_or_error = $cli->request($req);

##========================================================================
## Methods: Generic Client API: Queries

$req  = $cli->newRequest($methodName, @args);
$tok  = $cli->analyzeToken($analyzer, $tok, \%opts);
$sent = $cli->analyzeSentence($analyzer, $sent, \%opts);
$doc  = $cli->analyzeDocument($analyzer, $doc, \%opts);

DESCRIPTION

Globals

Variable: @ISA

DTA::CAB::Client::XmlRpc inherits from DTA::CAB::Client.

Constructors etc.

new
$cli = CLASS_OR_OBJ->new(%args);

Constructor.

%args, %$cli:

##-- server selection
serverURL      => $url,         ##-- default: localhost:8000
serverEncoding => $encoding,    ##-- default: UTF-8
timeout        => $timeout,     ##-- timeout in seconds, default: 300 (5 minutes)
##
##-- underlying RPC::XML client
xcli           => $xcli,        ##-- RPC::XML::Client object

Methods: Generic Client API: Connections

connected
$bool = $cli->connected();

Override: returns true iff $cli is connected to a server.

connect
$bool = $cli->connect();

Override: establish connection to the selected server.

disconnect
$bool = $cli->disconnect();

Override: close current server connection, if any.

analyzers
@analyzers = $cli->analyzers();

Override: get list of known analyzers from the server.

Methods: Utils

request
$rsp_or_error = $cli->request($req);
$rsp_or_error = $cli->request($req, $doDeepEncoding=1)

Send an XML-RPC request $req, log if error occurs.

Methods: Generic Client API: Queries

newRequest
$req = $cli->newRequest($methodName, @args);

Returns new RPC::XML::request for $methodName(@args). Encodes all atomic data types as strings

analyzeToken
$tok = $cli->analyzeToken($analyzer, $tok, \%opts);

Override: server-side token analysis.

analyzeSentence
$sent = $cli->analyzeSentence($analyzer, $sent, \%opts);

Override: server-side sentence analysis.

analyzeDocument
$doc = $cli->analyzeDocument($analyzer, $doc, \%opts);

Override: server-side document analysis.

analyzeData
$data_str = $cli->analyzeData($analyzer, $input_str, \%opts)

Override: server-side raw-data analysis.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.