org.emboss.jemboss.server
Class JembossServer

java.lang.Object
  |
  +--org.emboss.jemboss.server.JembossServer

public class JembossServer
extends java.lang.Object

Jemboss Non-authenticating Server for SOAP


Field Summary
(package private)  java.lang.String acdDirToParse
           
(package private)  java.lang.String embossBin
           
(package private)  java.lang.String embossData
           
(package private)  java.lang.String embossPath
           
private  java.lang.String[] envp
           
private  java.lang.String[] envp_emboss
           
private  java.lang.String fs
           
private  java.lang.String homeDirectory
           
(package private)  JembossParams jp
           
(package private)  java.lang.String plplot
           
private  java.lang.String tmproot
           
private  java.io.File tmprootDir
           
private  java.lang.String username
           
 
Constructor Summary
JembossServer()
           
 
Method Summary
 java.lang.String about()
           
 java.lang.String abouturl()
           
 java.lang.String appversion()
           
 java.util.Vector call_ajax(java.lang.String fileContent, java.lang.String seqtype)
          Uses JNI to calculate sequence attributes using EMBOSS library call.
 java.util.Vector call_ajax(java.lang.String fileContent, java.lang.String seqtype, java.lang.String userName)
           
 java.lang.Object clone()
           
private  void createFinishedFile(java.lang.String project)
          Creates a file named "finished" in the project directory, that contains a time stamp.
 java.util.Vector delete_saved_results(java.lang.String project, java.lang.String cl)
          Private server Deletes a projects saved results.
 java.util.Vector delete_saved_results(java.lang.String project, java.lang.String cl, java.lang.String userName)
          Private server Deletes a projects saved results.
 java.lang.String docurl()
           
private  java.util.Hashtable getHashtable(java.util.Vector v)
           
 java.util.Vector getWossname()
          Returns the output of the EMBOSS utility wossname
 java.lang.String helpurl()
           
 java.util.Vector list_saved_results()
          Private Server List of the saved results on the server.
 java.util.Vector list_saved_results(java.lang.String userName)
          Private Server List of the saved results on the server.
private  java.util.Vector loadFilesContent(java.io.File projectDir, java.lang.String project, java.util.Vector result, java.util.Hashtable inFiles)
          Reads in files from EMBOSS output
private  java.util.Vector loadPNGContent(java.io.File projectDir, java.lang.String project, java.util.Vector result)
          Reads in png files from EMBOSS output
 java.lang.String name()
           
protected static byte[] readByteFile(java.lang.String filename)
          Read a file into a byte array.
 java.util.Vector run_prog(java.lang.String embossCommand, java.lang.String options, java.util.Hashtable inFiles)
          Run an EMBOSS application
 java.util.Vector run_prog(java.lang.String embossCommand, java.lang.String options, java.lang.String[] inFiles)
          Private Server Run an EMBOSS application
 java.util.Vector run_prog(java.lang.String embossCommand, java.lang.String options, java.util.Vector inFiles, java.lang.String userName)
           
 java.util.Vector save_project_file(java.lang.String project, java.lang.String filename, java.lang.String notes, java.lang.String userName)
          Private server Save a file to a project directory on the server.
 java.util.Hashtable servicedesc()
           
 java.util.Vector show_acd(java.lang.String appName)
          Retrieves the ACD file of an application.
 java.util.Vector show_db()
          Returns the databases held on the server
 java.util.Vector show_help(java.lang.String applName)
          Returns the help for an application as given by 'tfm'
 java.util.Vector show_saved_results(java.lang.String project, java.lang.String cl)
          Private Server Returns the results for a saved project.
 java.util.Vector show_saved_results(java.lang.String project, java.lang.String cl, java.lang.String userName)
          Private Server Returns the results for a saved project.
 java.util.Vector update_result_status(java.lang.String prog, java.lang.String opt, java.util.Hashtable resToQuery)
          Used to provide information on the batch/background processes.
 java.util.Vector update_result_status(java.lang.String prog, java.lang.String opt, java.util.Hashtable resToQuery, java.lang.String userName)
           
 java.util.Vector update_result_status(java.lang.String prog, java.lang.String opt, java.util.Vector resToQuery, java.lang.String userName)
          Used to provide information on the batch/background processes.
 java.lang.String version()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fs

private java.lang.String fs

jp

JembossParams jp

plplot

java.lang.String plplot

embossData

java.lang.String embossData

embossBin

java.lang.String embossBin

embossPath

java.lang.String embossPath

acdDirToParse

java.lang.String acdDirToParse

homeDirectory

private java.lang.String homeDirectory

username

private java.lang.String username

tmproot

private java.lang.String tmproot

tmprootDir

private java.io.File tmprootDir

