1 # $Id: Stats.pm,v 1.1 2006-12-14 17:34:57 mike Exp $
3 package ZOOM::IRSpy::Stats;
11 ZOOM::IRSpy::Stats - statistics generated for IRSpy about its targets
15 $stats = new ZOOM::IRSpy::Stats($dbname);
16 use Data::Dumper; print Dumper($stats);
20 Provides a simple API to obtaining statistics about targets registered
21 in IRSpy. This is done just by creating a Stats object. Once this
22 object is made, it can be crudely dumped, or the application can walk
23 the structure to produce nice output.
29 $stats = new ZOOM::IRSpy::Stats($dbname, "dc.creator=wedel");
31 $stats = new ZOOM::IRSpy::Stats($dbname,
32 new ZOOM::Query::PQF('@attr 1=1003 wedel');
34 $spy = new ZOOM::IRSpy("target/string/for/irspy/database");
35 $stats = new ZOOM::IRSpy::Stats($spy, $query);
37 Creates a new C<ZOOM::IRSpy::Stats> object and populates it with
38 statistics for the targets in the nominated database. This process
39 involves analysing the nominated IRSpy database at some length, and
40 which therefore takes some time
42 Either one or two arguments are required:
46 =item $irspy (mandatory)
48 An indication of the IRSpy database that statistics are required for.
49 This may be in the form of a C<ZOOM::IRSpy> object or a database-name
50 string such as C<localhost:3313/IR-Explain---1>.
52 =item $query (optional)
54 The query with which to select a subset of the database to be
55 analysed. This may be in the form of a C<ZOOM::Query> object (using
56 any of the supported subclasses) or a CQL string. If this is omitted,
57 then all records in the database are included in the generated
66 my($irspy, $query) = @_;
70 query => $query || "cql.allRecords=1",
81 Mike Taylor, E<lt>mike@indexdata.comE<gt>
83 =head1 COPYRIGHT AND LICENSE
85 Copyright (C) 2006 by Index Data ApS.
87 This library is free software; you can redistribute it and/or modify
88 it under the same terms as Perl itself, either Perl version 5.8.7 or,
89 at your option, any later version of Perl 5 you may have available.