cvs: presentations /slides/mdb rest_service.xml soap_api.xml soap_service.xml test_api_metallopdb.xml test_api_sql.xml test_soap.xml xmlrpc_api.xml
xmlrpc_method_metallopdb.xml xmlrpc_method_sql.xml xmlrpc_service.xml /slides/mdb/output introspection_api_out.html test_api_sql_out.html
xmlrpc_method_metallopdb_out.html xmlrpc_method_sql_out.html

From: Date: Fri, 01 Aug 2003 19:48:48 +0000
Subject: cvs: presentations /slides/mdb rest_service.xml soap_api.xml soap_service.xml test_api_metallopdb.xml test_api_sql.xml test_soap.xml xmlrpc_api.xml
xmlrpc_method_metallopdb.xml xmlrpc_method_sql.xml xmlrpc_service.xml /slides/mdb/output introspection_api_out.html test_api_sql_out.html
xmlrpc_method_metallopdb_out.html xmlrpc_method_sql_out.html
Groups: php.pres 
Request: Send a blank email to pres+get-813@lists.php.net to get a copy of this message
jmcastagnetto Fri Aug 1 15:48:48 2003 EDT Modified files: /presentations/slides/mdb rest_service.xml soap_api.xml soap_service.xml test_api_metallopdb.xml test_api_sql.xml test_soap.xml xmlrpc_api.xml xmlrpc_method_metallopdb.xml xmlrpc_method_sql.xml xmlrpc_service.xml /presentations/slides/mdb/output introspection_api_out.html test_api_sql_out.html xmlrpc_method_metallopdb_out.html xmlrpc_method_sql_out.html Log: Changed slides to show local output, instead of executing remote calls

