Skip to content

Commit 63d2ee7

Browse files
committed
bcif/models URL is a constant
1 parent f36f82c commit 63d2ee7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public abstract class LocalPDBDirectory implements StructureIOFile {
6363
public static final String DEFAULT_PDB_FILE_SERVER = "http://ftp.wwpdb.org";
6464
public static final String PDB_FILE_SERVER_PROPERTY = "PDB.FILE.SERVER";
6565

66+
/**
67+
* The default server to retrieve BinaryCIF files.
68+
*/
69+
public static final String DEFAULT_BCIF_FILE_SERVER = "https://models.rcsb.org/";
70+
6671
/**
6772
* Behaviors for when an obsolete structure is requested.
6873
* @author Spencer Bliven
@@ -521,7 +526,8 @@ private File downloadStructure(String pdbId, String pathOnServer, boolean obsole
521526
if (filename.endsWith(".mmtf.gz")){
522527
ftp = CodecUtils.getMmtfEntryUrl(pdbId, true, false);
523528
} else if (filename.endsWith(".bcif") || filename.endsWith(".bcif.gz")) {
524-
ftp = "https://models.rcsb.org/" + filename;
529+
// TODO this should be configurable
530+
ftp = DEFAULT_BCIF_FILE_SERVER + filename;
525531
} else {
526532
ftp = String.format("%s%s/%s/%s",
527533
serverName, pathOnServer, pdbId.substring(1,3).toLowerCase(), getFilename(pdbId));

0 commit comments

Comments
 (0)