[MOBY-guts] biomoby commit

michael ng mng at pub.open-bio.org
Wed Aug 31 22:14:34 UTC 2005


mng
Wed Aug 31 18:14:34 EDT 2005
Update of /home/repository/moby/moby-live/Accessories
In directory pub.open-bio.org:/tmp/cvs-serv1295

Modified Files:
	code-generator0.6.cgi 
Log Message:
last updated version by michael ng with API 0.86 update

moby-live/Accessories code-generator0.6.cgi,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Accessories/code-generator0.6.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Accessories/code-generator0.6.cgi	2005/08/31 21:35:22	1.5
+++ /home/repository/moby/moby-live/Accessories/code-generator0.6.cgi	2005/08/31 22:14:34	1.6
@@ -157,6 +157,7 @@
 	  my $simORcollOutput = shift;
 	  my $outnameSpace = shift;
 	  my $nameOfarticle = shift;
+	  my $nameOfoutarticle = shift;
 
 	  #initialize variables
 	  $error_msg = "" if (!$error_msg);
@@ -175,6 +176,7 @@
 	  $simORcollOutput = "" if (!$simORcollOutput);
 	  $outnameSpace = "" if (!$outnameSpace);
 	  $nameOfarticle = "" if (!$nameOfarticle);
+	  $nameOfoutarticle = "" if (!$nameOfoutarticle);
        
 	  #$options is a list of objectNames use to display in a drop down menu
 	  my $options = $Central->retrieveObjectNames();
@@ -314,7 +316,7 @@
 	<input type="radio" name="genORcom" id="genORcom" value="complexInputParser"$genORcom_rad_com_sel>Objects with Secondary <A HREF="javascript:openHelp('withSecondary')">[?]</A><br>
 	<input type="radio" name="simORcollInput" id="simORcollInput" value="SIMPLE"$simORcollInput_rad_sim_sel>Simple <A HREF="javascript:openHelp('simple')">[?]</A>
 	<br>
-	<input name="nameOfarticle" type="nameOfarticle" id="" value="$nameOfarticle">Article Name of the Object<br>
+	<input name="nameOfarticle" type="nameOfarticle" id="nameOfarticle" value="$nameOfarticle">Article Name of the Object<br>
 	<select name="nameSpace" id="nameSpace">
 	$nameSpace_html
 	</select>
@@ -330,6 +332,7 @@
 	<input type="radio" name="simORcollOutput" id="simORcollOutput" value="SIMPLE"$simORcollOutput_rad_sim_sel>Simple <A HREF="javascript:openHelp('simple')">[?]</A>
 	<input type="radio" name="simORcollOutput" id="simORcollOutput" value="COLLECTION"$simORcollOutput_rad_coll_sel>Collection <A HREF="javascript:openHelp('collection')">[?]</A>
 	<br>
+	<input name="nameOfoutarticle" type="nameOfoutarticle" id="nameOfoutarticle" value="$nameOfoutarticle">Article Name of the Object<br>
 	<select name="outnameSpace" id="outnameSpace">
 	$outNS_html
 	</select>
@@ -432,6 +435,7 @@
     my $simORcollInput = $query->param("simORcollInput");
     my $simORcollOutput = $query->param("simORcollOutput");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
     my $parse_html = "";
 
 
@@ -452,11 +456,12 @@
 	$error_msg .= "Please provide the directory of your MOBY files<br>" if (!$directory);
 	$error_msg .= "Please select using SQL or an algorithm<br>" if (!$sqlORalgor_rad);
 	$error_msg .= "Please provide the article name of object<br>" if (!$nameOfarticle);
