2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.8 2003/06/25 22:56:11 joko |
6 |
|
## dummy "sub getCOREHANDLE" |
7 |
|
## |
8 |
|
## Revision 1.7 2003/06/06 03:57:25 joko |
9 |
|
## disabled debugging output |
10 |
|
## |
11 |
|
## Revision 1.6 2003/05/13 16:34:26 joko |
12 |
|
## don't use GUID when building xpq filter |
13 |
|
## |
14 |
## Revision 1.5 2003/05/13 08:06:13 joko |
## Revision 1.5 2003/05/13 08:06:13 joko |
15 |
## filled "sub sendQuery": query xml document via XPath |
## filled "sub sendQuery": query xml document via XPath |
16 |
## |
## |
46 |
sub getMetaInfo { |
sub getMetaInfo { |
47 |
my $self = shift; |
my $self = shift; |
48 |
$logger->debug( __PACKAGE__ . "->getMetaInfo()" ); |
$logger->debug( __PACKAGE__ . "->getMetaInfo()" ); |
49 |
return; |
#return; |
50 |
return { |
return { |
51 |
'disconnectMethod' => 'disconnect', |
'disconnectMethod' => 'abc', |
52 |
}; |
}; |
53 |
} |
} |
54 |
|
|
58 |
#$self->{COREHANDLE} = 1; |
#$self->{COREHANDLE} = 1; |
59 |
} |
} |
60 |
|
|
61 |
|
#sub disconnect { } |
62 |
|
sub getCOREHANDLE { } |
63 |
|
|
64 |
sub getChildNodes { |
sub getChildNodes { |
65 |
my $self = shift; |
my $self = shift; |
66 |
#my @nodes; |
#my @nodes; |
91 |
my $self = shift; |
my $self = shift; |
92 |
my $query = shift; |
my $query = shift; |
93 |
|
|
94 |
print __PACKAGE__ . ": sendQuery(" . Dumper($query) . ")"; |
#print STDERR __PACKAGE__ . ": sendQuery(" . Dumper($query) . ")", "\n"; |
95 |
|
|
96 |
my $file = $query->{node}; |
my $file = $query->{node}; |
97 |
# NEW [2003-04-23]: DataItem compatibility |
# NEW [2003-04-23]: DataItem compatibility |
115 |
|
|
116 |
# map a GUID to a xml-name attribute which is searched anywhere ('*/*') |
# map a GUID to a xml-name attribute which is searched anywhere ('*/*') |
117 |
#$xpq = '*/' . $query->{options}->{GUID} if (!$xpq && $query->{options}->{GUID}); |
#$xpq = '*/' . $query->{options}->{GUID} if (!$xpq && $query->{options}->{GUID}); |
118 |
$xpq = '*/*[@name="' . $query->{options}->{GUID} . '"]' if (!$xpq && $query->{options}->{GUID}); |
#$xpq = '*/*[@name="' . $query->{options}->{GUID} . '"]' if (!$xpq && $query->{options}->{GUID}); |
119 |
|
|
120 |
$xpq = '*' if !$xpq; |
$xpq = '*' if !$xpq; |
121 |
#print "xpq: $xpq", "\n"; |
#print "xpq: $xpq", "\n"; |
138 |
# --- from OEF::YAA::Jobs --- |
# --- from OEF::YAA::Jobs --- |
139 |
|
|
140 |
# V1 - direct mode |
# V1 - direct mode |
141 |
print "subtree: " . Dumper($subtree); |
#print STDERR "subtree: " . Dumper($subtree); |
142 |
#return $subtree; |
#return $subtree; |
143 |
|
|
144 |
#print Dumper($query); |
#print Dumper($query); |
145 |
print "xpq: $xpq", "\n"; |
#print STDERR "file: $file", "\n"; |
146 |
|
#print STDERR "xpq: $xpq", "\n"; |
147 |
|
|
148 |
# V2 - wrapped via a result object providing a more generic api to e.g. iterate through items |
# V2 - wrapped via a result object providing a more generic api to e.g. iterate through items |
149 |
my $result = Data::Storage::Result::Hash->new( RESULTHANDLE => $subtree ); |
my $result = Data::Storage::Result::Hash->new( RESULTHANDLE => $subtree ); |