- }
- // finally, if any sequences matched, then form the URL and return
- if (seqsmatched == 0 || (createFullUrl && matched[0].length() == 0))
- {
- // no matches - no url generated
- return null;
- }
- // check if we are beyond the feasible command line string limit for this
- // platform
- if ((urllength + 32) > Platform.getMaxCommandLineLength())
- {
- throw new Exception("urllength");
- }
- if (!createFullUrl)
- {
- // just return the essential info about what the URL would be generated
- // from
- return new Object[]
- { new int[]
- { seqsmatched }, thismatched };
- }
- // otherwise, create the URL completely.
-
- StringBuffer submiturl = new StringBuffer();
- submiturl.append(url_prefix);
- for (pass = 0; pass < matched.length; pass++)
- {
- submiturl.append(matched[pass]);
- if (url_suffix[pass] != null)
- {
- submiturl.append(url_suffix[pass]);
- }
- }
-
- return new Object[]
- { new int[]
- { seqsmatched }, thismatched, matched, new String[]
- { submiturl.toString() } };