+	$error_msg .= "Please provide the article name of object<br>" if (!$nameOfoutarticle);
 
 	if ( $error_msg )
 	{
 	    #Returns users to original form
-	    webservice_properties($error_msg, $serviceType, $objectConsumed, $objectProduced, $nameSpace, $serviceName, $authURI, $sqlORalgor_rad, $contactEmail, $description, $directory, $genORcom, $simORcollInput, $simORcollOutput,$outnameSpace,$nameOfarticle);
+	    webservice_properties($error_msg, $serviceType, $objectConsumed, $objectProduced, $nameSpace, $serviceName, $authURI, $sqlORalgor_rad, $contactEmail, $description, $directory, $genORcom, $simORcollInput, $simORcollOutput,$outnameSpace,$nameOfarticle,$nameOfoutarticle);
 	}
 	elsif ($sqlORalgor_rad eq "sql")
 	{
@@ -735,6 +740,7 @@
 	    <input type="hidden" name="simORcollInput" value="$simORcollInput">
 	    <input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	    <input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	    <input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	    $parse_html
 	    </form>
 	    </body>
@@ -781,6 +787,7 @@
     my $simORcollInput = $query->param("simORcollInput");
     my $simORcollOutput = $query->param("simORcollOutput");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     #Build drop down list box for Database types
     my $dbType_html = "";
@@ -818,6 +825,7 @@
 	<input type="hidden" name="simORcollInput" value="$simORcollInput">
 	<input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 
 	<font color="FF000"> <b>$error_msg_sql</b></font>
 	<table width="50%" border="1" align="center">
@@ -908,6 +916,7 @@
     my $directory = $query->param("directory");
     my $outnameSpace = $query->param("outnameSpace");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     my $dbType = $query->param("dbType");
     my $dbInstance = $query->param("dbInstance");
@@ -985,6 +994,7 @@
 	    <input type="hidden" name="simORcollInput" value="$simORcollInput">
 	    <input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	    <input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	    <input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	    <br>
 	    <table width="40%" border="1">
 	    <tr>
@@ -1045,6 +1055,7 @@
     my $description = $query->param("description");
     my $directory = $query->param("directory");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     my $dbType = $query->param("dbType");
     my $dbInstance = $query->param("dbInstance");
@@ -1134,6 +1145,7 @@
 	    <input type="hidden" name="simORcollInput" value="$simORcollInput">
 	    <input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	    <input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	    <input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	    $parse_html
 
 	    <input type="hidden" name="column_length" value="$column_length">
@@ -1186,7 +1198,8 @@
     my $directory = $query->param("directory");
     my $outnameSpace = $query->param("outnameSpace");
     my $nameOfarticle = $query->param("nameOfarticle");
-    
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
+  
     #DataBase Properties
     my $dbType = $query->param("dbType");
     my $dbInstance = $query->param("dbInstance");
@@ -1226,7 +1239,6 @@
 	$temp2 = $query->param("inputobject_articles$s");
 	$parse_html .= "<input type=\"hidden\" name=\"InputParam$s\" value=\"$temp\">";
 	$parse_html .= "<input type=\"hidden\" name=\"inputobject_articles$s\" value=\"$temp2\">";
-	    
     }
 
     if($sqlORalgor_rad eq "sql")
@@ -1283,6 +1295,7 @@
 	    <input type="hidden" name="serviceName" value="$serviceName">
 	    <input type="hidden" name="authURI" value="$authURI">
 	    <input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	    <input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	    <input type="hidden" name="sqlORalgor_rad" value="$sqlORalgor_rad">
 	    <input type="hidden" name="outnameSpace" value="$outnameSpace">
 	    <input type="hidden" name="serviceCode" value="$serviceCode">
@@ -1392,6 +1405,7 @@
     my $password2 = $query->param("password2");
     my $prefixed = $query->param("prefixed");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     #Perl Modules still needs to be implemented.
     my $perlModules = $query->param("perlModules");
@@ -1692,7 +1706,8 @@
 	<input type="hidden" name="URL" value="$URL">
 	<input type="hidden" name="contactEmail" value="$contactEmail">
 	<input type="hidden" name="description" value="$description">
-	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">	    
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
     <h2>THE FOLLOWING IS THE PERL MODULE FOR YOUR SERVICE</h2>
   Confirm that the code below are correct, click on the 'Save Code As' button and save the perl module onto your server. Save the service as XXX.pm (where XXX is your service name).  Place the file in the same folder as the dispatcher.cgi.  Then click on the 'Register' button to register the service.<br>
   
