[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Mon Jul 25 21:52:25 UTC 2005
mwilkinson
Mon Jul 25 17:52:25 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv21863/MOBY
Modified Files:
Central.pm service_instance.pm
Log Message:
more of the same. Pass hashes instead of hashrefs, and avoid passing database ids
moby-live/Perl/MOBY Central.pm,1.182,1.183 service_instance.pm,1.27,1.28
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -r1.182 -r1.183
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/25 20:14:34 1.182
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/25 21:52:25 1.183
@@ -1926,9 +1926,11 @@
my (@children) =
@{ $relationships{'urn:lsid:biomoby.org:servicerelation:isa'} };
$children_string .= ( join ',', map { "\'$_\'" } @children );
+ #*******FIX this isn't very perlish... sending a comma-delimited string to a subroutine instead of an array
+ # need to change that one day soon!
}
$children_string =~ s/\,$//;
- my $ids = _extract_ids($adaptor->match_service_type_uri({service_type_uri => $children_string}));
+ my $ids = _extract_ids($adaptor->match_service_type_uri(service_type_uri => $children_string));
$debug
&& _LOG( "services " . ( join ',', @{$ids} ) . " incrememted\n" );
@@ -3243,6 +3245,11 @@
}
sub _serviceListResponse {
+
+
+ # *********FIX
+ # this routine is using service instances by their database ID, rather than their LSID
+ # this is BAD BAD BAD
$CONFIG ||= MOBY::Config->new; # exported by Config.pm
my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm 2005/07/25 20:55:35 1.27
+++ /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm 2005/07/25 21:52:25 1.28
@@ -235,16 +235,16 @@
. $self->servicename;
my $id = $self->adaptor->insert_service_instance(
- {category => $self->category},
- {servicename => $self->servicename},
- {service_type_uri => $self->service_type_uri},
- {authority_id => $self->authority_id},
- {url => $self->url},
- {contact_email => $self->contact_email},
- {authoritative => $self->authoritative},
- {description => $self->description},
- {signatureURL => $self->signatureURL},
- {lsid => $service_lsid}
+ category => $self->category,
+ servicename => $self->servicename,
+ service_type_uri => $self->service_type_uri,
+ authority_id => $self->authority_id,
+ url => $self->url,
+ contact_email => $self->contact_email,
+ authoritative => $self->authoritative,
+ description => $self->description,
+ signatureURL => $self->signatureURL,
+ lsid => $service_lsid
);
$self->service_instance_id($id);
$self->{__exists__} = 1; # this service now exists
More information about the MOBY-guts
mailing list