Mercurial > hg > ltpda
diff m-toolbox/html_help/help/ug/repo_connect.html @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/html_help/help/ug/repo_connect.html Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,108 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> + +<html lang="en"> +<head> + <meta name="generator" content= + "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org"> + <meta http-equiv="Content-Type" content= + "text/html; charset=us-ascii"> + + <title>Connecting to an LTPDA Repository (LTPDA Toolbox)</title> + <link rel="stylesheet" href="docstyle.css" type="text/css"> + <meta name="generator" content="DocBook XSL Stylesheets V1.52.2"> + <meta name="description" content= + "Presents an overview of the features, system requirements, and starting the toolbox."> + </head> + +<body> + <a name="top_of_page" id="top_of_page"></a> + + <p style="font-size:1px;"> </p> + + <table class="nav" summary="Navigation aid" border="0" width= + "100%" cellpadding="0" cellspacing="0"> + <tr> + <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td> + + <td valign="baseline" align="right"><a href= + "repo_whatis.html"><img src="b_prev.gif" border="0" align= + "bottom" alt="What is an LTPDA Repository"></a> <a href= + "repo_submit.html"><img src="b_next.gif" border="0" align= + "bottom" alt="Submitting LTPDA objects to a repository"></a></td> + </tr> + </table> + + <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Connecting to an LTPDA Repository</h1> + <hr> + + <p> + <p> + + Connection to an LTPDA Repository is normally carried out as part of other processes. For example, when submitting an + object to the repository using the <tt>submit</tt> command, the user is prompted to login to the chosen repository. +</p> +<p> + It is also possible to connect to a repository using a script interface. The result is a connection object which can + be passed to other methods (for example, <tt>submit</tt>), thus allowing the construction of more automated procedures + for interacting with repositories. +</p> +<p> + To connect to a repository using the script interface, us the command <tt>utils.jmysql.connect</tt>. It takes the following input arguments: + + <table border="1" cellpadding="2" width="30%" bgcolor="#DDDDDD"> + <tr valign="top"> + <td><tt>hostname</tt></td><td>A hostname for the repository</td> + </tr> + <tr valign="top"> + <td><tt>dbname</tt></td><td>A database name to connect to</td> + </tr> + <tr valign="top"> + <td><tt>username</tt></td><td>[optional] A username to connect with</td> + </tr> + <tr valign="top"> + <td><tt>username</tt></td><td>[optional] A password to connect with</td> + </tr> + </table> + + <br> If you don't supply them as input arguments, you will then be prompted for a + valid username and password. +<br> +The result is a <tt>mpipeline.repository.RepositoryConnection</tt> object which can be further used to interact with the repository. +<br> +To disconnect from the server, use the <tt>closeConnection</tt> method of the <tt>mpipeline.repository.RepositoryConnection</tt> class: + +<div class="fragment"><pre> + >> conn.closeConnection +</pre></div> + +</p> + + + + </p> + + <br> + <br> + <table class="nav" summary="Navigation aid" border="0" width= + "100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td align="left" width="20"><a href="repo_whatis.html"><img src= + "b_prev.gif" border="0" align="bottom" alt= + "What is an LTPDA Repository"></a> </td> + + <td align="left">What is an LTPDA Repository</td> + + <td> </td> + + <td align="right">Submitting LTPDA objects to a repository</td> + + <td align="right" width="20"><a href= + "repo_submit.html"><img src="b_next.gif" border="0" align= + "bottom" alt="Submitting LTPDA objects to a repository"></a></td> + </tr> + </table><br> + + <p class="copy">©LTP Team</p> +</body> +</html>