}
}
- /**
- * Add a known domain that implements access-control-allow-origin:* bh 2018
- *
- * @param defaultUniprotDomain
- */
- public static void addJ2SDirectDatabaseCall(String domain)
- {
-
- /**
- * @j2sNative
- *
- * J2S.addDirectDatabaseCall(domain);
- */
- }
}
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
// grab all the rights we can for the JVM
@SuppressWarnings("unused")
private static void setLogging()
{
+
+ /**
+ * @j2sIgnore
+ *
+ */
+ {
+ System.out.println("not in js");
+ }
+
// BH - for event debugging in JavaScript (Java mode only)
if (!Platform.isJS())
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
Logger.getLogger("").setLevel(Level.ALL);
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
if (aparser.contains("help") || aparser.contains("h"))
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
desktop.startServiceDiscovery();
/**
* ignore in JavaScript -- can't just file existence - could load it?
*
- * @j2sNative
+ * @j2sIgnore
*/
{
if (!file.startsWith("http://") && !file.startsWith("https://"))
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
file = jalview.bin.Cache.getDefault("STARTUP_FILE",
*/
package jalview.ext.ensembl;
-import jalview.bin.Cache;
import jalview.util.Platform;
import jalview.util.StringUtils;
static
{
- Cache.addJ2SDirectDatabaseCall("http://rest.ensembl");
- Cache.addJ2SDirectDatabaseCall("https://rest.ensembl");
+ Platform.addJ2SDirectDatabaseCall("http://rest.ensembl");
+ Platform.addJ2SDirectDatabaseCall("https://rest.ensembl");
}
private static final int DEFAULT_READ_TIMEOUT = 5 * 60 * 1000; // 5 minutes
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
client = Client.create(new DefaultClientConfig());
private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org";
static {
- Cache.addJ2SDirectDatabaseCall(DEFAULT_UNIPROT_DOMAIN);
+ Platform.addJ2SDirectDatabaseCall(DEFAULT_UNIPROT_DOMAIN);
}
private static FTSRestClientI instance = null;
DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";
}
+ @SuppressWarnings("unchecked")
@Override
public FTSRestResponse executeRequest(FTSRestRequest uniprotRestRequest)
throws Exception
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
// Java only
return searchResult;
}
- /**
- * Takes a collection of FTSDataColumnI and converts its 'code' values into a
- * tab delimited string.
- *
- * @param dataColumnFields
- * the collection of FTSDataColumnI to process
- * @return the generated comma delimited string from the supplied
- * FTSDataColumnI collection
- */
- private String getDataColumnsFieldsAsTabDelimitedString(
- Collection<FTSDataColumnI> dataColumnFields)
- {
- String result = "";
- if (dataColumnFields != null && !dataColumnFields.isEmpty())
- {
- StringBuilder returnedFields = new StringBuilder();
- for (FTSDataColumnI field : dataColumnFields)
- {
- if (field.getName().equalsIgnoreCase("Uniprot Id"))
- {
- returnedFields.append("\t").append("Entry");
- }
- else
- {
- returnedFields.append("\t").append(field.getName());
- }
- }
- returnedFields.deleteCharAt(0);
- result = returnedFields.toString();
- }
- return result;
- }
+ // /**
+ // * Takes a collection of FTSDataColumnI and converts its 'code' values into
+ // a
+ // * tab delimited string.
+ // *
+ // * @param dataColumnFields
+ // * the collection of FTSDataColumnI to process
+ // * @return the generated comma delimited string from the supplied
+ // * FTSDataColumnI collection
+ // */
+ // private String getDataColumnsFieldsAsTabDelimitedString(
+ // Collection<FTSDataColumnI> dataColumnFields)
+ // {
+ // String result = "";
+ // if (dataColumnFields != null && !dataColumnFields.isEmpty())
+ // {
+ // StringBuilder returnedFields = new StringBuilder();
+ // for (FTSDataColumnI field : dataColumnFields)
+ // {
+ // if (field.getName().equalsIgnoreCase("Uniprot Id"))
+ // {
+ // returnedFields.append("\t").append("Entry");
+ // }
+ // else
+ // {
+ // returnedFields.append("\t").append(field.getName());
+ // }
+ // }
+ // returnedFields.deleteCharAt(0);
+ // result = returnedFields.toString();
+ // }
+ // return result;
+ // }
public static FTSData getFTSData(String tabDelimittedDataStr,
FTSRestRequest request)
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
JEditorPane editPane = new JEditorPane("text/html", "");
private HiddenColumns oldHiddenColumns;
+ // J2SHIDDENCODE
protected static int MIN_WIDTH = (/** @j2sNative 370||*/420);
+ // J2SHIDDENCODE
protected static int MIN_HEIGHT = (/** @j2sNative 370||*/430);
public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
JComboBox<String> asCombo = new JComboBox<>();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
Help.showHelpWindow();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
chooser.setRequestFocusEnabled(true);
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
scrollThread.start();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
handleResponse(response);
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
handleResponse(response);
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
wsPrefs = new WsPreferences();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
JFileChooser chooser = new JFileChooser(".");
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
authlist = new JTextPane();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
((JTextPane) authlist).setEditable(false);
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
authlist = new JTextPane();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
String name = schemeName.getText().trim();
/**
* java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
/*
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
// Java ('normal') method is to scale the font to fit
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*
*/
{
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*
*/
{
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*
*/
{
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
public static void streamToFile(InputStream is, File outFile)
throws IOException
{
- if (!isJS() || /**
- * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) ||
- */
- false)
+ if (isJS() && /**
+ * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) &&
+ */
+ true)
{
return;
}
}
}
+ /**
+ * Add a known domain that implements access-control-allow-origin:*
+ *
+ * These should be reviewed periodically.
+ *
+ * @param domain
+ * for a service that is not allowing ajax
+ *
+ * @author hansonr@stolaf.edu
+ *
+ */
+ public static void addJ2SDirectDatabaseCall(String domain)
+ {
+
+ System.out.println(
+ "Platform adding no-access-control-allow-origin domain "
+ + domain);
+
+ /**
+ * @j2sNative
+ *
+ * J2S.addDirectDatabaseCall(domain);
+ */
+ }
+
}
-20190403083450
+20190403175448
-20190403083450
+20190403175448