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
file format enum wip changes
[jalview.git]
/
src
/
jalview
/
io
/
AnnotationFile.java
diff --git
a/src/jalview/io/AnnotationFile.java
b/src/jalview/io/AnnotationFile.java
index
d738882
..
6e121b3
100755
(executable)
--- a/
src/jalview/io/AnnotationFile.java
+++ b/
src/jalview/io/AnnotationFile.java
@@
-661,7
+661,7
@@
public class AnnotationFile
String refSeqId = null;
public boolean annotateAlignmentView(AlignViewportI viewport,
String refSeqId = null;
public boolean annotateAlignmentView(AlignViewportI viewport,
- String file, String protocol)
+ String file, DataSourceType protocol)
{
ColumnSelection colSel = viewport.getColumnSelection();
if (colSel == null)
{
ColumnSelection colSel = viewport.getColumnSelection();
if (colSel == null)
@@
-679,31
+679,31
@@
public class AnnotationFile
}
public boolean readAnnotationFile(AlignmentI al, String file,
}
public boolean readAnnotationFile(AlignmentI al, String file,
- String protocol)
+ DataSourceType sourceType)
{
{
- return readAnnotationFile(al, null, file, protocol);
+ return readAnnotationFile(al, null, file, sourceType);
}
public boolean readAnnotationFile(AlignmentI al, ColumnSelection colSel,
}
public boolean readAnnotationFile(AlignmentI al, ColumnSelection colSel,
- String file, String protocol)
+ String file, DataSourceType sourceType)
{
BufferedReader in = null;
try
{
{
BufferedReader in = null;
try
{
- if (protocol.equals(AppletFormatAdapter.FILE))
+ if (sourceType == DataSourceType.FILE)
{
in = new BufferedReader(new FileReader(file));
}
{
in = new BufferedReader(new FileReader(file));
}
- else if (protocol.equals(AppletFormatAdapter.URL))
+ else if (sourceType == DataSourceType.URL)
{
URL url = new URL(file);
in = new BufferedReader(new InputStreamReader(url.openStream()));
}
{
URL url = new URL(file);
in = new BufferedReader(new InputStreamReader(url.openStream()));
}
- else if (protocol.equals(AppletFormatAdapter.PASTE))
+ else if (sourceType == DataSourceType.PASTE)
{
in = new BufferedReader(new StringReader(file));
}
{
in = new BufferedReader(new StringReader(file));
}
- else if (protocol.equals(AppletFormatAdapter.CLASSLOADER))
+ else if (sourceType == DataSourceType.CLASSLOADER)
{
java.io.InputStream is = getClass().getResourceAsStream("/" + file);
if (is != null)
{
java.io.InputStream is = getClass().getResourceAsStream("/" + file);
if (is != null)