import java.util.List;
import java.util.Scanner;
-public class HMMERParamStore implements ParamDatastoreI
+public final class HMMERParamStore implements ParamDatastoreI
{
+ private static final String HMMBUILD = "hmmbuild";
+
+ private static final String HMMALIGN = "hmmalign";
+
+ private static final String HMMSEARCH = "hmmsearch";
+
String name;
List<WsParamSetI> presets = new ArrayList<>();
- public HMMERParamStore(String nam)
+ private HMMERParamStore(String nam)
{
this.name = nam;
}
+ public static HMMERParamStore forBuild()
+ {
+ return new HMMERParamStore(HMMBUILD);
+ }
+
+ public static HMMERParamStore forAlign()
+ {
+ return new HMMERParamStore(HMMALIGN);
+ }
+
+ public static HMMERParamStore forSearch()
+ {
+ return new HMMERParamStore(HMMSEARCH);
+ }
+
@Override
public List<WsParamSetI> getPresets()
{
public List<ArgumentI> getServiceParameters()
{
List<ArgumentI> args = new ArrayList<>();
- if ("hmmsearch".equals(name))
+ switch (name)
{
+ case HMMSEARCH:
getHMMSearchParams(args);
- }
- if ("hmmalign".equals(name))
- {
+ break;
+ case HMMALIGN:
getHMMAlignParams(args);
-
- }
- if ("hmmbuild".equals(name))
- {
+ break;
+ case HMMBUILD:
getHMMBuildParams(args);
-
+ break;
+ default:
}
+
return args;
}
while (nameScanner.hasNext())
{
String next = nameScanner.next();
- if (next == "null")
+ if ("null".equals(next))
{
Cache.setProperty(Preferences.HMMSEARCH_DBS, "");
Cache.setProperty(Preferences.HMMSEARCH_DB_PATHS, "");
}
@Override
- public boolean presetExists(String name)
+ public boolean presetExists(String forName)
{
return false;
}
@Override
- public void deletePreset(String name)
+ public void deletePreset(String forName)
{
}
public void storePreset(String presetName, String text,
List<ArgumentI> jobParams)
{
- // TODO Auto-generated method stub
-
}
@Override
}
@Override
- public WsParamSetI parseServiceParameterFile(String name,
+ public WsParamSetI parseServiceParameterFile(String forName,
String description, String[] serviceURL, String parameters)
throws IOException
{
@Override
public String getName()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public String getDescription()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public String[] getApplicableUrls()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public String getSourceFile()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public void setSourceFile(String newfile)
{
- // TODO Auto-generated method stub
-
}
@Override
public boolean isModifiable()
{
- // TODO Auto-generated method stub
return false;
}
@Override
public List<ArgumentI> getArguments()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public void setArguments(List<ArgumentI> args)
{
- // TODO Auto-generated method stub
-
}
}