line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::WoS::SearchRecords; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1836
|
use Catmandu::Sane; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
20
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0302'; |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
658
|
use Moo::Role; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
24
|
|
8
|
4
|
|
|
4
|
|
1382
|
use Catmandu::Util qw(xml_escape); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
189
|
|
9
|
4
|
|
|
4
|
|
1684
|
use XML::LibXML::Simple qw(XMLin); |
|
4
|
|
|
|
|
165810
|
|
|
4
|
|
|
|
|
263
|
|
10
|
4
|
|
|
4
|
|
34
|
use namespace::clean; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
35
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::WoS::SearchBase'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _retrieve_content { |
15
|
0
|
|
|
0
|
|
|
my ($self, $query_id, $start, $limit) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
$query_id = xml_escape($query_id); |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
<<EOF; |
20
|
|
|
|
|
|
|
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> |
21
|
|
|
|
|
|
|
<soap:Body> |
22
|
|
|
|
|
|
|
<ns2:retrieve xmlns:ns2="http://woksearch.v3.wokmws.thomsonreuters.com"> |
23
|
|
|
|
|
|
|
<queryId>$query_id</queryId> |
24
|
|
|
|
|
|
|
<retrieveParameters> |
25
|
|
|
|
|
|
|
<firstRecord>$start</firstRecord> |
26
|
|
|
|
|
|
|
<count>$limit</count> |
27
|
|
|
|
|
|
|
</retrieveParameters> |
28
|
|
|
|
|
|
|
</ns2:retrieve> |
29
|
|
|
|
|
|
|
</soap:Body> |
30
|
|
|
|
|
|
|
</soap:Envelope> |
31
|
|
|
|
|
|
|
EOF |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _retrieve_response_type { |
35
|
0
|
|
|
0
|
|
|
'retrieveResponse'; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _find_records { |
39
|
0
|
|
|
0
|
|
|
my ($self, $xpc, $response_type) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
my $xml = $xpc->findvalue( |
42
|
|
|
|
|
|
|
"/soap:Envelope/soap:Body/ns2:$response_type/return/records"); |
43
|
0
|
|
|
|
|
|
XMLin($xml, ForceArray => 1)->{REC}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |