[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Mon Mar 31 18:04:47 UTC 2008
kawas
Mon Mar 31 14:04:47 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv1155
Modified Files:
GenServices.pm
Log Message:
added initial support for namespace checking.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators GenServices.pm,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/02/21 00:12:56 1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/03/31 18:04:47 1.4
@@ -212,11 +212,25 @@
$input_paths{$main_name} = $self->_tree2paths ($tree);
}
# print MOSES::MOBY::Base->toString (\%input_paths);
-
# create implementation specific object
my $impl = {
package => ($args{impl_prefix} || 'Service') . '::' . $name,
};
+ my @input_ns = ();
+ foreach my $in (@{ $obj->inputs }) {
+
+ if (ref ($in) eq 'MOSES::MOBY::Def::PrimaryDataSimple') {
+ foreach my $ns ( @{$in->namespaces} ) {
+ push @input_ns, $ns->name;
+ }
+ } else {
+ foreach my $sim (@{ $in->elements }) {
+ foreach my $ns ( @{$sim->namespaces} ) {
+ push @input_ns, $ns->name;
+ }
+ }
+ }
+ }
if ($args{outcode}) {
$tt->process ( $input, { base => $obj,
impl => $impl,
@@ -224,6 +238,7 @@
get_children => $ref_sub_get_children,
ref => $ref_sub_ref,
input_paths => \%input_paths,
+ input_ns =>,\@input_ns,
},
$args{outcode} ) || $LOG->logdie ($tt->error());
} else {
@@ -244,6 +259,7 @@
get_children => $ref_sub_get_children,
ref => $ref_sub_ref,
input_paths => \%input_paths,
+ input_ns => \@input_ns,
},
$outfile ) || $LOG->logdie ($tt->error());
$LOG->info ("Created $outfile\n");
More information about the MOBY-guts
mailing list