X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FUrlLink.java;h=007b5024eb529e5c28454631eaf588467135d7fc;hb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;hp=00e33b2a83c4beac3ff58895c28b32075635cf3d;hpb=499899ef6e62998ca49318b728d2f1da8fb21173;p=jalview.git
diff --git a/src/jalview/util/UrlLink.java b/src/jalview/util/UrlLink.java
index 00e33b2..007b502 100644
--- a/src/jalview/util/UrlLink.java
+++ b/src/jalview/util/UrlLink.java
@@ -1,20 +1,19 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
- * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This file is part of Jalview.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
*/
package jalview.util;
@@ -28,8 +27,8 @@ public class UrlLink
* Jalview 2.4 extension allows regular expressions to be used to parse ID
* strings and replace the result in the URL. Regex's operate on the whole ID
* string given to the matchURL method, if no regex is supplied, then only
- * text following the first pipe symbol will be susbstituted.
- * Usage documentation todo.
+ * text following the first pipe symbol will be susbstituted. Usage
+ * documentation todo.
*/
private String url_suffix, url_prefix, target, label, regexReplace;
@@ -173,7 +172,9 @@ public class UrlLink
/**
* Check if URL string was parsed properly.
- * @return boolean - if false then getInvalidMessage
returns an error message
+ *
+ * @return boolean - if false then getInvalidMessage
returns an
+ * error message
*/
public boolean isValid()
{
@@ -184,9 +185,9 @@ public class UrlLink
* return one or more URL strings by applying regex to the given idstring
*
* @param idstring
- * @param onlyIfMatches -
- * when true url strings are only made if regex is defined and
- * matches
+ * @param onlyIfMatches
+ * - when true url strings are only made if regex is defined and
+ * matches
* @return String[] { part of idstring substituted, full substituted url , ..
* next part, next url..}
*/
@@ -208,8 +209,9 @@ public class UrlLink
{ rg.stringMatched(),
url_prefix + rg.stringMatched() + url_suffix };
} /*
- * else if (ns==1) { // take only subgroup match return new String[] {
- * rg.stringMatched(1), url_prefix+rg.stringMatched(1)+url_suffix }; }
+ * else if (ns==1) { // take only subgroup match return new String[]
+ * { rg.stringMatched(1), url_prefix+rg.stringMatched(1)+url_suffix
+ * }; }
*/
else
{
@@ -329,13 +331,16 @@ public class UrlLink
/*
* "AlinkT|Target|http://foo.foo.soo/",
* "myUrl1|http://$SEQUENCE_ID=/[0-9]+/=$.someserver.org/foo",
- * "myUrl2|http://$SEQUENCE_ID=/(([0-9]+).+([A-Za-z]+))/=$.someserver.org/foo",
- * "myUrl3|http://$SEQUENCE_ID=/([0-9]+).+([A-Za-z]+)/=$.someserver.org/foo",
- * "myUrl4|target|http://$SEQUENCE_ID$.someserver.org/foo|too",
- * "PF1|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/(?:PFAM:)?(.+)/=$",
- * "PF2|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/(PFAM:)?(.+)/=$",
- * "PF3|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/PFAM:(.+)/=$",
- * "NOTFER|http://notfer.org/$SEQUENCE_ID=/(?