@@ -1804,7 +1819,7 @@
     my $contactEmail = $query->param("contactEmail");
     my $description = $query->param("description");
     my $nameOfarticle = $query->param("nameOfarticle");
-
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     print <<HTML;
 
@@ -1843,7 +1858,7 @@
 			      category => "moby",
 			      URL => $URL, #site of the dispatcher
 			      input => [['$nameOfariticle',["$objectConsumed" => ["$nameSpace"]]],],
-			      output => [['',["$objectProduced" => ["$nameSpace"]]],],
+			      output => [['$nameOfoutarticle',["$objectProduced" => ["$nameSpace"]]],],
 			      );
   die "Bad return value from registerService" unless $reg;
   if ($reg->success == 1){
@@ -1911,6 +1926,7 @@
     my $simORcollInput = $query->param("simORcollInput");
     my $simORcollOutput = $query->param("simORcollOutput");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     my $UI_string = UI_template("2");
 javascript_functions();
@@ -1940,6 +1956,7 @@
 	<input type="hidden" name="simORcollInput" value="$simORcollInput">
 	<input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	<input type="radio" name="htmlORcom" id="htmlORcom" value="htmlWrapper">HTML Wrapper <A HREF="javascript:openHelp('HTMLWrapper')">[?]</A>
 	<input type="radio" name="htmlORcom" id="htmlORcom" value="CommandLine">Command Line <A HREF="javascript:openHelp('CommandLine_al')">[?]</A>
 	<hr>
@@ -1989,6 +2006,7 @@
     my $outnameSpace = $query->param("outnameSpace");
     my $serviceCode = $query->param("serviceCode");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     my $service_html ="";
     my $service_html2 ="";
@@ -2035,6 +2053,7 @@
 	<input type="hidden" name="simORcollInput" value="$simORcollInput">
 	<input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
         <input type="hidden" name="htmlORcom" value="$htmlORcom">
 	<table width="75%" border="1">
 	<tr>
@@ -2092,6 +2111,8 @@
     my $outnameSpace = $query->param("outnameSpace");
     my $serviceCode = $query->param("serviceCode");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
+
     my $comline = $ServiceURL;
 
     
@@ -2164,6 +2185,7 @@
 	<input type="hidden" name="InputParam" value="$InputParam">
 	<input type="hidden" name="outnameSpace" value="$outnameSpace">
 	<input type="hidden" name="comline" value="$comline">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	<p align="left">Please fill in the required fields</p>
 	<table width="75%" border="1">
 	<tr>
@@ -2219,6 +2241,7 @@
     my $outnameSpace = $query->param("outnameSpace");
     my $serviceCode = $query->param("serviceCode");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     my $object_articles_html="";
     my $temp="";
@@ -2278,6 +2301,7 @@
 	<input type="hidden" name="InputParam" value="$InputParam">
 	<input type="hidden" name="DV_count" value="$DV_count">
 	<input type="hidden" name="outnameSpace" value="$outnameSpace">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	$parse_html
 
 	<table width="75%" border="1">
@@ -2325,6 +2349,7 @@
     my $description = $query->param("description");
     my $directory = $query->param("directory");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
 
     #ADD IN HIDDEN INPUT TYPE IF THIS VARIABLE IS NEEDED
     #my $perlModules = $query->param("perlModules");
@@ -2412,6 +2437,7 @@
 	    <input type="hidden" name="simORcollOutput" value="$simORcollOutput">
 	    <input type="hidden" name="comline" value="$comline">
 	    <input type="hidden" name="htmlORcom" value="$htmlORcom">
+	    <input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	    $parse_html
 	    <br>
 	    <table width="40%" border="1">
@@ -2456,6 +2482,7 @@
     my $directory = $query->param("directory");
     my $outnameSpace = $query->param("outnameSpace");
     my $nameOfarticle = $query->param("nameOfarticle");
+    my $nameOfoutarticle = $query->param("nameOfoutarticle");
     
     #DataBase Properties
     my $dbType = $query->param("dbType");
@@ -2504,7 +2531,7 @@
 	push(@DV_list,$temp);
     }
 	$input_html .= "<tr><td width=\"45%\" height=\"28\">Input Parameters $temp:</td>
