From f45e01876a1179983d96b9fde840614a0adf5915 Mon Sep 17 00:00:00 2001 From: Gary Murphy Date: Mon, 8 Jan 2024 12:04:02 -0600 Subject: [PATCH] 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. --- .../nbio/structure/scop/ScopInstallation.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/scop/ScopInstallation.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/scop/ScopInstallation.java index b7ee585279..019e084a5d 100644 --- a/biojava-structure/src/main/java/org/biojava/nbio/structure/scop/ScopInstallation.java +++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/scop/ScopInstallation.java @@ -85,8 +85,8 @@ public class ScopInstallation implements LocalScopDatabase { public static final String comFileName = "dir.com.scop.txt_"; // Download locations - public static final String SCOP_DOWNLOAD = "http://scop.berkeley.edu/downloads/parse/"; - public static final String SCOP_DOWNLOAD_ALTERNATE = "http://scop.berkeley.edu/downloads/parse/"; + public static final String SCOP_DOWNLOAD = "https://scop.berkeley.edu/downloads/parse/"; + public static final String SCOP_DOWNLOAD_ALTERNATE = "https://scop.berkeley.edu/downloads/parse/"; //public static final String NEWLINE = System.getProperty("line.separator"); public static final String FILESPLIT = System.getProperty("file.separator"); @@ -913,10 +913,19 @@ private void initScopURLs() { // first, try default scop ScopMirror primary = new ScopMirror(); // If unreachable, try alternate Berkeley location - ScopMirror alt = new ScopMirror( - SCOP_DOWNLOAD_ALTERNATE, - "dir.cla.scop.%s.txt","dir.des.scop.%s.txt", - "dir.hie.scop.%s.txt","dir.com.scop.%s.txt"); + ScopMirror alt; + if (scopVersion.startsWith("2.")) { + alt = new ScopMirror( + SCOP_DOWNLOAD_ALTERNATE, + "dir.cla.scope.%s.txt","dir.des.scope.%s.txt", + "dir.hie.scope.%s.txt","dir.com.scope.%s.txt"); + } + else { + alt = new ScopMirror( + SCOP_DOWNLOAD_ALTERNATE, + "dir.cla.scop.%s.txt","dir.des.scop.%s.txt", + "dir.hie.scop.%s.txt","dir.com.scop.%s.txt"); + } mirrors.add(primary); mirrors.add(alt); }