Newer
Older
}
catch(SQLException sqle)
{
sqle.printStackTrace();
}
catch(RuntimeException re)
{
re.printStackTrace();
}
catch(ConnectException e)
{
e.printStackTrace();
}
public Document getParent()
{
return null;
}
/**
* Find from a list the FeatureLoc with a given srcFeature
* @param locs
* @param srcfeature_id
* @return
*/
public static FeatureLoc getFeatureLoc(List locs, int srcfeature_id)
{
for(int i=0; i<locs.size(); i++)
{
FeatureLoc loc = (FeatureLoc)locs.get(i);
if(loc.getFeatureBySrcFeatureId().getFeatureId() == srcfeature_id)
return loc;
}
return null;
}
public String getSrcFeatureId()
{
return srcFeatureId;
}
private JPasswordField getPfield()
{
return pfield;
}
/**
* Return true if this looks like a single schema postgres
* database
* @return
*/
public boolean isSingleSchema()
{
return singleSchema;
}
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
/**
* Ensure exon featurelocs are in the correct order
*/
class LocationComarator implements Comparator
{
public int compare(Object o1, Object o2)
{
int loc1 = ((FeatureLoc)o1).getFmin().intValue();
int loc2 = ((FeatureLoc)o2).getFmin().intValue();
if(loc2 == loc1)
return 0;
int strand = ((FeatureLoc)o1).getStrand().intValue();
if(strand < 0)
{
if(loc2 > loc1)
return 1;
else
return -1;
}
else
{
if(loc2 > loc1)
return -1;
else
return 1;
}
}
}
class CvTermThread extends Thread
{
private GmodDAO dao;
CvTermThread(final GmodDAO dao)
{
this.dao = dao;
}
public void run()
{
getCvterms(dao);
public void setRange(Range range)
{
this.range = range;
}
public Hashtable getIdFeatureStore()
{
return idFeatureStore;
}
public boolean isLazyFeatureLoad()
{
return lazyFeatureLoad;
}
public void setLazyFeatureLoad(boolean lazyFeatureLoad)
{
this.lazyFeatureLoad = lazyFeatureLoad;
}