git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56cdd4b
)
refactored protocol parser and allow human readable datasource name to be modified
author
jprocter
<Jim Procter>
Sun, 14 Nov 2010 14:56:35 +0000
(14:56 +0000)
committer
jprocter
<Jim Procter>
Sun, 14 Nov 2010 14:56:35 +0000
(14:56 +0000)
src/jalview/io/FileParse.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/FileParse.java
b/src/jalview/io/FileParse.java
index
4670d99
..
e972679
100755
(executable)
--- a/
src/jalview/io/FileParse.java
+++ b/
src/jalview/io/FileParse.java
@@
-374,6
+374,14
@@
public class FileParse
{
return dataName;
}
{
return dataName;
}
+ /**
+ * set the (human readable) name or URI for this datasource
+ * @param dataname
+ */
+ protected void setDataName(String dataname) {
+ dataName = dataname;
+ }
+
public Reader getReader() throws IOException
{
public Reader getReader() throws IOException
{
@@
-383,4
+391,15
@@
public class FileParse
}
return null;
}
}
return null;
}
+
+ public static String checkProtocol(String file)
+ {
+ String protocol = jalview.io.FormatAdapter.FILE;
+
+ if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
+ {
+ protocol = jalview.io.FormatAdapter.URL;
+ }
+ return protocol;
+ }
}
}