[MOBY-guts] biomoby commit
Dirk Haase
d.haase at dev.open-bio.org
Tue Jan 30 14:37:44 UTC 2007
d.haase
Tue Jan 30 09:37:44 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv1743
Modified Files:
Central.pm
Log Message:
Added optional argument 'direction' to allow for querying 'leaves' direction. Also extended the query XML by new tag <direction>.
moby-live/Perl/MOBY/Client Central.pm,1.142,1.143
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2007/01/30 00:32:54 1.142
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2007/01/30 14:37:44 1.143
@@ -1723,6 +1723,7 @@
Relationships => \@relationship_types (optional, 'all' if parameter is missing)
Registry => $registry_name (optional)
expandRelationships => [1/0] (optional)
+ direction => ['root'/'leaves'] (optional)
=cut
@@ -1733,6 +1734,9 @@
my $expand = $args{'expandRelationships'};
$expand = $args{'expandRelationship'}
unless defined($expand); # be forgiving of typos
+ my $direction = $args{'direction'} ?
+ $args{'direction'} :
+ 'root'; # make 'root' default to stay compatible
my @relationships;
@relationships = @{ $args{'Relationships'} }
if ( $args{'Relationships'}
@@ -1751,6 +1755,7 @@
$m .= "<relationshipType>$_</relationshipType>\n";
}
$m .= "<expandRelationship>1</expandRelationship>\n" if $expand;
+ $m .= "<direction>$direction</direction>\n";
$m .= "</Relationships>";
$reg = $reg ? $reg : $self->default_MOBY_servername;
return undef unless ( $self->Connection($reg) );
@@ -1766,6 +1771,7 @@
$m .= "<relationshipType>$_</relationshipType>\n";
}
$m .= "<expandRelationship>1</expandRelationship>\n" if $expand;
+ $m .= "<direction>$direction</direction>\n";
$m .= "</Relationships>";
$reg = $reg ? $reg : $self->default_MOBY_servername;
return undef unless ( $self->Connection($reg) );
@@ -1776,7 +1782,6 @@
return &_relationshipsPayload($payload);
}
-
sub _relationshipsPayload {
my ($payload) = @_;
return undef unless $payload;
More information about the MOBY-guts
mailing list