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
JAL-1919 code improvement to make PDB sequence fetcher file format configurable....
[jalview.git]
/
src
/
jalview
/
ws
/
dbsources
/
Pdb.java
diff --git
a/src/jalview/ws/dbsources/Pdb.java
b/src/jalview/ws/dbsources/Pdb.java
index
3fd7541
..
358c838
100644
(file)
--- a/
src/jalview/ws/dbsources/Pdb.java
+++ b/
src/jalview/ws/dbsources/Pdb.java
@@
-47,6
+47,8
@@
public class Pdb extends EbiFileRetrievedProxy
super();
}
super();
}
+ private static String currentDefaultFomart = DBRefSource.MMCIF;
+
/*
* (non-Javadoc)
*
/*
* (non-Javadoc)
*
@@
-124,8
+126,12
@@
public class Pdb extends EbiFileRetrievedProxy
stopQuery();
return null;
}
stopQuery();
return null;
}
+ String ext = getCurrentDefaultFomart().equalsIgnoreCase("mmcif") ? ".cif"
+ : ".xml";
EBIFetchClient ebi = new EBIFetchClient();
EBIFetchClient ebi = new EBIFetchClient();
- file = ebi.fetchDataAsFile("pdb:" + id, "pdb", "raw").getAbsolutePath();
+ file = ebi.fetchDataAsFile("pdb:" + id,
+ getCurrentDefaultFomart().toLowerCase(), "raw", ext)
+ .getAbsolutePath();
stopQuery();
if (file == null)
{
stopQuery();
if (file == null)
{
@@
-135,7
+141,8
@@
public class Pdb extends EbiFileRetrievedProxy
{
pdbAlignment = new FormatAdapter().readFile(file,
{
pdbAlignment = new FormatAdapter().readFile(file,
- jalview.io.AppletFormatAdapter.FILE, "PDB");
+ jalview.io.AppletFormatAdapter.FILE,
+ getCurrentDefaultFomart());
if (pdbAlignment != null)
{
List<SequenceI> toremove = new ArrayList<SequenceI>();
if (pdbAlignment != null)
{
List<SequenceI> toremove = new ArrayList<SequenceI>();
@@
-249,4
+256,14
@@
public class Pdb extends EbiFileRetrievedProxy
{
return 0;
}
{
return 0;
}
+
+ public static String getCurrentDefaultFomart()
+ {
+ return currentDefaultFomart;
+ }
+
+ public static void setCurrentDefaultFomart(String currentDefaultFomart)
+ {
+ Pdb.currentDefaultFomart = currentDefaultFomart;
+ }
}
}