| 1 | package Catmandu::Importer::WoSCitingArticles; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use Catmandu::Sane; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 1 | our $VERSION = '0.0303'; | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Catmandu::Util qw(xml_escape); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 1 | with 'Catmandu::WoS::SearchRecords'; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 1 | has uid => (is => 'ro', required => 1); | |||||||||||||||||||||||||||
| 14 | 1 | has timespan_begin => (is => 'ro'); | |||||||||||||||||||||||||||
| 15 | 1 | has timespan_end => (is => 'ro'); | |||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | sub _search_content { | ||||||||||||||||||||||||||
|
Subroutine
_search_content: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 18 | 0 | my ($self, $start, $limit) = @_; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | my $uid = xml_escape($self->uid); | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | my $timespan_xml = ''; | |||||||||||||||||||||||||||
| 23 | 0 | ▶ | if ($self->timespan_begin && $self->timespan_end) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->timespan_begin and $self->timespan_end
MC/DC0%0/2
$self->timespan_begin and $self->timespan_end
$self->timespan_begin
$self->timespan_end
Truth table0%0/3
A and B
A= $self->timespan_beginB= $self->timespan_end
| |||||||||||||||||||||||||||||
| 24 | 0 | my $tsb = $self->timespan_begin; | |||||||||||||||||||||||||||
| 25 | 0 | my $tse = $self->timespan_end; | |||||||||||||||||||||||||||
| 26 | 0 | $timespan_xml | |||||||||||||||||||||||||||
| 27 | = "<timeSpan><begin>$tsb</begin><end>$tse</end></timeSpan>"; | ||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 0 | <<EOF; | |||||||||||||||||||||||||||
| 31 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" | ||||||||||||||||||||||||||||
| 32 | xmlns:woksearch="http://woksearch.v3.wokmws.thomsonreuters.com"> | ||||||||||||||||||||||||||||
| 33 | <soapenv:Header/> | ||||||||||||||||||||||||||||
| 34 | <soapenv:Body> | ||||||||||||||||||||||||||||
| 35 | <woksearch:citingArticles> | ||||||||||||||||||||||||||||
| 36 | <databaseId>WOS</databaseId> | ||||||||||||||||||||||||||||
| 37 | <uid>$uid</uid> | ||||||||||||||||||||||||||||
| 38 | $timespan_xml | ||||||||||||||||||||||||||||
| 39 | <queryLanguage>en</queryLanguage> | ||||||||||||||||||||||||||||
| 40 | <retrieveParameters> | ||||||||||||||||||||||||||||
| 41 | <firstRecord>$start</firstRecord> | ||||||||||||||||||||||||||||
| 42 | <count>$limit</count> | ||||||||||||||||||||||||||||
| 43 | <option> | ||||||||||||||||||||||||||||
| 44 | <key>RecordIDs</key> | ||||||||||||||||||||||||||||
| 45 | <value>On</value> | ||||||||||||||||||||||||||||
| 46 | </option> | ||||||||||||||||||||||||||||
| 47 | <option> | ||||||||||||||||||||||||||||
| 48 | <key>targetNamespace</key> | ||||||||||||||||||||||||||||
| 49 | <value>http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord</value> | ||||||||||||||||||||||||||||
| 50 | </option> | ||||||||||||||||||||||||||||
| 51 | </retrieveParameters> | ||||||||||||||||||||||||||||
| 52 | </woksearch:citingArticles> | ||||||||||||||||||||||||||||
| 53 | </soapenv:Body> | ||||||||||||||||||||||||||||
| 54 | </soapenv:Envelope> | ||||||||||||||||||||||||||||
| 55 | EOF | ||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 0 | ▶ | sub _search_response_type { | ||||||||||||||||||||||||||
|
Subroutine
_search_response_type: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 59 | 0 | 'citingArticlesResponse'; | |||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 1 | 1; | |||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | __END__ | ||||||||||||||||||||||||||||