envp_emboss

private java.lang.String[] envp_emboss

envp

private java.lang.String[] envp
Constructor Detail

JembossServer

public JembossServer()
Method Detail

name

public java.lang.String name()

version

public java.lang.String version()

appversion

public java.lang.String appversion()

about

public java.lang.String about()

helpurl

public java.lang.String helpurl()

abouturl

public java.lang.String abouturl()

docurl

public java.lang.String docurl()

servicedesc

public java.util.Hashtable servicedesc()

show_acd

public java.util.Vector show_acd(java.lang.String appName)
Retrieves the ACD file of an application.

Returns:
Vector of containing the ACD string

getWossname

public java.util.Vector getWossname()
Returns the output of the EMBOSS utility wossname

Returns:
wossname output

show_help

public java.util.Vector show_help(java.lang.String applName)
Returns the help for an application as given by 'tfm'

Returns:
help

call_ajax

public java.util.Vector call_ajax(java.lang.String fileContent,
                                  java.lang.String seqtype,
                                  java.lang.String userName)

call_ajax

public java.util.Vector call_ajax(java.lang.String fileContent,
                                  java.lang.String seqtype)
Uses JNI to calculate sequence attributes using EMBOSS library call.

Returns:
sequence length, weight & type (protein/nucleotide)

show_db

public java.util.Vector show_db()
Returns the databases held on the server

Returns:
output from 'showdb'

run_prog

public java.util.Vector run_prog(java.lang.String embossCommand,
                                 java.lang.String options,
                                 java.lang.String[] inFiles)
Private Server Run an EMBOSS application

Returns:
output files from application run

run_prog

public java.util.Vector run_prog(java.lang.String embossCommand,
                                 java.lang.String options,
                                 java.util.Vector inFiles,
                                 java.lang.String userName)

run_prog

public java.util.Vector run_prog(java.lang.String embossCommand,
                                 java.lang.String options,
                                 java.util.Hashtable inFiles)
Run an EMBOSS application

Returns:
output files from application run

createFinishedFile

private void createFinishedFile(java.lang.String project)
Creates a file named "finished" in the project directory, that contains a time stamp.


show_saved_results

public java.util.Vector show_saved_results(java.lang.String project,
                                           java.lang.String cl,
                                           java.lang.String userName)
Private Server Returns the results for a saved project.

Returns:
saved results files

show_saved_results

public java.util.Vector show_saved_results(java.lang.String project,
                                           java.lang.String cl)
Private Server Returns the results for a saved project.

Returns:
saved results files

save_project_file

public java.util.Vector save_project_file(java.lang.String project,
                                          java.lang.String filename,
                                          java.lang.String notes,
                                          java.lang.String userName)
Private server Save a file to a project directory on the server.

Returns:
message

delete_saved_results

public java.util.Vector delete_saved_results(java.lang.String project,
                                             java.lang.String cl,
                                             java.lang.String userName)
Private server Deletes a projects saved results.

Returns:
message

delete_saved_results

public java.util.Vector delete_saved_results(java.lang.String project,
                                             java.lang.String cl)
Private server Deletes a projects saved results.

Returns:
message

list_saved_results

public java.util.Vector list_saved_results(java.lang.String userName)
Private Server List of the saved results on the server.

Returns:
list of the saved results.

list_saved_results

public java.util.Vector list_saved_results()
Private Server List of the saved results on the server.

Returns:
list of the saved results.

loadFilesContent

private java.util.Vector loadFilesContent(java.io.File projectDir,
                                          java.lang.String project,
                                          java.util.Vector result,
                                          java.util.Hashtable inFiles)
Reads in files from EMBOSS output


loadPNGContent

private java.util.Vector loadPNGContent(java.io.File projectDir,
                                        java.lang.String project,
                                        java.util.Vector result)
Reads in png files from EMBOSS output


readByteFile

protected static byte[] readByteFile(java.lang.String filename)
Read a file into a byte array.

Returns:
byte[] contents of file

update_result_status

public java.util.Vector update_result_status(java.lang.String prog,
                                             java.lang.String opt,
                                             java.util.Vector resToQuery,
                                             java.lang.String userName)
Used to provide information on the batch/background processes.


update_result_status

public java.util.Vector update_result_status(java.lang.String prog,
                                             java.lang.String opt,
                                             java.util.Hashtable resToQuery,
                                             java.lang.String userName)

update_result_status

public java.util.Vector update_result_status(java.lang.String prog,
                                             java.lang.String opt,
                                             java.util.Hashtable resToQuery)
Used to provide information on the batch/background processes.


getHashtable

private java.util.Hashtable getHashtable(java.util.Vector v)

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
java.lang.CloneNotSupportedException