line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::WoS::SearchRecords; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
2194
|
use Catmandu::Sane; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
24
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0303'; |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
779
|
use Moo::Role; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
28
|
|
8
|
4
|
|
|
4
|
|
1767
|
use Catmandu::Util qw(xml_escape); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
199
|
|
9
|
4
|
|
|
4
|
|
2127
|
use XML::LibXML::Simple qw(XMLin); |
|
4
|
|
|
|
|
206524
|
|
|
4
|
|
|
|
|
298
|
|
10
|
4
|
|
|
4
|
|
39
|
use namespace::clean; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
39
|
|
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; |