gov.lbl.genome.common
Class CommUnit

java.lang.Object
  extended by gov.lbl.genome.common.CommUnit

public class CommUnit
extends java.lang.Object

Title: CommUnit

Description: Communication Unit

Copyright: Copyright (c) 2002 Ernst Orlando Lawrence Berkeley National Laboratory

Company: LBNL


Field Summary
protected static java.lang.String CHROM_INFO
           
protected  java.lang.String codeBaseURL
           
 boolean debug
           
protected static java.lang.String GET_ANNO
           
protected static java.lang.String GET_AVAIL_CURVES
           
protected static java.lang.String GET_CURVE
           
protected static java.lang.String GET_GENES
           
protected static java.lang.String GET_INIT
           
protected static int RETRIES
           
protected  java.lang.String servletURL
           
protected static java.lang.String UP2DATE
           
protected static java.lang.String VERSION
           
 
Constructor Summary
CommUnit()
          CommUnit
CommUnit(java.lang.String s, java.lang.String cb)
          CommUnit
CommUnit(java.lang.String s, java.lang.String cb, boolean dbg)
          CommUnit
 
Method Summary
 java.util.Vector checkCurves(java.util.Vector curves, java.lang.String pos)
          check Curves for visibility in the specified position
 java.util.Vector getAnno(java.lang.String base, java.lang.String src, java.lang.String pos, java.lang.String genes, java.lang.String curveId)
          getAnno returns a Vector of ChromSegments (use getName() on each segment to find out the type) input: base (hg12, mm2, etc), src (refseq at the moment), position
 java.lang.String[][] getAvailCurves()
          getCurves Returns a list of curves available as an array [id] [name]
 java.lang.String[][] getAvailCurves(java.lang.String url)
          getCurves returns a list of curves available at a given url as an array [id][name]
 ChromInfo getChromInfo(java.lang.String base, java.lang.String name)
          get ChromInfo
 CurveModel getCurve(CurveInfo curve, java.lang.String pos, CurveModel cmodel, VistaApp va)
          get Curve
 Gene[] getGenes(java.lang.String gene, java.lang.String base, java.lang.String curveid, java.lang.String genes)
          getGenes returns an array of Genes whose names contain the given string
 java.util.HashMap getInitInfo()
          getInitInfo returns a hashmap genome id -> GenomeInfo
 java.util.HashMap getInitInfo(java.lang.String runs, java.lang.String pos, java.lang.String show, java.lang.String bg)
          get Init Info
 java.util.HashMap getUp2Date(java.lang.String runs)
          update init information
 java.lang.String getVersion()
          getVersion returns current version
 Document sendRequest(java.lang.String src)
          send Request
 void setCodeBaseURL(java.lang.String cb)
          set CodeBase URL
 void setServletURL(java.lang.String s)
          set Servlet URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_CURVE

protected static final java.lang.String GET_CURVE
See Also:
Constant Field Values

GET_AVAIL_CURVES

protected static final java.lang.String GET_AVAIL_CURVES
See Also:
Constant Field Values

GET_ANNO

protected static final java.lang.String GET_ANNO
See Also:
Constant Field Values

GET_INIT

protected static final java.lang.String GET_INIT
See Also:
Constant Field Values

GET_GENES

protected static final java.lang.String GET_GENES
See Also:
Constant Field Values

UP2DATE

protected static final java.lang.String UP2DATE
See Also:
Constant Field Values

CHROM_INFO

protected static final java.lang.String CHROM_INFO
See Also:
Constant Field Values

VERSION

protected static final java.lang.String VERSION
See Also:
Constant Field Values

RETRIES

protected static final int RETRIES
See Also:
Constant Field Values

servletURL

protected java.lang.String servletURL

codeBaseURL

protected java.lang.String codeBaseURL

debug

public boolean debug
Constructor Detail

CommUnit

public CommUnit()
CommUnit


CommUnit

public CommUnit(java.lang.String s,
                java.lang.String cb)
CommUnit

Parameters:
s - String
cb - String

CommUnit

public CommUnit(java.lang.String s,
                java.lang.String cb,
                boolean dbg)
CommUnit

Parameters:
s - String
cb - String
dbg - boolean
Method Detail

setServletURL

public void setServletURL(java.lang.String s)
set Servlet URL

Parameters:
s - String

setCodeBaseURL

public void setCodeBaseURL(java.lang.String cb)
set CodeBase URL

Parameters:
cb - String

getInitInfo

public java.util.HashMap getInitInfo()
getInitInfo returns a hashmap genome id -> GenomeInfo


getInitInfo

public java.util.HashMap getInitInfo(java.lang.String runs,
                                     java.lang.String pos,
                                     java.lang.String show,
                                     java.lang.String bg)
get Init Info

Parameters:
runs - String
pos - String
show - String
bg - String
Returns:
HashMap

getUp2Date

public java.util.HashMap getUp2Date(java.lang.String runs)
update init information

Parameters:
runs - String
Returns:
HashMap

getGenes

public Gene[] getGenes(java.lang.String gene,
                       java.lang.String base,
                       java.lang.String curveid,
                       java.lang.String genes)
                throws GeneNotFoundException
getGenes returns an array of Genes whose names contain the given string

Parameters:
gene - String
base - String
curveid - String
genes - String
Returns:
Gene[]
Throws:
GeneNotFoundException

getVersion

public java.lang.String getVersion()
getVersion returns current version


getAvailCurves

public java.lang.String[][] getAvailCurves()
getCurves Returns a list of curves available as an array [id] [name]


getAvailCurves

public java.lang.String[][] getAvailCurves(java.lang.String url)
getCurves returns a list of curves available at a given url as an array [id][name]

Parameters:
url - String
Returns:
String[][]

getAnno

public java.util.Vector getAnno(java.lang.String base,
                                java.lang.String src,
                                java.lang.String pos,
                                java.lang.String genes,
                                java.lang.String curveId)
getAnno returns a Vector of ChromSegments (use getName() on each segment to find out the type) input: base (hg12, mm2, etc), src (refseq at the moment), position

Parameters:
base - String
src - String
pos - String
genes - String
curveId - String
Returns:
Vector

getChromInfo

public ChromInfo getChromInfo(java.lang.String base,
                              java.lang.String name)
                       throws VGBException
get ChromInfo

Parameters:
base - String
name - String
Returns:
ChromInfo
Throws:
VGBException

getCurve

public CurveModel getCurve(CurveInfo curve,
                           java.lang.String pos,
                           CurveModel cmodel,
                           VistaApp va)
get Curve

Parameters:
curve - CurveInfo
pos - String
cmodel - CurveModel
va - VistaApp
Returns:
CurveModel

checkCurves

public java.util.Vector checkCurves(java.util.Vector curves,
                                    java.lang.String pos)
check Curves for visibility in the specified position

Parameters:
curves - Vector
pos - String
Returns:
Vector

sendRequest

public Document sendRequest(java.lang.String src)
send Request

Parameters:
src - String
Returns:
Document