Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

apollo.dataadapter.das.simple
Class SimpleDASServer  view SimpleDASServer download SimpleDASServer.java

java.lang.Object
  extended byapollo.dataadapter.das.simple.SimpleDASServer
All Implemented Interfaces:
apollo.dataadapter.das.DASServerI

public class SimpleDASServer
extends java.lang.Object
implements apollo.dataadapter.das.DASServerI

I am a lightweight implementation of a DAS Server which doesn't use external code (apart from a general SAX-parser). I perform client-side assembly of all nested features from a das 'features' call, as well as ensuring that the features are presented in the highest-level (entry-point) coordinate system (typically this are chromosome coords).

I should be instantiated with the URL of the datasource, for example

Calls to me after I've been instantiated are stateless - typically you call getDSNs to isolate a single DSN to study, then getEntryPoints for a specific DSN, and then getFeatures for (a) specific entry point(s). Note that Apollo will only call getFeatures passing in a single entry-point (phrased as an input DASSegment) to start off with. As this server does the assembly of any nested features from that segment, it will re-invoke getFeatures, passing in all the child segments of interest.

I am DAS 1.0 compliant


Field Summary
private  java.lang.String server
           
private  java.lang.String url
           
private static float version
           
 
Constructor Summary
SimpleDASServer(java.lang.String url)
          You must pass in the URL of a DAS-reference server, used in all further requests.
 
Method Summary
 java.util.List getDSNs()
          I return all data-sources from the das server URL passed in when this instance was constructed.
 java.util.List getEntryPoints(apollo.dataadapter.das.DASDsn dsn)
          I return all entry-points from the input DASDsn instance passed in.
 java.util.List getFeatures(apollo.dataadapter.das.DASDsn dsn, apollo.dataadapter.das.DASSegment[] segmentSelection)
           I am the call used by apollo to fetch annotations (features) from the input dsn, for the entry-points and ranges given by the input segments
 java.util.List getFeatures(apollo.dataadapter.das.DASDsn dsn, java.util.HashMap segmentSelection, java.util.HashMap parentFeatures, long globalStart, long globalEnd)
           I am the getFeatures signature called internally by the DASFeatureContentHandler.
 java.util.List getSequences(apollo.dataadapter.das.DASDsn dsn, apollo.dataadapter.das.DASSegment[] segmentSelection)
           I am the call used by apollo to fetch dna (sequence) from the input dsn, for the entry-points and ranges given by the input segments
 java.lang.String getURL()
           
 void setURL(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

private java.lang.String url

server

private java.lang.String server

version

private static final float version
See Also:
Constant Field Values
Constructor Detail

SimpleDASServer

public SimpleDASServer(java.lang.String url)
You must pass in the URL of a DAS-reference server, used in all further requests.

Method Detail

setURL

public void setURL(java.lang.String url)
Specified by:
setURL in interface apollo.dataadapter.das.DASServerI

getURL

public java.lang.String getURL()
Specified by:
getURL in interface apollo.dataadapter.das.DASServerI

getDSNs

public java.util.List getDSNs()
I return all data-sources from the das server URL passed in when this instance was constructed. The list consists of objects implementing the apollo.dataadapter.das.DASDsn interface. In this case, I populate the returned list with instances of SimpleDASDsn.

Specified by:
getDSNs in interface apollo.dataadapter.das.DASServerI

getEntryPoints

public java.util.List getEntryPoints(apollo.dataadapter.das.DASDsn dsn)
I return all entry-points from the input DASDsn instance passed in. The list consists of objects implementing the apollo.dataadapter.das.DASSegment interface. In this case, I populate the returned list with instances of SimpleDASSegment.

Specified by:
getEntryPoints in interface apollo.dataadapter.das.DASServerI

getFeatures

public java.util.List getFeatures(apollo.dataadapter.das.DASDsn dsn,
                                  apollo.dataadapter.das.DASSegment[] segmentSelection)

I am the call used by apollo to fetch annotations (features) from the input dsn, for the entry-points and ranges given by the input segments

The return list consists of objects implementing the apollo.dataadapter.das.DASFeature interface. In this case, I populate the returned list with instances of SimpleDASFeature.

Specified by:
getFeatures in interface apollo.dataadapter.das.DASServerI

getFeatures

public java.util.List getFeatures(apollo.dataadapter.das.DASDsn dsn,
                                  java.util.HashMap segmentSelection,
                                  java.util.HashMap parentFeatures,
                                  long globalStart,
                                  long globalEnd)

I am the getFeatures signature called internally by the DASFeatureContentHandler. Since I exist for the purposes of a recursive-descent (for assembly) in this implementation, I am not a part of a DASServerI interface.

I am invoked directly from DASFeatureContentHandler when the features returned have 'children' - that is, they contain further nested features. In that case, the handler will collect all such features of interest, create a new DASSegment for each such feature, and re-invoke this method (recursion!) passing in both a set of segments corresponding to the parent features, and the parent features themselves.


getSequences

public java.util.List getSequences(apollo.dataadapter.das.DASDsn dsn,
                                   apollo.dataadapter.das.DASSegment[] segmentSelection)

I am the call used by apollo to fetch dna (sequence) from the input dsn, for the entry-points and ranges given by the input segments

The return list consists of objects implementing the apollo.dataadapter.das.DASSequence interface. In this case, I populate the returned list with instances of SimpleDASSequence.

Specified by:
getSequences in interface apollo.dataadapter.das.DASServerI