Index: presentations/slides/mdb/rest_service.xml diff -u presentations/slides/mdb/rest_service.xml:1.1 presentations/slides/mdb/rest_service.xml:1.2 --- presentations/slides/mdb/rest_service.xml:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/rest_service.xml Fri Aug 1 15:48:48 2003 @@ -1,4 +1,4 @@ -<slide title='REST (HTTP-based) Service'> +<slide title='REST Service'> <list title='Available functions'> <bullet> _sql_ : accepts a (url encoded) SQL query, and an optional @@ -10,5 +10,5 @@ </bullet> </list> <example title='Introspection' type='html' result='0' align='center' -filename='output/introspection_api_out.html'/> + fontsize='1.5em' filename='output/introspection_api_out.html' examplebackground='#ffffdd' /> </slide> Index: presentations/slides/mdb/soap_api.xml diff -u presentations/slides/mdb/soap_api.xml:1.2 presentations/slides/mdb/soap_api.xml:1.3 --- presentations/slides/mdb/soap_api.xml:1.2 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/soap_api.xml Fri Aug 1 15:48:48 2003 @@ -1,4 +1,4 @@ -<slide title='SOAP service'> +<slide title='SOAP server'> <example title='Server created using PEAR::SOAP' fontsize='1.2em'> <![CDATA[<?php require_once 'globals.inc'; @@ -11,55 +11,55 @@ class MDB_SOAP_Services { - var $method_namespace = ''; - var $dispatch_map = array(); + var $method_namespace = ''; + var $dispatch_map = array(); - function MDB_SOAP_Services() { - $this->method_namespace = 'urn:MDB_SOAP_Server'; - } - - function sql($query) { - if (!eregi("^(select|show|describe)", $query)) { - trigger_error('Invalid query. Only SELECT, SHOW '. - 'and DESCRIBE allowed', E_USER_ERROR); - } - $db = $GLOBALS['dsn'].$GLOBALS['datadb']; - $result = @sqlquery($db, $query, false); - if (is_object($result) && PEAR::isError($result)) { - trigger_error($result->getMessage(), E_USER_ERROR); - } else { - return new SOAP_Value('result','Struct', $result); - } - } - - function metallopdb($metal, $mode, $count) { - return $this->_dometallopdb($metal, $mode, $count); - } - - function rssmetallopdb($metal, $mode, $count) { - return $this->_dometallopdb($metal, $mode, $count, true); - } - - function _dometallopdb($metal, $mode, $count, $rss=false) { - $count = intval($count); - if ($count <= 0) { - trigger_error("Parameter count must be an ". - "integer > 0, value sent: $count", E_USER_ERROR); - } - $result = @getPDBFromMetal($metal, $mode, $count); - if (is_object($result) && DB::isError($result)) { - trigger_error($result->getMessage(), E_USER_ERROR); - } elseif ($result == false) { - trigger_error('No results were found', E_USER_WARNING); - } else { - if ($rss) { - $pkt = toRSS(&$result); - return new SOAP_Value('result','base64', base64_encode($pkt)); - } else { - return new SOAP_Value('result','Struct', $result); - } - } - } + function MDB_SOAP_Services() { + $this->method_namespace = 'urn:MDB_SOAP_Server'; + } + + function sql($query) { + if (!eregi("^(select|show|describe)", $query)) { + trigger_error('Invalid query. Only SELECT, SHOW '. + 'and DESCRIBE allowed', E_USER_ERROR); + } + $db = $GLOBALS['dsn'].$GLOBALS['datadb']; + $result = @sqlquery($db, $query, false); + if (is_object($result) && PEAR::isError($result)) { + trigger_error($result->getMessage(), E_USER_ERROR); + } else { + return new SOAP_Value('result','Struct', $result); + } + } + + function metallopdb($metal, $mode, $count) { + return $this->_dometallopdb($metal, $mode, $count); + } + + function rssmetallopdb($metal, $mode, $count) { + return $this->_dometallopdb($metal, $mode, $count, true); + } + + function _dometallopdb($metal, $mode, $count, $rss=false) { + $count = intval($count); + if ($count <= 0) { + trigger_error("Parameter count must be an ". + "integer > 0, value sent: $count", E_USER_ERROR); + } + $result = @getPDBFromMetal($metal, $mode, $count); + if (is_object($result) && DB::isError($result)) { + trigger_error($result->getMessage(), E_USER_ERROR); + } elseif ($result == false) { + trigger_error('No results were found', E_USER_WARNING); + } else { + if ($rss) { + $pkt = toRSS(&$result); + return new SOAP_Value('result','base64', base64_encode($pkt)); + } else { + return new SOAP_Value('result','Struct', $result); + } + } + } } Index: presentations/slides/mdb/soap_service.xml diff -u presentations/slides/mdb/soap_service.xml:1.1 presentations/slides/mdb/soap_service.xml:1.2 --- presentations/slides/mdb/soap_service.xml:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/soap_service.xml Fri Aug 1 15:48:48 2003 @@ -7,6 +7,6 @@ formated as an RSS document</bullet> </list> <example title='Using the methods sql, metallopdb and rssmetallopdb' - type='html' align='center' - result='0' fontsize='1.2em' filename='output/test_soap_out.html'/> + type='html' align='center' examplebackground='#ffffdd' + result='0' fontsize='1.5em' filename='output/test_soap_out.html'/> </slide> Index: presentations/slides/mdb/test_api_metallopdb.xml diff -u presentations/slides/mdb/test_api_metallopdb.xml:1.3 presentations/slides/mdb/test_api_metallopdb.xml:1.4 --- presentations/slides/mdb/test_api_metallopdb.xml:1.3 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/test_api_metallopdb.xml Fri Aug 1 15:48:48 2003 @@ -1,7 +1,8 @@ <slide title='Testing: metallopdb()'> -<example type='php' result='1' fontsize='1.5em' - rfontsize='1em' +<example type='php' result='0' fontsize='1.5em' rfontsize='1em' marginright='1em' marginleft='1em' width='95%' filename='scripts/test_api_metallopdb.php' title='Using the metallopdb() function'/> +<example title='Output' type='html' filename='output/test_api_metallopdb_out.html' + fontsize='1em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/test_api_sql.xml diff -u presentations/slides/mdb/test_api_sql.xml:1.4 presentations/slides/mdb/test_api_sql.xml:1.5 --- presentations/slides/mdb/test_api_sql.xml:1.4 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/test_api_sql.xml Fri Aug 1 15:48:48 2003 @@ -1,6 +1,8 @@ <slide title='Testing: sql()'> -<example type='php' result='1' fontsize='1.5em' +<example type='php' result='0' fontsize='1.5em' marginright='1em' marginleft='1em' width='95%' filename='scripts/test_api_sql.php' title='Using the sql() function'/> +<example title='Output' type='html' filename='output/test_api_sql_out.html' + fontsize='1.2em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/test_soap.xml diff -u presentations/slides/mdb/test_soap.xml:1.2 presentations/slides/mdb/test_soap.xml:1.3 --- presentations/slides/mdb/test_soap.xml:1.2 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/test_soap.xml Fri Aug 1 15:48:48 2003 @@ -1,7 +1,6 @@ <slide title='Test SOAP'> <example title='Using the methods sql, metallopdb and rssmetallopdb' -result='1' rfontsize='1.2em' fontsize='1.2em' -outputbackground='#ffffdd'> + result='0' fontsize='1.2em'> <![CDATA[ <?php require_once 'SOAP/Client.php'; @@ -12,23 +11,23 @@ $c = new SOAP_Client($url); function niceOut($obj) { - echo "<table border='1'>\n<tr>\n<td bgcolor='#eeeeee'>\n"; - print_rec($obj); - echo "\n</td>\n</tr>\n</table>\n"; + echo "<table border='1'>\n<tr>\n<td bgcolor='#eeeeee'>\n"; + print_rec($obj); + echo "\n</td>\n</tr>\n</table>\n"; } function print_rec($obj) { - if (is_string($obj)) { - echo "<pre>\n$obj\n</pre>\n"; - } else { - foreach ($obj as $key=>$val) { - if (is_array($val) || is_object($val)) { - echo "<b>$key</b>:\n".print_rec($val)."<br>\n"; - } else { - echo "<b>$key</b>: $val<br>\n"; - } - } - } + if (is_string($obj)) { + echo "<pre>\n$obj\n</pre>\n"; + } else { + foreach ($obj as $key=>$val) { + if (is_array($val) || is_object($val)) { + echo "<b>$key</b>:\n".print_rec($val)."<br>\n"; + } else { + echo "<b>$key</b>: $val<br>\n"; + } + } + } } ?> @@ -44,7 +43,7 @@ <?php $ret = $c->call('metallopdb',array('metal'=>'zn', 'mode'=>'first','count'=>-3),$ns); if (PEAR::isError($ret)) - echo "<br><b>OOPS we got an error</b>\n"; + echo "<br><b>OOPS we got an error</b>\n"; niceOut($ret); ?> <hr> @@ -64,4 +63,6 @@ ?> ]]> </example> +<example title='Output' type='html' filename='output/test_soap_out.html' + fontsize='1.5em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/xmlrpc_api.xml diff -u presentations/slides/mdb/xmlrpc_api.xml:1.4 presentations/slides/mdb/xmlrpc_api.xml:1.5 --- presentations/slides/mdb/xmlrpc_api.xml:1.4 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/xmlrpc_api.xml Fri Aug 1 15:48:48 2003 @@ -1,5 +1,5 @@ <slide title='XML-RPC Instrospection'> -<example type='php' result='1' fontsize='1.0em' rfontsize='1.0em' +<example type='php' result='0' fontsize='1.0em' rfontsize='1.0em' outputbackground='#ffffdd'> <![CDATA[ <?php @@ -14,52 +14,54 @@ print "<h2>Methods available at http://" . $c->server . ":" . $c->port . $c->path . "</h2>\n"; if ($v) { - - for($i=0; $i<$v->arraysize(); $i++) { - $mname=$v->arraymem($i); - print "<hr noshade size=1><H3>" . $mname->scalarval() . "</H3>\n"; - $f=new XML_RPC_Message('system.methodHelp'); - $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); - $w=rpc_call($c, $f); - if ($w) { - $txt=$w->scalarval(); - if ($txt!="") { - print "<H4>Documentation</H4><P style='font-size: 1.0em;'>${txt}</P>\n"; - } else { - print "<P>No documentation available.</P>\n"; - } - } - $f=new XML_RPC_Message('system.methodSignature'); - $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); - $w=rpc_call($c, $f); - if ($w) { - print "<H4>Signature</H4><P style='font-size: 1.0em;'>\n"; - if ($w->kindOf()=="array") { - for($j=0; $j<$w->arraysize(); $j++) { - $x=$w->arraymem($j); - $ret=$x->arraymem(0); - print "<CODE style='font-size: 1.0em;'>" . $ret->scalarval() . " " . - $mname->scalarval() ."("; - if ($x->arraysize()>1) { - for($k=1; $k<$x->arraysize(); $k++) { - $y=$x->arraymem($k); - print $y->scalarval(); - if ($k<$x->arraysize()-1) { - print ", "; - } - } - } - print ")</CODE><BR>\n"; - } - } else { - print "Signature unknown\n"; - } - print "</P>\n"; - } - } + + for($i=0; $i<$v->arraysize(); $i++) { + $mname=$v->arraymem($i); + print "<hr noshade size=1><H3>" . $mname->scalarval() . "</H3>\n"; + $f=new XML_RPC_Message('system.methodHelp'); + $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); + $w=rpc_call($c, $f); + if ($w) { + $txt=$w->scalarval(); + if ($txt!="") { + print "<H4>Documentation</H4><P style='font-size: 1.0em;'>${txt}</P>\n"; + } else { + print "<P>No documentation available.</P>\n"; + } + } + $f=new XML_RPC_Message('system.methodSignature'); + $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); + $w=rpc_call($c, $f); + if ($w) { + print "<H4>Signature</H4><P style='font-size: 1.0em;'>\n"; + if ($w->kindOf()=="array") { + for($j=0; $j<$w->arraysize(); $j++) { + $x=$w->arraymem($j); + $ret=$x->arraymem(0); + print "<CODE style='font-size: 1.0em;'>" . $ret->scalarval() . " " . + $mname->scalarval() ."("; + if ($x->arraysize()>1) { + for($k=1; $k<$x->arraysize(); $k++) { + $y=$x->arraymem($k); + print $y->scalarval(); + if ($k<$x->arraysize()-1) { + print ", "; + } + } + } + print ")</CODE><BR>\n"; + } + } else { + print "Signature unknown\n"; + } + print "</P>\n"; + } + } } ?> ]]> </example> +<example title='Output' type='html' filename='output/xmlrpc_api_out.html' + fontsize='1em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/xmlrpc_method_metallopdb.xml diff -u presentations/slides/mdb/xmlrpc_method_metallopdb.xml:1.4 presentations/slides/mdb/xmlrpc_method_metallopdb.xml:1.5 --- presentations/slides/mdb/xmlrpc_method_metallopdb.xml:1.4 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/xmlrpc_method_metallopdb.xml Fri Aug 1 15:48:48 2003 @@ -1,6 +1,6 @@ <slide title='method.metallopdb'> -<example title='Using method.metallopdb from the XML-RPC service' result='1' -fontsize='1.0em' rfontsize='1.5em' outputbackground='#ffffdd'> +<example title='Using method.metallopdb from the XML-RPC service' result='0' + fontsize='1.0em'> <![CDATA[ <?php error_reporting(1); @@ -17,19 +17,21 @@ $method = 'method.metallopdb'; $fmt = "<h3>Parameters: metal='%s', mode='%s', count=%d, format='%s'</h3>"; printf($fmt, $metal->scalarval(), $mode->scalarval(), - $count->scalarval(), $format->scalarval()); + $count->scalarval(), $format->scalarval()); $msg = new XML_RPC_Message($method, array($metal, $mode, $count, $format)); $r = $c->send($msg); $v = $r->value(); if (!$r->faultCode()) { - echo toTable2(XML_RPC_decode($v)); + echo toTable2(XML_RPC_decode($v)); } else { - echo "<pre>\n"; - echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); - echo "</pre>\n"; + echo "<pre>\n"; + echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); + echo "</pre>\n"; } ?> ]]> </example> +<example title='Output' type='html' filename='output/xmlrpc_method_metallopdb_out.html' + fontsize='1.5em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/xmlrpc_method_sql.xml diff -u presentations/slides/mdb/xmlrpc_method_sql.xml:1.4 presentations/slides/mdb/xmlrpc_method_sql.xml:1.5 --- presentations/slides/mdb/xmlrpc_method_sql.xml:1.4 Fri Feb 7 14:35:10 2003 +++ presentations/slides/mdb/xmlrpc_method_sql.xml Fri Aug 1 15:48:48 2003 @@ -1,5 +1,5 @@ <slide title='method.sql'> -<example title='Using method.sql from the XML-RPC service' result='1' +<example title='Using method.sql from the XML-RPC service' result='0' fontsize='1.2em' rfontsize='1em' outputbackground='#ffffdd'> <![CDATA[<?php require_once "XML/RPC.php"; @@ -20,14 +20,16 @@ $c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); $r = $c->send($msg); if (!$r->faultCode()) { - echo toTable(XML_RPC_decode($r->value())); + echo toTable(XML_RPC_decode($r->value())); } else { - echo "<pre>\n"; - echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); - echo "</pre>\n"; + echo "<pre>\n"; + echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); + echo "</pre>\n"; } ?> ]]> </example> +<example title='Output' type='html' filename='output/xmlrpc_method_sql_out.html' + fontsize='1.5em' examplebackground='#ffffdd'/> </slide> Index: presentations/slides/mdb/xmlrpc_service.xml diff -u presentations/slides/mdb/xmlrpc_service.xml:1.1 presentations/slides/mdb/xmlrpc_service.xml:1.2 --- presentations/slides/mdb/xmlrpc_service.xml:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/xmlrpc_service.xml Fri Aug 1 15:48:48 2003 @@ -1,9 +1,66 @@ <slide title='XML-RPC service'> - <list title='Available methods'> - <bullet> _method.sql_ : to perform 'SELECT', 'SHOW', or 'DESCRIBE' SQL - queries</bullet> - </list> - <example title='Introspection' - type='html' result='0' align='center' + <example title='Server Introspection' type='php' result='0' fontsize='1.5em'> +<![CDATA[<?php +require_once "XML/RPC.php"; +require_once "slides/mdb/scripts/xmlrpc_util.php"; +require_once "slides/mdb/scripts/mdb_tests.cfg"; + +$c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); +$f=new XML_RPC_Message('system.listMethods'); + +$v=rpc_call($c, $f); +print "<h2>Methods available at http://" . $c->server . ":" . +$c->port . $c->path . "</h2>\n"; +if ($v) { + + for($i=0; $i<$v->arraysize(); $i++) { + $mname=$v->arraymem($i); + print "<hr noshade size=1><H3>" . $mname->scalarval() . "</H3>\n"; + $f=new XML_RPC_Message('system.methodHelp'); + $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); + $w=rpc_call($c, $f); + if ($w) { + $txt=$w->scalarval(); + if ($txt!="") { + print "<H4>Documentation</H4><P style='font-size: 1.0em;'>${txt}</P>\n"; + } else { + print "<P>No documentation available.</P>\n"; + } + } + $f=new XML_RPC_Message('system.methodSignature'); + $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); + $w=rpc_call($c, $f); + if ($w) { + print "<H4>Signature</H4><P style='font-size: 1.0em;'>\n"; + if ($w->kindOf()=="array") { + for($j=0; $j<$w->arraysize(); $j++) { + $x=$w->arraymem($j); + $ret=$x->arraymem(0); + print "<CODE style='font-size: 1.0em;'>" . $ret->scalarval() . " " . + $mname->scalarval() ."("; + if ($x->arraysize()>1) { + for($k=1; $k<$x->arraysize(); $k++) { + $y=$x->arraymem($k); + print $y->scalarval(); + if ($k<$x->arraysize()-1) { + print ", "; + } + } + } + print ")</CODE><BR>\n"; + } + } else { + print "Signature unknown\n"; + } + print "</P>\n"; + } + } + +} +?> +]]> +</example> +<example title='Output' fontsize='1.5em' + type='html' result='0' align='center' examplebackground='#ffffdd' filename='output/xmlrpc_api_out.html'/> </slide> Index: presentations/slides/mdb/output/introspection_api_out.html diff -u presentations/slides/mdb/output/introspection_api_out.html:1.2 presentations/slides/mdb/output/introspection_api_out.html:1.3 --- presentations/slides/mdb/output/introspection_api_out.html:1.2 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/output/introspection_api_out.html Fri Aug 1 15:48:48 2003 @@ -1,25 +1,24 @@ <table> <tr><td> -<table border='0' width='50%' cellpadding='0' cellspacing='0' width='100%'> +<table border='0' cellpadding='0' cellspacing='0' width='100%'> <tr><td bgcolor='#000000'> -<table border='0' width='100%' cellspacing='1' cellpadding='5' width='100%'> +<table border='0' cellspacing='1' cellpadding='5' width='100%'> <tr bgcolor='#eeeeee'> -<th align='center'><i style='font-size: 1em;'>Function</i>:<br /> sql</th> +<th align='center'><i style='font-size: 1.2em;'>Function</i>:<br /> sql</th> <th align='left'> -<i style='font-size: 1em;'>Parameters</i>:<ul> -<li style='font-size: 1em;'>query: urlencoded SQL query</li> -<li style='font-size: 1em;'>[format]: csv (default), wddx, serialized, table</li> +<i style='font-size: 1.2em;'>Parameters</i>:<ul> +<li style='font-size: 1.2em;'>query: urlencoded SQL query</li> +<li style='font-size: 1.2em;'>[format]: csv (default), wddx, serialized, table</li> </ul> </th> </tr> <tr bgcolor='#ddffff'> -<td colspan='2'><p style='font-size: 1em;'><b>Description:</b><br />General function to query a database server. +<td colspan='2'><p style='font-size: 1.2em;'><b>Description:</b><br />General function to query a database server. Accepts a valid SQL query (&quot;SELECT&quot;, &quot;SHOW&quot;, or &quot;DESCRIBE&quot; statements only), and an optioanl result format. Valid formats are &quot;csv&quot; (default), &quot;wddx&quot;, &quot;serialized&quot; (PHP serialization), &quot;table&quot; (HTML table). Example of use: -/services/api.php?function=sql&amp;query=select+source_id+from+protein+limit+10 -&amp;format=wddx</p> +/services/api.php?func=sql&amp;query=select+source_id+from+protein+limit+10&amp;format=wddx</p> </td> </tr> </table> @@ -32,17 +31,17 @@ <tr bgcolor='#eeeeee'> <th align='center'><i>Function</i>:<br /> metallopdb</th> <th align='left'> -<i style='font-size: 1em;'>Parameters</i>:<ul> -<li style='font-size: 1em;'>metal: atomic symbol for the metal</li> -<li style='font-size: 1em;'>[mode]: one of: first (default), last, random, new</li> -<li style='font-size: 1em;'>[count]: how many PDB entries to retrieve (default = 5)</li> -<li style='font-size: 1em;'>[format]: csv (default), wddx, rss, serialized</li> +<i style='font-size: 1.2em;'>Parameters</i>:<ul> +<li style='font-size: 1.2em;'>metal: atomic symbol for the metal</li> +<li style='font-size: 1.2em;'>[mode]: one of: first (default), last, random, new</li> +<li style='font-size: 1.2em;'>[count]: how many PDB entries to retrieve (default = 5)</li> +<li style='font-size: 1.2em;'>[format]: csv (default), wddx, rss, serialized</li> </ul> </th> </tr> <tr bgcolor='#ddffff'> <td colspan='2'> -<p style='font-size: 1em;'><b>Description:</b><br />Specialized function to retrieve a list of PDB structures +<p style='font-size: 1.2em;'><b>Description:</b><br />Specialized function to retrieve a list of PDB structures containing a particular metal ion, as indexed in the MDB. The retrieval mode can be one of &quot;first&quot; (default) to get the first &quot;n&quot; PDB ids (sorted alphabetically), &quot;last&quot; to get the last &quot;n&quot; ids, &quot;random&quot; to get &quot;n&quot; @@ -51,7 +50,7 @@ The list can be formated as &quot;csv&quot; (default), &quot;wddx&quot;, &quot;rss&quot;, or &quot;serialized&quot; (PHP serialization). Example of use: -/services/api.php?function=metallopdb&amp;metal=zn&amp;mode=random&amp;count=5 +/services/api.php?func=metallopdb&amp;metal=zn&amp;mode=random&amp;count=5 &amp;format=rss</p> </td> </tr> Index: presentations/slides/mdb/output/test_api_sql_out.html diff -u presentations/slides/mdb/output/test_api_sql_out.html:1.1 presentations/slides/mdb/output/test_api_sql_out.html:1.2 --- presentations/slides/mdb/output/test_api_sql_out.html:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/output/test_api_sql_out.html Fri Aug 1 15:48:48 2003 @@ -5,8 +5,7 @@ <b>Function vars:</b><br> [query: select source_id,expdata,description from protein where expdata not like '%nmr%' limit 4]<br> [format: table] -<br><b>Using the URL: </b>http://metallo.scripps.edu:80/services/api.ph<br> -p?func=sql&query=select+source_id%2Cexpdata%2<br> +<br><b>Using the URL: </b>http://metallo.scripps.edu:80/services/api.php?func=sql&query=select+source_id%2Cexpdata%2<br> Cdescription+from+protein+where+expdata+not+l<br> ike+%27%25nmr%25%27+limit+4&format=table<br><b>RESULT</b><br> <table border='0' cellspacing='1' cellpadding='5'> Index: presentations/slides/mdb/output/xmlrpc_method_metallopdb_out.html diff -u presentations/slides/mdb/output/xmlrpc_method_metallopdb_out.html:1.1 presentations/slides/mdb/output/xmlrpc_method_metallopdb_out.html:1.2 --- presentations/slides/mdb/output/xmlrpc_method_metallopdb_out.html:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/output/xmlrpc_method_metallopdb_out.html Fri Aug 1 15:48:48 2003 @@ -1,7 +1,3 @@ -<slide title='method.metallopdb'> -<example title='Using method.metallopdb from the XML-RPC service' result='1' -fontsize='1.0em' rfontsize='1.5em' outputbackground='#ffffdd'> -<![CDATA[ <h3>Parameters: metal='zn', mode='random', count=5, format='array'</h3><table border=1> <tr align='center'> <th colspan='2'>ROW: 1</th> @@ -219,6 +215,3 @@ Keywords: [v(d)j recombination, antibody, mad, ring finger, zinc binuclear cluster, zinc finger, dna-binding protein]</td> </tr> </table> -]]> -</example> -</slide> Index: presentations/slides/mdb/output/xmlrpc_method_sql_out.html diff -u presentations/slides/mdb/output/xmlrpc_method_sql_out.html:1.1 presentations/slides/mdb/output/xmlrpc_method_sql_out.html:1.2 --- presentations/slides/mdb/output/xmlrpc_method_sql_out.html:1.1 Fri Mar 28 20:42:42 2003 +++ presentations/slides/mdb/output/xmlrpc_method_sql_out.html Fri Aug 1 15:48:48 2003 @@ -1,9 +1,6 @@ -<slide title='method.sql'> -<example title='Using method.sql from the XML-RPC service' result='1' -fontsize='1.2em' rfontsize='1em' outputbackground='#ffffdd'> -<![CDATA[<b>method.sql:</b> -<small>"select source_id,expdata,rev_date,resolution,description -from protein limit 10"</small><br> +<b>method.sql:</b> +"select source_id,expdata,rev_date,resolution,description +from protein limit 10"<br> <table border=1> <tr align='center'> <th>source_id</th> @@ -12,56 +9,53 @@ <th>description</th> </tr> <tr align='center'> -<td><small>1d8g</small></td> -<td><small>x-ray diffraction</small></td> -<td><small>0.74</small></td> -<td><small>Header: [deoxyribonucleic acid 23-oct-99 1d8g] +<td>1d8g</td> +<td>x-ray diffraction</td> +<td>0.74</td> +<td>Header: [deoxyribonucleic acid 23-oct-99 1d8g] Title: [ultrahigh resolution crystal structure of b-dna decamer d(ccagtactgg)] Compound: [mol_id: 1; molecule: 5'-d(*cp*cp*ap*gp*tp*ap*cp*tp*gp*gp*)-3'; chain: a; engineered: yes] Source: [mol_id: 1; synthetic: yes] -Keywords: [calcium, alternate conformation, ultrahigh resolution, trp repressor, polyamide]</small></td> +Keywords: [calcium, alternate conformation, ultrahigh resolution, trp repressor, polyamide]</td> </tr> <tr align='center'> -<td><small>1gci</small></td> -<td><small>x-ray diffraction</small></td> -<td><small>0.78</small></td> -<td><small>Header: [serine protease 02-sep-98 1gci] +<td>1gci</td> +<td>x-ray diffraction</td> +<td>0.78</td> +<td>Header: [serine protease 02-sep-98 1gci] Title: [the 0.78 angstroms structure of a serine protease - bacillus lentus subtilisin] Compound: [mol_id: 1; molecule: subtilisin; chain: null; ec: 3.4.21.62; engineered: yes; biological_unit: monomer] Source: [mol_id: 1; organism_scientific: bacillus lentus; expression_system: bacillus subtilis] -Keywords: [bacillus lentus, hydrolase, serine protease, ultra-high resolution]</small></td> +Keywords: [bacillus lentus, hydrolase, serine protease, ultra-high resolution]</td> </tr> <tr align='center'> -<td><small>1iua</small></td> -<td><small>x-ray diffraction</small></td> -<td><small>0.80</small></td> -<td><small>Header: [electron transport 01-mar-02 1iua] +<td>1iua</td> +<td>x-ray diffraction</td> +<td>0.80</td> +<td>Header: [electron transport 01-mar-02 1iua] Title: [ultra-high resolution structure of hipip from thermochromatium tepidum] Compound: [mol_id: 1; molecule: high-potential iron-sulfur protein; chain: a] Source: [mol_id: 1; organism_scientific: thermochromatium tepidum; organism_common: bacteria] -Keywords: [ultra-high resolution, crystal structure]</small></td> +Keywords: [ultra-high resolution, crystal structure]</td> </tr> <tr align='center'> -<td><small>1dpl</small></td> -<td><small>x-ray diffraction</small></td> -<td><small>0.83</small></td> -<td><small>Header: [deoxyribonucleic acid 27-dec-99 1dpl] +<td>1dpl</td> +<td>x-ray diffraction</td> +<td>0.83</td> +<td>Header: [deoxyribonucleic acid 27-dec-99 1dpl] Title: [a-dna decamer gcgta(t23)tacgc with incorporated 2'-methoxy- 3'-methylenephosphate-thymidine] Compound: [mol_id: 1; molecule: 5'-d(*gp*cp*gp*tp*ap*(t23)p*ap*cp*gp*c)-3'; chain: a, b; engineered: yes] Source: [mol_id: 1; synthetic: yes] -Keywords: [deoxyribonucleic acid]</small></td> +Keywords: [deoxyribonucleic acid]</td> </tr> <tr align='center'> -<td><small>1m40</small></td> -<td><small>x-ray diffraction</small></td> -<td><small>0.85</small></td> -<td><small>Header: [hydrolase 01-jul-02 1m40] +<td>1m40</td> +<td>x-ray diffraction</td> +<td>0.85</td> +<td>Header: [hydrolase 01-jul-02 1m40] Title: [ultra high resolution crystal structure of tem-1] Compound: [mol_id: 1; molecule: beta-lactamase tem; chain: a; synonym: tem-1; ec: 3.5.2.6; engineered: yes; mutation: yes] Source: [mol_id: 1; organism_scientific: escherichia coli; organism_common: bacteria; gene: bla; expression_system: escherichia coli; expression_system_common: bacteria; expression_system_strain: sf120; expression_system_vector_type: plasmid; expression_system_plasmid: palter ex ii - tem-1] -Keywords: [acylation mechanism, x-ray structure, ultra- high resolution]</small></td> +Keywords: [acylation mechanism, x-ray structure, ultra- high resolution]</td> </tr> </table> -]]> -</example> -</slide>
« previous php.pres (#813) next »