[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Wed Mar 16 19:14:15 UTC 2005


mwilkinson
Wed Mar 16 14:14:15 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv10100/MOBY

Modified Files:
	Central.pm 
Log Message:
should correctly parse out the secondary parameter details without absurd restrictions.

moby-live/Perl/MOBY Central.pm,1.149,1.150
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/02/10 00:17:45	1.149
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/03/16 19:14:14	1.150
@@ -1542,29 +1542,28 @@
 		if ( $types->get_node( 1 ) ) {
 			foreach ( $types->get_node( 1 )->childNodes )
 			{    # should only ever be one!
-				( $_->nodeType == TEXT_NODE )
-				  && ( $datatype = $_->toString );
+				( $_->nodeType == TEXT_NODE ) && ( $datatype .= $_->nodeValue );
 			}
 		}
 		my $defs = $parameter->getElementsByTagName( 'default' );
 		if ( $defs->get_node( 1 ) ) {
 			foreach ( $defs->get_node( 1 )->childNodes )
 			{    # should only ever be one!
-				( $_->nodeType == TEXT_NODE ) && ( $def = $_->toString );
+				( $_->nodeType == TEXT_NODE ) && ( $def .= $_->nodeValue );
 			}
 		}
 		my $maxs = $parameter->getElementsByTagName( 'max' );
 		if ( $maxs->get_node( 1 ) ) {
 			foreach ( $maxs->get_node( 1 )->childNodes )
 			{    # should only ever be one!
-				( $_->nodeType == TEXT_NODE ) && ( $max = $_->toString );
+				( $_->nodeType == TEXT_NODE ) && ( $max .= $_->nodeValue );
 			}
 		}
 		my $mins = $parameter->getElementsByTagName( 'min' );
 		if ( $mins->get_node( 1 ) ) {
 			foreach ( $mins->get_node( 1 )->childNodes )
 			{    # should only ever be one!
-				( $_->nodeType == TEXT_NODE ) && ( $min = $_->toString );
+				( $_->nodeType == TEXT_NODE ) && ( $min .= $_->nodeValue );
 			}
 		}
 		my $enums    = $parameter->getElementsByTagName( 'enum' );
@@ -1573,11 +1572,15 @@
 			foreach ( $enums->get_node( $n )->childNodes )
 			{    # should only ever be one!
 				( $_->nodeType == TEXT_NODE )
-				  && ( push @enums, $_->toString );
+				  && ( push @enums, $_->nodeValue );
 			}
 		}
 		my $enum_string = join "", ( map { $_ . "," } @enums );
 		chop $enum_string;    # get rid of trailing comma
+        $datatype =~ s/^\s+//; $datatype =~ s/\s+$//;
+        $def =~ s/^\s+//; $def =~ s/\s+$//;
+        $max =~ s/^\s+//; $max =~ s/\s+$//;
+        $min =~ s/^\s+//; $min =~ s/\s+$//;
 		my $sec = $SVC->add_secondary_input(
 											 default_value => $def,
 											 maximum_value => $max,




More information about the MOBY-guts mailing list