From cd8c794750ddb1ed286c95e2fd40fa44da84e1ec Mon Sep 17 00:00:00 2001 From: kiramt Date: Wed, 16 Nov 2016 13:41:56 +0000 Subject: [PATCH] JAL-2316 Setting up IdentifiersUrlProvider --- src/jalview/urls/IdentifiersUrlProvider.java | 5 +++-- src/jalview/urls/UrlProvider.java | 6 ++++-- src/jalview/urls/UrlProviderI.java | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/jalview/urls/IdentifiersUrlProvider.java b/src/jalview/urls/IdentifiersUrlProvider.java index 1c72ff9..4b88356 100644 --- a/src/jalview/urls/IdentifiersUrlProvider.java +++ b/src/jalview/urls/IdentifiersUrlProvider.java @@ -35,12 +35,13 @@ import java.util.Vector; public class IdentifiersUrlProvider extends UrlProviderImpl { - public IdentifiersUrlProvider(String cachedUrlList) + public IdentifiersUrlProvider(String cachedUrlList, String idFileName) { } - public IdentifiersUrlProvider(Map urlList) + public IdentifiersUrlProvider(Map urlList, + String idFileName) { } diff --git a/src/jalview/urls/UrlProvider.java b/src/jalview/urls/UrlProvider.java index 17b179b..4ae9d13 100644 --- a/src/jalview/urls/UrlProvider.java +++ b/src/jalview/urls/UrlProvider.java @@ -54,7 +54,8 @@ public class UrlProvider implements UrlProviderI // create all the UrlProviders we need providers = new ArrayList(); - UrlProviderI idProvider = new IdentifiersUrlProvider(cachedUrlList); + UrlProviderI idProvider = new IdentifiersUrlProvider(cachedUrlList, + ID_ORG_FILE); customProvider = new CustomUrlProvider(cachedUrlList); providers.add(idProvider); providers.add(customProvider); @@ -79,7 +80,8 @@ public class UrlProvider implements UrlProviderI // create all the UrlProviders we need providers = new ArrayList(); - UrlProviderI idProvider = new IdentifiersUrlProvider(urlList); + UrlProviderI idProvider = new IdentifiersUrlProvider(urlList, + ID_ORG_FILE); customProvider = new CustomUrlProvider(urlList); providers.add(idProvider); providers.add(customProvider); diff --git a/src/jalview/urls/UrlProviderI.java b/src/jalview/urls/UrlProviderI.java index 9ecb28a..4ade3bb 100644 --- a/src/jalview/urls/UrlProviderI.java +++ b/src/jalview/urls/UrlProviderI.java @@ -20,6 +20,7 @@ */ package jalview.urls; +import java.io.File; import java.util.Vector; /** @@ -42,6 +43,12 @@ public interface UrlProviderI public static final String DEFAULT_STRING = DEFAULT_LABEL + "|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"; + /* + * Location of file for identifiers.org download + */ + public static final String ID_ORG_FILE = System.getProperty("user.home") + + File.separatorChar + ".jalview_identifiers"; + /** * Get names and urls in as strings for display * -- 1.7.10.2