From: Guanming Wu <gua...@us...> - 2004-11-05 21:40:44
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/chado/jdbc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6999/apollo/src/java/apollo/dataadapter/chado/jdbc Added Files: ChromosomeFeatureLocImp.java Log Message: A lazy way to encapsulate a range for query --- NEW FILE: ChromosomeFeatureLocImp.java --- /* * Created on Nov 4, 2004 * */ package apollo.dataadapter.chado.jdbc; /** * A special FeatureLocImplementation for chromosome location query. * @author wgm */ class ChromosomeFeatureLocImp extends FeatureLocImplementation { private int start; private int end; protected ChromosomeFeatureLocImp(long featureId, int start, int end) { super.featId = (int) featureId; this.start = start; this.end = end; } int getBaseOrientedMinWithPadding() { return start; } int getContainingFeatureId() { return featId; } String getContainingFeatureWhereClause(String featLocTableName) { return " AND "+ featLocTableName +".fmax > " + start +" AND "+featLocTableName+".fmin < "+ end +" "; } int getLengthWithPadding() { return end - start; } int getMaxWithPadding() { return end; } public String getSrcFeatureType() { return "chromosome"; } } |