X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=6d23bd065e3707a5f13e92b7f439bd3622049c3e;hb=4c21d7730da7e3caf652d085718f3220a455067b;hp=fcc4f6db56e87c1365b12524291e20182fba2b94;hpb=13e054c5117102197ee0b22073603a6a38962865;p=jalview.git
diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java
index fcc4f6d..6d23bd0 100755
--- a/src/jalview/bin/Cache.java
+++ b/src/jalview/bin/Cache.java
@@ -28,8 +28,6 @@ import jalview.schemes.UserColourScheme;
import jalview.structure.StructureImportSettings;
import jalview.urls.IdOrgSettings;
import jalview.util.ColorUtils;
-import jalview.ws.dbsources.das.api.DasSourceRegistryI;
-import jalview.ws.dbsources.das.datamodel.DasSourceRegistry;
import jalview.ws.sifts.SiftsSettings;
import java.awt.Color;
@@ -178,7 +176,7 @@ import org.apache.log4j.SimpleLayout;
*
FIGURE_AUTOIDWIDTH (false) Expand the left hand column of an exported
* alignment figure to accommodate even the longest sequence ID or annotation
* label.
- * FIGURE_USERIDWIDTH Specifies the width to use for the left-hand column
+ * FIGURE_FIXEDIDWIDTH Specifies the width to use for the left-hand column
* when exporting an alignment as a figure (setting FIGURE_AUTOIDWIDTH to true
* will override this).
* STRUCT_FROM_PDB (false) derive secondary structure annotation from PDB
@@ -288,7 +286,8 @@ public class Cache
/** Default file is ~/.jalview_properties */
static String propertiesFile;
- private static boolean propsAreReadOnly = false;
+ private static boolean propsAreReadOnly = /** @j2sNative true || */
+ false;
public static void initLogger()
{
@@ -399,7 +398,8 @@ public class Cache
// LOAD THE AUTHORS FROM THE authors.props file
try
{
- String authorDetails = "jar:"
+ String authorDetails = /** @j2sNative "xxx" || */
+ "jar:"
.concat(Cache.class.getProtectionDomain().getCodeSource()
.getLocation().toString().concat("!/authors.props"));
@@ -421,7 +421,8 @@ public class Cache
// VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW
try
{
- String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
+ String buildDetails = /** @j2sNative "xxx" || */
+ "jar:".concat(Cache.class.getProtectionDomain()
.getCodeSource().getLocation().toString()
.concat("!/.build_properties"));
@@ -603,18 +604,13 @@ public class Cache
}
/**
- * These methods are used when checking if the saved preference is different
- * to the default setting
+ * Answers the value of the given property, or the supplied default value if
+ * the property is not set
*/
public static String getDefault(String property, String def)
{
- String string = getProperty(property);
- if (string != null)
- {
- return string;
- }
-
- return def;
+ String value = getProperty(property);
+ return value == null ? def : value;
}
/**
@@ -982,22 +978,6 @@ public class Cache
return null;
}
- private static DasSourceRegistryI sourceRegistry = null;
-
- /**
- * initialise and ..
- *
- * @return instance of the das source registry
- */
- public static DasSourceRegistryI getDasSourceRegistry()
- {
- if (sourceRegistry == null)
- {
- sourceRegistry = new DasSourceRegistry();
- }
- return sourceRegistry;
- }
-
/**
* Set the specified value, or remove it if null or empty. Does not save the
* properties file.
@@ -1072,4 +1052,19 @@ public class Cache
}
}
}
+
+ /**
+ * Add a known domain that implements access-control-allow-origin:* bh 2018
+ *
+ * @param defaultUniprotDomain
+ */
+ public static void addJ2SDirectDatabaseCall(String domain)
+ {
+
+ /**
+ * @j2sNative
+ *
+ * J2S.addDirectDatabaseCall(domain);
+ */
+ }
}