charite.christo.metannogen
Class UploadDatasets
java.lang.Object
charite.christo.metannogen.UploadDatasets
- All Implemented Interfaces:
- ChRunnable
public class UploadDatasets
- extends Object
- implements ChRunnable
HELP
A Metannogen datasets contain a
biochemical equation and expert opinion edited by the
curator.
The datasets can be stored in a local file on the PC or on a
central HTTP server such that several investigators can work
on the same data.
For a central data repository, a PERL script needs to be
installed on the server in the cgi-bin directory:
http://www.charite.de/bioinf/strap/metannogen/metannogen.pl.txt.
Input form for server URLs and server password.
The first line contains the server URL and the URL for single datasets.
The second line is ignored because it starts with a "#".
JCOMPONENT:MetannogenMain#newPnlServer() |
The top of the PERL file contains two variables which need to be customized:
use constant DIR => "/var/www/bioinf/strap/metannogen/hoppe_datasets";
use constant PASSWORD => "secret password";
If the password is kept empty ("") as for the demo database then
there is no access control. Anyone can modify the datasets.
The constant variable DIR
gives the directory on the server. It should be a directory which
is visible through HTTP. This is the case if it is located in the /htdocs/ -branch.
Entering the server URL and password:
When Metannogen is started with
GUI the start dialog appears. The top panel of the start dialog
has three input text fields to enter the server data.
Server address:
The multi-line text-field holds the URL of the PERL-script.
The first valid URL is the master server. Optional, secondary URLs in text lines below may
serve as Backup servers, as they receive the same data from
Metannogen.
The server can be tested with the Web-browser:
Visiting this address in the Web-browser should show a file with all datasets.
For example visit the demo server address:
STRING:MetannogenStatics#DEMO_SERVER
Lines that are commented out by a leading "#" are ignored.
Address of one single dataset
The server address may optionally be followed in the same line by an expression denoting the URL for single
datasets. The asterisk of this mask stands for the dataset ID. The URL of a single dataset
is formed by replacing the asterisk by the ID.
For example consider the URL mask of the demo server:
STRING:MetannogenStatics#DEMO_URL_SINGLE
Replace the asterisk by a dataset ID such as "R08689" and visit the resulting address in the Web-browser:
This address allows Metannogen to observe the "Last-Modified" and "Date" attributes
of the current dataset.
If a dataset is uploaded by another investigator while it is modified,
a warning message appears.
The goal is to prevent data loss when datasets are modified
simultaneously by different users.
Password:
If the password is not matching the password written in the PERL script, the user is not allowed to change datasets.
DONOT_ASK
public static final int DONOT_ASK
- See Also:
- Constant Field Values
BACKGROUND
public static final int BACKGROUND
- See Also:
- Constant Field Values
ONLY_CHANGED
public static final int ONLY_CHANGED
- See Also:
- Constant Field Values
HTTP_PARAM_DATASETS
public static final String HTTP_PARAM_DATASETS
- See Also:
- Constant Field Values
HTTP_PARAM_SCIENTIST
public static final String HTTP_PARAM_SCIENTIST
- See Also:
- Constant Field Values
HTTP_PARAM_PATHWAY
public static final String HTTP_PARAM_PATHWAY
- See Also:
- Constant Field Values
setPasswd
public static void setPasswd(String s)
batchUpload
public static void batchUpload(URL url,
ByteArray datasets,
String passwd)
currentTimeFromServerResponseSec
public static int currentTimeFromServerResponseSec(ByteArray ba)
logSentToSrv
public static File logSentToSrv(URL url)
logResponseSrv
public static File logResponseSrv(URL url)
run
public Object run(String id,
Object arg)
- Specified by:
run
in interface ChRunnable
deleteDatasetsOnServer
public static void deleteDatasetsOnServer(Dataset[] dd,
int mode)
delDatasetIDsOnSrv
public static void delDatasetIDsOnSrv(int mode,
String... ids)
checkDataset
public static boolean checkDataset(Dataset d,
StringBuffer sb)
datasetsToServer
public static void datasetsToServer(int mode,
Dataset... dd0)
'The most important classes are StrapAlign, StrapProtein and StrapEvent.'