Skip to content

Commit f45e018

Browse files
committed
Changed the URLs to the mirrors from http to https. Changed the name of the URL path to reflect a change in the v2 naming.
1 parent f0320f5 commit f45e018

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/scop/ScopInstallation.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public class ScopInstallation implements LocalScopDatabase {
8585
public static final String comFileName = "dir.com.scop.txt_";
8686

8787
// Download locations
88-
public static final String SCOP_DOWNLOAD = "http://scop.berkeley.edu/downloads/parse/";
89-
public static final String SCOP_DOWNLOAD_ALTERNATE = "http://scop.berkeley.edu/downloads/parse/";
88+
public static final String SCOP_DOWNLOAD = "https://scop.berkeley.edu/downloads/parse/";
89+
public static final String SCOP_DOWNLOAD_ALTERNATE = "https://scop.berkeley.edu/downloads/parse/";
9090

9191
//public static final String NEWLINE = System.getProperty("line.separator");
9292
public static final String FILESPLIT = System.getProperty("file.separator");
@@ -913,10 +913,19 @@ private void initScopURLs() {
913913
// first, try default scop
914914
ScopMirror primary = new ScopMirror();
915915
// If unreachable, try alternate Berkeley location
916-
ScopMirror alt = new ScopMirror(
917-
SCOP_DOWNLOAD_ALTERNATE,
918-
"dir.cla.scop.%s.txt","dir.des.scop.%s.txt",
919-
"dir.hie.scop.%s.txt","dir.com.scop.%s.txt");
916+
ScopMirror alt;
917+
if (scopVersion.startsWith("2.")) {
918+
alt = new ScopMirror(
919+
SCOP_DOWNLOAD_ALTERNATE,
920+
"dir.cla.scope.%s.txt","dir.des.scope.%s.txt",
921+
"dir.hie.scope.%s.txt","dir.com.scope.%s.txt");
922+
}
923+
else {
924+
alt = new ScopMirror(
925+
SCOP_DOWNLOAD_ALTERNATE,
926+
"dir.cla.scop.%s.txt","dir.des.scop.%s.txt",
927+
"dir.hie.scop.%s.txt","dir.com.scop.%s.txt");
928+
}
920929
mirrors.add(primary);
921930
mirrors.add(alt);
922931
}

0 commit comments

Comments
 (0)