3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.32 2003/04/08 22:52:22 joko |
7 |
|
# modified 'querySchema': better behaviour regarding filtering result |
8 |
|
# |
9 |
# Revision 1.31 2003/04/05 21:24:09 joko |
# Revision 1.31 2003/04/05 21:24:09 joko |
10 |
# modified 'sub getChildNodes': now contains code from 'querySchema' |
# modified 'sub getChildNodes': now contains code from 'querySchema' |
11 |
# |
# |
238 |
|
|
239 |
my $self = shift; |
my $self = shift; |
240 |
my $mode = shift; |
my $mode = shift; |
241 |
|
my $filter = shift; |
242 |
|
|
243 |
$mode ||= 'core'; |
$mode ||= 'core'; |
244 |
|
$filter ||= 'all'; |
245 |
|
|
246 |
$logger->debug( __PACKAGE__ . "->getChildNodes($mode)" ); |
$logger->debug( __PACKAGE__ . "->getChildNodes($mode)" ); |
247 |
|
|
283 |
push @concret_names, $_ if (!Class::Tangram::class_is_abstract($_)); |
push @concret_names, $_ if (!Class::Tangram::class_is_abstract($_)); |
284 |
$o_cnt++; |
$o_cnt++; |
285 |
} |
} |
286 |
|
|
287 |
my $result = { |
if ($filter eq 'all') { |
288 |
all => \@object_names, |
return \@object_names; |
289 |
concrete => \@concret_names, |
} elsif ($filter eq 'concrete') { |
290 |
}; |
return \@concret_names; |
291 |
return $result; |
} |
292 |
|
|
293 |
} |
} |
294 |
|
|
560 |
|
|
561 |
# HACK: special case: querying by id does not translate into a common tangram query |
# HACK: special case: querying by id does not translate into a common tangram query |
562 |
# just load the object by given id(ent) |
# just load the object by given id(ent) |
563 |
if ($query->{criterias}->[0]->{key} eq 'id' && $query->{criterias}->[0]->{op} eq 'eq') { |
if ($query->{criterias} && ($query->{criterias}->[0]->{key} eq 'id' && $query->{criterias}->[0]->{op} eq 'eq')) { |
564 |
#print "LOAD!!!", "\n"; |
#print "LOAD!!!", "\n"; |
565 |
#exit; |
#exit; |
566 |
#return Set::Object->new( $self->{COREHANDLE}->load($query->{criterias}->[0]->{val}) ); |
#return Set::Object->new( $self->{COREHANDLE}->load($query->{criterias}->[0]->{val}) ); |