[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Aug 28 14:40:45 UTC 2009


kawas
Fri Aug 28 10:40:44 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv17884/MOBY-Server/lib/MOBY

Modified Files:
	Central.pm 
Log Message:
updated the regex expressions that checks the term names when registering new nodes in the ontology.
moby-live/Perl/MOBY-Server/lib/MOBY Central.pm,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm	2009/08/28 14:19:38	1.11
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm	2009/08/28 14:40:44	1.12
@@ -318,7 +318,7 @@
 	return &_error("Object name may not contain spaces or other characters invalid in a URN",
 		""
 	  )
-	  if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+	  if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
 	if ( $term =~ m"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" )
 	{    # matches a URI
 		return &_error( "Object name may not be an URN or URI", "" ) if $1;
@@ -742,7 +742,7 @@
 	 return &_error("serviceType name may not contain spaces or other characters invalid in a URN",
 		""
 	  )
-	  if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+	  if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
 
 	# validate that the final ontology will be valid
 	my ( $exists, $exists_message, $existingURI ) =
@@ -1006,7 +1006,7 @@
 	return &_error("Namespace name may not contain spaces or other characters invalid in a URN",
 		""
 	)
-	  if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+	  if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
 	return &_error( "Malformed authURI - must not have an http:// prefix", "" )
 	  if $auth =~ '[/:]';
 	return &_error( "Malformed authURI - must take the form NNN.NNN.NNN", "" )
@@ -1404,7 +1404,7 @@
 	$error .= "missing serviceType \n" unless defined $serviceType;
 	$error .= "invalid character string for serviceName.  Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^[^A-Za-z]/);
 	$error .= "invalid character string for serviceName.  Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^.+?[^A-Za-z0-9_]/);
-	$error .= "service name may not contain spaces or other characters invalid in a URN" if $serviceName =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+	$error .= "service name may not contain spaces or other characters invalid in a URN" if $serviceName =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
 
 	#	$error .="missing signatureURL \n" unless defined $signatureURL;
 	$error .= "missing authURI \n"      unless defined $AuthURI;
@@ -2963,9 +2963,9 @@
 	<authURI>$def{authURI}</authURI>
 	<contactEmail>$def{contactEmail}</contactEmail>\n";
 	my %relationships = %{ $def{Relationships} };
-
-	while ( my ( $rel, $objdefs ) = each %relationships ) {
-		$response .= "<Relationship relationshipType='$rel'>\n";
+	
+    while ( my ( $rel, $objdefs ) = each %relationships ) {
+        $response .= "<Relationship relationshipType='$rel'>\n";
 		foreach my $def ( @{$objdefs} ) {
 			my ( $lsid, $articlename,$type, $def, $auth, $contac ) = @{$def};
 			$articlename = "" unless defined $articlename;




More information about the MOBY-guts mailing list