if (! StringUtil.isBlank(_jalviewUri)) {
_appargs.add(0, _jalviewUri);
}
+ /* don't convert jalviewX:// URIs to https:// URLs as Jalview can now do that
if (_appargs.size() > 0) {
String jalviewUri = _appargs.get(0);
log.info("Trying to parse uri '"+jalviewUri+"'");
- String jalviewUrl = HttpUtils.equivalentJalviewUrl(jalviewUri);
- if (jalviewUrl != null) {
+ if (HttpUtils.isJalviewSchemeUri(jalviewUri)) {
+ String jalviewUrl = HttpUtils.equivalentJalviewUrl(jalviewUri);
log.info("Turned url '"+jalviewUri+"' into '"+jalviewUrl+"'");
_appargs.clear();
_appargs.add(jalviewUrl);
}
}
+ */
for (String argString: _appargs) {
if (argString.startsWith("-jvmmempc=")) {
filename = p;
}
+ /* Now letting Jalview convert these URIs.
// convert jalviewX://... URLs
if (HttpUtils.isJalviewSchemeUri(filename)) {
filename = HttpUtils.equivalentJalviewUrl(filename);
}
+ */
// check for locator file. Only allow one locator file to be double clicked (if multiple files opened, ignore locator files)
if (filename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
- setLocatorFile(filename);
+ // convert jalviewX://... JVL files
+ setLocatorFile(HttpUtils.equivalentJalviewUrl(filename));
} else {
// skip any other locator files in a multiple file list
addStartupFile(filename);
} else {
sb.append(' ');
}
- String p = changeJalviewSchemeUris && HttpUtils.isJalviewSchemeUri(f) ? HttpUtils.equivalentJalviewUrl(f) : f;
+ String p = changeJalviewSchemeUris ? HttpUtils.equivalentJalviewUrl(f) : f;
if (p.contains(" ")) {
sb.append('"');
sb.append(p);
String argvLocatorFilename = argv.length > 2 ? argv[2] : null;
if (!StringUtil.isBlank(argvLocatorFilename)
&& argvLocatorFilename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
- if (HttpUtils.isJalviewSchemeUri(argvLocatorFilename)) {
- argvLocatorFilename = HttpUtils.equivalentJalviewUrl(argvLocatorFilename);
- }
+ argvLocatorFilename = HttpUtils.equivalentJalviewUrl(argvLocatorFilename);
notes.add(Note.info("locatorFilename in args: '"+argv[2]+"'"));
Application.setLocatorFile(argvLocatorFilename);
{
if (!isJalviewSchemeUri(jalviewUriString))
{
- return null;
+ // not a jalviewUriString, hand it back
+ return jalviewUriString;
}
URI jalviewUri;
try
}
String scheme = jalviewUri.getScheme();
String host = jalviewUri.getHost();
- if (host != null && host.length() > 0)
+ if (host != null && host.length() > 0
+ || scheme.substring(7).startsWith("http"))
{
URI newUri;
try