renamed; these files are more strategy than actual shards

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@312 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2009-04-07 16:50:56 +00:00
parent e95f427965
commit 6369d23b43
4 changed files with 13 additions and 13 deletions

View File

@ -28,7 +28,7 @@ import net.sf.samtools.SAMSequenceDictionary;
* <p/>
* A descriptions should go here. Blame aaron if it's missing.
*/
class AdaptiveShard extends Shard {
class AdaptiveShardStrategy extends ShardStrategy {
// default the next size to 100,000
private long nextShardSize = 100000;
@ -38,7 +38,7 @@ class AdaptiveShard extends Shard {
*
* @param dic the seq dictionary
*/
AdaptiveShard(SAMSequenceDictionary dic, long startSize) {
AdaptiveShardStrategy(SAMSequenceDictionary dic, long startSize) {
super(dic);
this.nextShardSize = startSize;
}

View File

@ -28,7 +28,7 @@ import net.sf.samtools.SAMSequenceDictionary;
* <p/>
* A descriptions should go here. Blame aaron if it's missing.
*/
public class LinearShard extends Shard {
public class LinearShardStrategy extends ShardStrategy {
// fixed size
private long nextShardSize = 100000;
@ -38,7 +38,7 @@ public class LinearShard extends Shard {
*
* @param dic the seq dictionary
*/
LinearShard(SAMSequenceDictionary dic, long startSize) {
LinearShardStrategy(SAMSequenceDictionary dic, long startSize) {
super(dic);
this.nextShardSize = startSize;
}

View File

@ -29,7 +29,7 @@ import java.util.Iterator;
* <p/>
* The shard interface, which controls how data is divided
*/
public abstract class Shard implements Iterator<GenomeLoc> {
public abstract class ShardStrategy implements Iterator<GenomeLoc> {
// this stores the seq dictionary, which is a reference for the
// lengths and names of contigs, which you need to generate an iterative stratagy
@ -53,7 +53,7 @@ public abstract class Shard implements Iterator<GenomeLoc> {
*
* @param dic the seq dictionary
*/
Shard(SAMSequenceDictionary dic) {
ShardStrategy(SAMSequenceDictionary dic) {
this.dic = dic;
mLoc = new GenomeLoc(dic.getSequence(0).getSequenceName(), 0, 0);
if (dic.getSequences().size() > 0) {

View File

@ -28,7 +28,7 @@ import net.sf.samtools.SAMSequenceDictionary;
* <p/>
* A descriptions should go here. Blame aaron if it's missing.
*/
public class ShardFactory {
public class ShardStrategyFactory {
public enum SHATTER_STRATEGY {
ADAPTIVE, LINEAR
}
@ -41,13 +41,13 @@ public class ShardFactory {
* @param startingSize the starting size
* @return
*/
static public Shard shatter(SHATTER_STRATEGY strat, SAMSequenceDictionary dic, long startingSize) {
Shard d = null;
static public ShardStrategy shatter(SHATTER_STRATEGY strat, SAMSequenceDictionary dic, long startingSize) {
ShardStrategy d = null;
switch (strat) {
case ADAPTIVE:
d = new AdaptiveShard(dic, startingSize);
d = new AdaptiveShardStrategy(dic, startingSize);
default:
d = new LinearShard(dic, startingSize); // default
d = new LinearShardStrategy(dic, startingSize); // default
}
return d;
}
@ -59,8 +59,8 @@ public class ShardFactory {
* @param startingSize the starting size
* @return
*/
static public AdaptiveShard getAdaptiveShard(SAMSequenceDictionary dic, long startingSize) {
return new AdaptiveShard(dic, startingSize);
static public AdaptiveShardStrategy getAdaptiveShard(SAMSequenceDictionary dic, long startingSize) {
return new AdaptiveShardStrategy(dic, startingSize);
}
}