[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Aug 30 14:52:16 UTC 2005


mwilkinson
Tue Aug 30 10:52:16 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv22437/MOBY

Modified Files:
	Central.pm OntologyServer.pm 
Log Message:
this should fix the problem with the Relationships call to MOBY Central.  Problem was in the call to the ontology server - Central was not passing the relationship type that the ontology server was supposed to traverse, so it traversed down the HASA relationship first and hit root early.

moby-live/Perl/MOBY Central.pm,1.208,1.209 OntologyServer.pm,1.82,1.83
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -r1.208 -r1.209
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/08/24 15:45:27	1.208
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/08/30 14:52:15	1.209
@@ -2939,7 +2939,12 @@
 	$ontology ||= "service"; # if we have now succeeded and haven't already taken the ontology then it must be the service ontology
 	$debug && &_LOG("Ontology was $ontology; Term was $term\n");
 	my $OS = MOBY::OntologyServer->new( ontology => $ontology );
-	my %rels = %{ $OS->Relationships( term => $term, expand => $expand_relationship )};    # %rels = $rels{relationship} = [lsid, lsid,lsid]
+	my %rels = %{ $OS->Relationships(
+					 term => $term,
+					 expand => $expand_relationship,
+					 relationship => 'urn:lsid:biomoby.org:objectrelation:isa',
+					 direction => 'root'
+					 )};    # %rels = $rels{relationship} = [lsid, lsid,lsid]
 	my $response = "<Relationships>\n";
 	my $OSrel    = MOBY::OntologyServer->new( ontology => 'relationship' );
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2005/08/29 22:36:32	1.82
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2005/08/30 14:52:15	1.83
@@ -1065,7 +1065,10 @@
 	return $id;
 }
 
-=head2 getNamespaceURI
+=head2 getRelationshipURI
+
+consumes ontology (object/service)
+consumes relationship term as term or LSID
 
 =cut
 
@@ -1125,8 +1128,14 @@
 	# convert $term into an LSID if it isn't already
 	if ( $ontology eq 'service' ) {
 		$term = $self->getServiceURI($term);
+		$relationship ||="isa";
+		my $OS = MOBY::OntologyServer->new(ontology => 'relationship');
+		$relationship = $OS->getRelationshipURI("service", $relationship);
 	} elsif ( $ontology eq 'object' ) {
 		$term = $self->getObjectURI($term);
+		$relationship ||="isa";
+		my $OS = MOBY::OntologyServer->new(ontology => 'relationship');
+		$relationship = $OS->getRelationshipURI("object", $relationship);
 	}
 	my %results;
 	while (    ( $term ne 'urn:lsid:biomoby.org:objectclass:Object' )




More information about the MOBY-guts mailing list