[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Mon Jul 25 18:17:44 UTC 2005
mwilkinson
Mon Jul 25 14:17:44 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv20619/MOBY
Modified Files:
Central.pm
Log Message:
changing the adaptor API to be more perlish. Pass the service LSID rather than the database key to be more generic
moby-live/Perl/MOBY Central.pm,1.179,1.180
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/25 17:50:02 1.179
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/25 18:17:44 1.180
@@ -3100,120 +3100,6 @@
return "<GETstring><![CDATA[$sprintf]]></GETstring>";
}
-#=head2 _traverseServiceDAG
-#
-# Title : _traverseServiceDAG
-# Usage : @valid = $MOBY->_traverseServiceDAG($dbh, $serviceType, $sth_hash)
-# Function : starting from $serviceType, find all child services non-redundantly
-# by traversing the DAG.
-# Returns : list of Service.id database entries.
-# Args : none
-#
-#=cut
-#
-#sub _traverseServiceDAG {
-#
-# $CONFIG ||= MOBY::Config->new; # exported by Config.pm
-# my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
-#
-# my ( $dbh, $serviceType, $sth_hash ) = @_;
-# my %sth = %{$sth_hash};
-# my %ServiceIDs;
-#
-# my $result = $adaptor->general_query({statement => $sth{get_service_type_id}}, {bind_values => [$serviceType]});
-# my $row = shift(@$result);
-# my ($root_id) = @$row;
-# return undef unless $root_id;
-#
-## we have to do a traversal of the DAG here to get all child nodes...
-## this is one UGLY piece of code written in a hurry! Please, someone, shoot it and put it out of its misery...
-# $ServiceIDs{$root_id} = "untested"; # mark the one in-hand as untested
-# while ( grep /untested/, ( values %ServiceIDs ) )
-# { # now, while there are untested services in our list...
-# foreach my $service ( keys %ServiceIDs )
-# { # start parsing through the list
-# next
-# if ( $ServiceIDs{$service} eq "tested" )
-# ; # if it has been tested already then move on
-#
-# my $result = $adaptor->general_query({statement => $sth{get_service_hierarchy_list}}, {bind_values => [$service]} );
-# # execute the query for child nodes
-# $ServiceIDs{$service} = "tested"; # mark it as tested
-# foreach my $row (@$result)
-# { # now get each of the child nodes
-# my $new = @$row;
-# next
-# if ( defined $ServiceIDs{$new} )
-# ; # if we have already heard about it then move on
-# $ServiceIDs{$new} = "untested"
-# ; #otherwise mark it as untested, and start all over again
-# }
-# }
-# }
-# return keys %ServiceIDs;
-#}
-
-#=head2 _traverseObjectDAG
-#
-# Title : _traverseObjectDAG
-# Usage : @valid = $MOBY->_traverseObjectDAG( $dbh, $objectType, $sth_hash, "p|c")
-# Function : from $objectType, find all parent/child objects non-redundantly
-# by traversing the DAG.
-# Returns : list of Object.id database entries.
-# Args : objectType (by name), $statement ahngles, "p" parent, or "c" child
-#
-#=cut
-#
-#sub _traverseObjectDAG {
-# $CONFIG ||= MOBY::Config->new; # exported by Config.pm
-# my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
-#
-# my ( $dbh, $objectType, $sth_hash, $dir ) = @_;
-# my %sth = %{$sth_hash};
-# my %ObjectIDs;
-#
-# my $result = $adaptor->general_query({statement => $sth{get_object_type_id}}, {bind_values => [$objectType]});
-#
-# my $row = shift (@$result);
-# my ($root_id) = @$row;
-# return undef unless $root_id;
-#
-## we have to do a traversal of the DAG here to get all child nodes...
-## this is one UGLY piece of code written in a hurry! Please, someone, shoot it and put it out of its misery...
-# $ObjectIDs{$root_id} = "untested"; # mark the one in-hand as untested
-# while ( grep /untested/, ( values %ObjectIDs ) )
-# { # now, while there are untested services in our list...
-# foreach my $object ( keys %ObjectIDs )
-# { # start parsing through the list
-# next
-# if ( $ObjectIDs{$object} eq "tested" )
-# ; # if it has been tested already then move on
-#
-# my $result;
-# if ( $dir eq "p" ) {
-# $debug && &_LOG("getting parents");
-# $result = $adaptor->general_query({statement => $sth{get_object_parent_list}}, {bind_values => [$object]});
-# }
-# else {
-# $debug && &_LOG("getting children");
-# $result = $adaptor->general_query({statement => $sth{get_object_child_list}}, {bind_values => [$object]});
-# }
-# # execute the query for child nodes
-#
-# $ObjectIDs{$object} = "tested"; # mark it as tested
-# foreach my $row (@$result)
-# { # now get each of the child nodes
-# my $new = @$row;
-# next
-# if ( defined $ObjectIDs{$new} )
-# ; # if we have already heard about it then move on
-# $ObjectIDs{$new} = "untested"
-# ; #otherwise mark it as untested, and start all over again
-# }
-# }
-# }
-# return keys %ObjectIDs;
-#}
#Eddie - converted
sub _nodeTextContent {
More information about the MOBY-guts
mailing list