git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into features/JAL-1793VCF
[jalview.git]
/
src
/
jalview
/
ws
/
rest
/
params
/
Alignment.java
diff --git
a/src/jalview/ws/rest/params/Alignment.java
b/src/jalview/ws/rest/params/Alignment.java
index
a8258e2
..
4426c5f
100644
(file)
--- a/
src/jalview/ws/rest/params/Alignment.java
+++ b/
src/jalview/ws/rest/params/Alignment.java
@@
-79,11
+79,11
@@
public class Alignment extends InputType
try
{
File fa = File.createTempFile("jvmime", ".fa");
try
{
File fa = File.createTempFile("jvmime", ".fa");
- PrintWriter pw = new PrintWriter(
- new OutputStreamWriter(new BufferedOutputStream(
- new FileOutputStream(fa)), "UTF-8"));
- pw.append(new FormatAdapter().formatSequences(format,
- alignment, jvsuffix));
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(
+ new BufferedOutputStream(new FileOutputStream(fa)),
+ "UTF-8"));
+ pw.append(new FormatAdapter().formatSequences(format, alignment,
+ jvsuffix));
pw.close();
return new FileBody(fa, "text/plain");
} catch (Exception ex)
pw.close();
return new FileBody(fa, "text/plain");
} catch (Exception ex)
@@
-108,8
+108,8
@@
public class Alignment extends InputType
@Override
public List<String> getURLEncodedParameter()
{
@Override
public List<String> getURLEncodedParameter()
{
- ArrayList<String> prms = new ArrayList<String>();
- prms.add("format='" + format + "'");
+ List<String> prms = new ArrayList<String>();
+ prms.add("format='" + format.getName() + "'");
if (type != null)
{
prms.add("type='" + type.toString() + "'");
if (type != null)
{
prms.add("type='" + type.toString() + "'");
@@
-156,8
+156,8
@@
public class Alignment extends InputType
return true;
}
}
return true;
}
}
- warnings.append("Invalid alignment format '" + val
- + "'. Must be one of (");
+ warnings.append(
+ "Invalid alignment format '" + val + "'. Must be one of (");
for (String fmt : FileFormats.getInstance().getWritableFormats(true))
{
warnings.append(" ").append(fmt);
for (String fmt : FileFormats.getInstance().getWritableFormats(true))
{
warnings.append(" ").append(fmt);
@@
-172,8
+172,8
@@
public class Alignment extends InputType
return true;
} catch (Exception x)
{
return true;
} catch (Exception x)
{
- warnings.append("Invalid molecule type '" + val
- + "'. Must be one of (");
+ warnings.append(
+ "Invalid molecule type '" + val + "'. Must be one of (");
for (molType v : molType.values())
{
warnings.append(" " + v);
for (molType v : molType.values())
{
warnings.append(" " + v);
@@
-195,12
+195,12
@@
public class Alignment extends InputType
"Append jalview style /start-end suffix to ID", false, false,
writeAsFile, null));
"Append jalview style /start-end suffix to ID", false, false,
writeAsFile, null));
- List<String> writable = FileFormats
- .getInstance().getWritableFormats(true);
+ List<String> writable = FileFormats.getInstance()
+ .getWritableFormats(true);
lst.add(new Option("format", "Alignment upload format", true,
lst.add(new Option("format", "Alignment upload format", true,
- FileFormat.Fasta.toString(), format.getName(), writable,
+ FileFormat.Fasta.toString(), format.getName(), writable, null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
null));
null));
- lst.add(createMolTypeOption("type", "Sequence type", false, type, null));
return lst;
}
return lst;
}