Mercurial > hg > ltpda
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> | |
3 | |
4 <html lang="en"> | |
5 <head> | |
6 <meta name="generator" content= | |
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org"> | |
8 <meta http-equiv="Content-Type" content= | |
9 "text/html; charset=us-ascii"> | |
10 | |
11 <title>Connecting to an LTPDA Repository (LTPDA Toolbox)</title> | |
12 <link rel="stylesheet" href="docstyle.css" type="text/css"> | |
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2"> | |
14 <meta name="description" content= | |
15 "Presents an overview of the features, system requirements, and starting the toolbox."> | |
16 </head> | |
17 | |
18 <body> | |
19 <a name="top_of_page" id="top_of_page"></a> | |
20 | |
21 <p style="font-size:1px;"> </p> | |
22 | |
23 <table class="nav" summary="Navigation aid" border="0" width= | |
24 "100%" cellpadding="0" cellspacing="0"> | |
25 <tr> | |
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td> | |
27 | |
28 <td valign="baseline" align="right"><a href= | |
29 "repo_whatis.html"><img src="b_prev.gif" border="0" align= | |
30 "bottom" alt="What is an LTPDA Repository"></a> <a href= | |
31 "repo_submit.html"><img src="b_next.gif" border="0" align= | |
32 "bottom" alt="Submitting LTPDA objects to a repository"></a></td> | |
33 </tr> | |
34 </table> | |
35 | |
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Connecting to an LTPDA Repository</h1> | |
37 <hr> | |
38 | |
39 <p> | |
40 <p> | |
41 | |
42 Connection to an LTPDA Repository is normally carried out as part of other processes. For example, when submitting an | |
43 object to the repository using the <tt>submit</tt> command, the user is prompted to login to the chosen repository. | |
44 </p> | |
45 <p> | |
46 It is also possible to connect to a repository using a script interface. The result is a connection object which can | |
47 be passed to other methods (for example, <tt>submit</tt>), thus allowing the construction of more automated procedures | |
48 for interacting with repositories. | |
49 </p> | |
50 <p> | |
51 To connect to a repository using the script interface, us the command <tt>utils.jmysql.connect</tt>. It takes the following input arguments: | |
52 | |
53 <table border="1" cellpadding="2" width="30%" bgcolor="#DDDDDD"> | |
54 <tr valign="top"> | |
55 <td><tt>hostname</tt></td><td>A hostname for the repository</td> | |
56 </tr> | |
57 <tr valign="top"> | |
58 <td><tt>dbname</tt></td><td>A database name to connect to</td> | |
59 </tr> | |
60 <tr valign="top"> | |
61 <td><tt>username</tt></td><td>[optional] A username to connect with</td> | |
62 </tr> | |
63 <tr valign="top"> | |
64 <td><tt>username</tt></td><td>[optional] A password to connect with</td> | |
65 </tr> | |
66 </table> | |
67 | |
68 <br> If you don't supply them as input arguments, you will then be prompted for a | |
69 valid username and password. | |
70 <br> | |
71 The result is a <tt>mpipeline.repository.RepositoryConnection</tt> object which can be further used to interact with the repository. | |
72 <br> | |
73 To disconnect from the server, use the <tt>closeConnection</tt> method of the <tt>mpipeline.repository.RepositoryConnection</tt> class: | |
74 | |
75 <div class="fragment"><pre> | |
76 >> conn.closeConnection | |
77 </pre></div> | |
78 | |
79 </p> | |
80 | |
81 | |
82 | |
83 </p> | |
84 | |
85 <br> | |
86 <br> | |
87 <table class="nav" summary="Navigation aid" border="0" width= | |
88 "100%" cellpadding="0" cellspacing="0"> | |
89 <tr valign="top"> | |
90 <td align="left" width="20"><a href="repo_whatis.html"><img src= | |
91 "b_prev.gif" border="0" align="bottom" alt= | |
92 "What is an LTPDA Repository"></a> </td> | |
93 | |
94 <td align="left">What is an LTPDA Repository</td> | |
95 | |
96 <td> </td> | |
97 | |
98 <td align="right">Submitting LTPDA objects to a repository</td> | |
99 | |
100 <td align="right" width="20"><a href= | |
101 "repo_submit.html"><img src="b_next.gif" border="0" align= | |
102 "bottom" alt="Submitting LTPDA objects to a repository"></a></td> | |
103 </tr> | |
104 </table><br> | |
105 | |
106 <p class="copy">©LTP Team</p> | |
107 </body> | |
108 </html> |