1 |
joko |
1.3 |
## ------------------------------------------------------------------------ |
2 |
joko |
1.4 |
## $Id: Files.pm,v 1.3 2003/01/19 03:15:43 joko Exp $ |
3 |
joko |
1.3 |
## ------------------------------------------------------------------------ |
4 |
joko |
1.2 |
## $Log: Files.pm,v $ |
5 |
joko |
1.4 |
## Revision 1.3 2003/01/19 03:15:43 joko |
6 |
|
|
## + modified header |
7 |
|
|
## |
8 |
joko |
1.3 |
## Revision 1.2 2003/01/19 02:14:11 joko |
9 |
|
|
## + proposal for more abstract filesystem-query-interface |
10 |
|
|
## |
11 |
joko |
1.2 |
## Revision 1.1 2002/12/03 15:52:53 joko |
12 |
|
|
## + initial check-in |
13 |
joko |
1.3 |
## ------------------------------------------------------------------------ |
14 |
joko |
1.1 |
|
15 |
|
|
|
16 |
|
|
package Data::Storage::Handler::Files; |
17 |
|
|
|
18 |
|
|
use strict; |
19 |
|
|
use warnings; |
20 |
|
|
|
21 |
|
|
use base ("Data::Storage::Handler::Abstract"); |
22 |
|
|
|
23 |
|
|
use Data::Dumper; |
24 |
|
|
#use Data::Storage::Result::Files; |
25 |
|
|
|
26 |
|
|
# get logger instance |
27 |
|
|
my $logger = Log::Dispatch::Config->instance; |
28 |
|
|
|
29 |
|
|
|
30 |
|
|
sub getMetaInfo { |
31 |
|
|
my $self = shift; |
32 |
|
|
$logger->debug( __PACKAGE__ . "->getMetaInfo()" ); |
33 |
|
|
return; |
34 |
|
|
return { |
35 |
|
|
'disconnectMethod' => 'disconnect', |
36 |
|
|
}; |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
sub connect { |
40 |
|
|
my $self = shift; |
41 |
|
|
#$self->{COREHANDLE} = $self; |
42 |
|
|
#$self->{COREHANDLE} = 1; |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
sub getChildNodes { |
46 |
|
|
my $self = shift; |
47 |
|
|
#my @nodes; |
48 |
|
|
#print "======\n"; |
49 |
|
|
$logger->debug( __PACKAGE__ . "->getChildNodes()" ); |
50 |
|
|
#print Dumper($self->{locator}); |
51 |
joko |
1.4 |
my @keys = keys %{$self->{locator}->{files}}; |
52 |
|
|
$self->{meta}->{childnodes} = \@keys; |
53 |
joko |
1.1 |
return $self->{locator}->{files}; |
54 |
|
|
} |
55 |
|
|
|
56 |
|
|
sub getFileByName { |
57 |
|
|
my $self = shift; |
58 |
|
|
my $name = shift; |
59 |
|
|
return $self->{locator}->{files}->{$name}; |
60 |
joko |
1.2 |
} |
61 |
|
|
|
62 |
|
|
sub sendQuery { |
63 |
|
|
# transform query to searchrules |
64 |
|
|
# addSearchRule( ... ) |
65 |
|
|
# addSearchRule( ... ) |
66 |
|
|
# addSearchRule( ... ) |
67 |
|
|
# runSearch( ... ) |
68 |
|
|
# returnSearchResult( ... ) |
69 |
|
|
} |
70 |
|
|
|
71 |
|
|
sub addSearchRule { |
72 |
|
|
|
73 |
|
|
} |
74 |
|
|
|
75 |
|
|
sub runSearch { |
76 |
|
|
|
77 |
joko |
1.1 |
} |
78 |
|
|
|
79 |
|
|
1; |