-		<td width=\"60%\">$temp2</td></tr>";
+		<td width=\"55%\">$temp2</td></tr>";
 	
     }
     
@@ -2512,24 +2539,24 @@
     if($sqlORalgor_rad eq "sql")
     {
 	
-	$service_html = qq{<table width="50%" border="1"><tr><td width="40%" height="28">DataBase Type:</td><td width="60%">$dbType</td></tr>
-			       <tr><td width="40%" height="28">DataBase Instance:</td><td width="60%">$dbInstance</td></tr> 
-			       <tr><td width="40%" height="28">Host Port:</td><td width="60%">$host_port</td></tr>
-			       <tr><td width="40%" height="28">UserName:</td><td width="60%">$username</td></tr>
-			       <tr><td width="40%" height="28">Password 1:</td><td width="60%">$password1</td></tr>
-			       <tr><td width="40%" height="28">Passowrd 2:</td><td width="60%">$password2</td></tr>
-			       <tr><td width="40%" height="28">Namespace Prefixed:</td><td width="60%">$prefixed</td></tr>
-			       <tr><td width="40%" height="28">SQL Query:</td><td width="60%">$serviceCode</td></tr>
+	$service_html = qq{<table width="50%" border="1"><tr><td width="45%" height="28">DataBase Type:</td><td width="55%">$dbType</td></tr>
+			       <tr><td width="45%" height="28">DataBase Instance:</td><td width="55%">$dbInstance</td></tr> 
+			       <tr><td width="45%" height="28">Host Port:</td><td width="55%">$host_port</td></tr>
+			       <tr><td width="45%" height="28">UserName:</td><td width="55%">$username</td></tr>
+			       <tr><td width="45%" height="28">Password 1:</td><td width="55%">$password1</td></tr>
+			       <tr><td width="45%" height="28">Passowrd 2:</td><td width="55%">$password2</td></tr>
+			       <tr><td width="45%" height="28">Namespace Prefixed:</td><td width="55%">$prefixed</td></tr>
+			       <tr><td width="45%" height="28">SQL Query:</td><td width="55%">$serviceCode</td></tr>
 			       </table>};
 
     #Print out all the Output Columns with the associated MOBY Articles	
-	$Outmapping_html = "<table width=\"50%\" border=\"1\"><tr><td width=\"40%\" height=\"28\">Number of output Column :</td>
-		<td width=\"60%\">$column_length</td></tr>";
+	$Outmapping_html = "<table width=\"50%\" border=\"1\"><tr><td width=\"45%\" height=\"28\">Number of output Column :</td>
+		<td width=\"55%\">$column_length</td></tr>";
 	
 	for(my $s=0; $s<$column_length;$s++){
 	    $temp2 = $query->param("outputobject_articles$s");
-	    $Outmapping_html .= "<tr><td width=\"40%\" height=\"28\">Output Column :</td>
-		<td width=\"60%\">$temp2</td></tr>";
+	    $Outmapping_html .= "<tr><td width=\"45%\" height=\"28\">Output Column :</td>
+		<td width=\"55%\">$temp2</td></tr>";
 	    $parse_html .= "<input type=\"hidden\" name=\"outputobject_articles$s\" value=\"$temp2\">";
 	    
 	}
@@ -2541,9 +2568,9 @@
 	#print out the HTMLWrapper Properties
         if($htmlORcom eq "htmlWrapper"){
 	    
-	    $service_html = qq{<table width="50%" border="1"><tr><td width="40%" height="28">Service URL:</td><td width="60%">$ServiceURL</td></tr></table>};
-	    $DV_html = "<table width=\"50%\" border=\"1\"><tr><td width=\"40%\" height=\"28\">Number of Default Input :</td>
-		<td width=\"60%\">$DV_count</td></tr>";
+	    $service_html = qq{<table width="50%" border="1"><tr><td width="45%" height="28">Service URL:</td><td width="55%">$ServiceURL</td></tr></table>};
+	    $DV_html = "<table width=\"50%\" border=\"1\"><tr><td width=\"45%\" height=\"28\">Number of Default Input :</td>
+		<td width=\"55%\">$DV_count</td></tr>";
 	    
 	    #print out the Default Values 
 	    for(my $i=1;$i <= $DV_count;$i++){
@@ -2553,18 +2580,18 @@
 		$parse_html .= "<input type=\"hidden\" name=\"DValue$i\" value=\"$temp2\">";
 		
 		$temp = $DV_list[$s];
-	        $DV_html .= "<tr><td width=\"40%\" height=\"28\"> $temp :</td>
-		<td width=\"60%\">$temp2</td></tr>";
+	        $DV_html .= "<tr><td width=\"45%\" height=\"28\"> $temp :</td>
+		<td width=\"55%\">$temp2</td></tr>";
 	    }
 	}
 
 	else{
-	    $service_html = qq{<table width="50%" border="1"><tr><td width="40%" height="28">Command Line:</td><td width="60%">$comline</td></tr></table>};
+	    $service_html = qq{<table width="50%" border="1"><tr><td width="45%" height="28">Command Line:</td><td width="55%">$comline</td></tr></table>};
 	}
 	$temp2 = $query->param("outputobject_articles0");
 	$parse_html .= "<input type=\"hidden\" name=\"outputobject_articles0\" value=\"$temp2\">";
-	$Outmapping_html =  "<table width=\"50%\" border=\"1\"><tr><td width=\"40%\" height=\"28\">Output Article :</td>
-		<td width=\"60%\">$temp2</td></tr>";
+	$Outmapping_html =  "<table width=\"50%\" border=\"1\"><tr><td width=\"45%\" height=\"28\">Output Article :</td>
+		<td width=\"55%\">$temp2</td></tr>";
     }
     my $UI_string = UI_template("3");
     
@@ -2589,6 +2616,7 @@
 	<input type="hidden" name="description" value="$description">
 	<input type="hidden" name="directory" value="$directory">
 	<input type="hidden" name="nameOfarticle" value="$nameOfarticle">
+	<input type="hidden" name="nameOfoutarticle" value="$nameOfoutarticle">
 	<input type="hidden" name="dbType" value="$dbType">
 	<input type="hidden" name="dbInstance" value="$dbInstance">
 	<input type="hidden" name="host_port" value="$host_port">
@@ -2616,8 +2644,9 @@
 	<tr><td width="40%" height="28">Input Namespace:</td><td width="60%">$nameSpace</td></tr>
 	<tr><td width="40%" height="28">Article Name of Object:</td><td width="60%">$nameOfarticle</td></tr>
 	<tr><td width="40%" height="28">Simple or Collection (Input):</td><td width="60%">$simORcollInput</td></tr> 
-	<tr><td width="40%" height="28">Object Produced:</td><td width="60%">$objectConsumed</td></tr>
+	<tr><td width="40%" height="28">Object Produced:</td><td width="60%">$objectProduced</td></tr>
 	<tr><td width="40%" height="28">Output Namespace:</td><td width="60%">$outnameSpace</td></tr>
+	<tr><td width="40%" height="28">Article Name of output Object:</td><td width="60%">$nameOfoutarticle</td></tr>
 	<tr><td width="40%" height="28">Simple or Collection (Output):</td><td width="60%">$simORcollOutput</td></tr> 
 	<tr><td width="40%" height="28">Authority URI:</td><td width="60%">$authURI</td></tr> 
 	<tr><td width="40%" height="28">Contact Email:</td><td width="60%">$contactEmail</td></tr>




More information about the MOBY-guts mailing list