*/
public class WsParamSetManager implements ParamManager
{
- Hashtable<String, ParamDatastoreI> paramparsers = new Hashtable<String, ParamDatastoreI>();
+ private static final String WS_PARAM_FILES = "WS_PARAM_FILES";
+ Hashtable<String, ParamDatastoreI> paramparsers = new Hashtable<>();
@Override
public WsParamSetI[] getParameterSet(String name, String serviceUrl,
boolean modifiable, boolean unmodifiable)
{
- String files = Cache.getProperty("WS_PARAM_FILES");
+ String files = Cache.getProperty(WS_PARAM_FILES);
if (files == null)
{
return null;
}
StringTokenizer st = new StringTokenizer(files, "|");
String pfile = null;
- ArrayList<WsParamSetI> params = new ArrayList<WsParamSetI>();
+ ArrayList<WsParamSetI> params = new ArrayList<>();
while (st.hasMoreTokens())
{
pfile = st.nextToken();
} catch (IOException e)
{
Cache.log.info("Failed to parse parameter file " + pfile
- + " (Check that all JALVIEW_WSPARAMFILES entries are valid!)",
+ + " (Check that all " + WS_PARAM_FILES
+ + " entries are valid!)",
e);
}
}
private WsParamSetI[] parseParamFile(String filename) throws IOException
{
- List<WsParamSetI> psets = new ArrayList<WsParamSetI>();
+ List<WsParamSetI> psets = new ArrayList<>();
InputStreamReader is = new InputStreamReader(
new java.io.FileInputStream(new File(filename)), "UTF-8");
}
if (outfile != null)
{
- String paramFiles = jalview.bin.Cache.getDefault("WS_PARAM_FILES",
+ String paramFiles = jalview.bin.Cache.getDefault(WS_PARAM_FILES,
filename);
if (paramFiles.indexOf(filename) == -1)
{
}
paramFiles = paramFiles.concat(filename);
}
- jalview.bin.Cache.setProperty("WS_PARAM_FILES", paramFiles);
+ jalview.bin.Cache.setProperty(WS_PARAM_FILES, paramFiles);
jalview.schemabinding.version2.WebServiceParameterSet paramxml = new jalview.schemabinding.version2.WebServiceParameterSet();
{
return;
}
- String paramFiles = jalview.bin.Cache.getDefault("WS_PARAM_FILES", "");
+ String paramFiles = jalview.bin.Cache.getDefault(WS_PARAM_FILES, "");
if (paramFiles.indexOf(filename) > -1)
{
String nparamFiles = new String();
nparamFiles = nparamFiles.concat("|").concat(fl);
}
}
- jalview.bin.Cache.setProperty("WS_PARAM_FILES", nparamFiles);
+ jalview.bin.Cache.setProperty(WS_PARAM_FILES, nparamFiles);
}
try