[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Thu Jul 10 04:41:25 UTC 2003
mwilkinson
Thu Jul 10 00:41:25 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv2182/Perl/MOBY
Modified Files:
Central.pm
Log Message:
XML::DOM can't deal with namespaced XML, so it is necessary to explicitly remove the namespace portion of a tagname. The downside is that MOBYCentral now assumes that all objects are moby objects, which isn't very nice... anyway, this may solve the problem of object expansion for the moment and allow discovery of services by 1' level decomposition of the object
moby-live/Perl/MOBY Central.pm,1.93,1.94
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/07/09 22:16:47 1.93
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/07/10 04:41:25 1.94
@@ -1428,6 +1428,7 @@
}
if ($findme{serviceType}){
my $OS = MOBY::OntologyServer->new(ontology => 'service');
+ $findme{serviceType} =~ s/^moby\://;
my ($exists, $message, $URI) = $OS->serviceExists(term =>$findme{serviceType});
unless ($exists){
return &_serviceListResponse($dbh,undef);
@@ -1437,7 +1438,7 @@
my $children_string = "'$URI',";
if ($findme{'expandServices'}){
- $debug && _LOG("Expanding Objects\n");
+ $debug && _LOG("Expanding Services\n");
my $OS = MOBY::OntologyServer->new(ontology => 'service');
my %relationships = %{$OS->traverseDAG($URI, "leaves")};
my (@children) = @{$relationships{'urn:lsid:biomoby.org:servicerelation:isa'}};
@@ -1739,13 +1740,14 @@
}
my $x = $DOM->getElementsByTagName("objectType");
my $objectname;
- my @child = $x->item(0)->getChildNodes;
- foreach (@child){
- $debug && &_LOG ($_->getNodeTypeName, "\t", $_->toString,"\n");
+ my @child = $x->item(0)->getChildNodes;
+ foreach (@child){
+ $debug && &_LOG ($_->getNodeTypeName, "\t", $_->toString,"\n");
next unless ($_->getNodeType == TEXT_NODE);
my $name = $_->toString; chomp $name;
$objectname = $name;
- }
+ }
+ $objectname =~ s/^moby\://; # damn XML DOM can't deal with namespaces... so get rid of it if it exists, though this is going to limit us to only MOBY objects again :-(
my $OS= MOBY::OntologyServer->new(ontology => 'object');
my ($exists, $message, $objectURI) = $OS->objectExists(term => $objectname);
return (undef, []) unless $objectURI;
More information about the MOBY-guts
mailing list