uk.ac.ebi.intenz.webapp
Class IntEnzUtilities

java.lang.Object
  extended by uk.ac.ebi.intenz.webapp.IntEnzUtilities

public class IntEnzUtilities
extends Object

Provides utility classes, which are used throughout the whole project.

Version:
0.9 - 21-July-2003
Author:
Michael Darsow

Constructor Summary
IntEnzUtilities()
           
 
Method Summary
static String cleanInternalLinks(String string2check, boolean uppercaseFirstLetter)
          Deprecated. use cleanLinks(String) and firstLetterToUppercase(String)
static String cleanLinks(String s)
           
static String firstLetterToUppercase(String text)
          Deprecated. use JSTL's fn:toUpperCase and fn:substring instead
static String getLinkedFlatFile(String flatFile)
          Create hyperlinks for all cross-references (xrefs) in a flat file.
static String link2carb(String s)
          Generates links to IUPAC carbohydrate nomenclature pages wherever it finds a 2-Carb- prefixed word.
static String linkEcNumber(String ecString, boolean uppercaseFirstLetter)
          Deprecated. use linkEcNumbers(String) instead and - if needed - firstLetterToUppercase(String)
static String linkEcNumbers(String ecString)
           
static String linkMerops(String s)
          Generates a hypertext link to MEROPS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntEnzUtilities

public IntEnzUtilities()
Method Detail

linkEcNumber

public static String linkEcNumber(String ecString,
                                  boolean uppercaseFirstLetter)
Deprecated. use linkEcNumbers(String) instead and - if needed - firstLetterToUppercase(String)

Tries to link all EC numbers and checks whether the first letter is an uppercase letter.

Parameters:
ecString - The String to be formatted.
uppercaseFirstLetter - whether to uppercase the first letter or not
Returns:
the formatted history comment.

linkEcNumbers

public static String linkEcNumbers(String ecString)

link2carb

public static String link2carb(String s)
Generates links to IUPAC carbohydrate nomenclature pages wherever it finds a 2-Carb- prefixed word.

Parameters:
s -
Returns:

linkMerops

public static String linkMerops(String s)
Generates a hypertext link to MEROPS. It tries to guess that the text is about peptidase families, and then links are generated after the words family or families if the following word looks like a MEROPS identifier.

Parameters:
s -
Returns:

cleanInternalLinks

public static String cleanInternalLinks(String string2check,
                                        boolean uppercaseFirstLetter)
Deprecated. use cleanLinks(String) and firstLetterToUppercase(String)

Cleans the string of links around EC numbers (if any), and then creates the proper IntEnz links.

Parameters:
string2Check -
uppercaseFirstLetter - whether to uppercase the first letter or not
Returns:
A String with EC numbers wrapped in HTML links to IntEnz pages.

cleanLinks

public static String cleanLinks(String s)

firstLetterToUppercase

public static String firstLetterToUppercase(String text)
Deprecated. use JSTL's fn:toUpperCase and fn:substring instead

Replaces the first letter with the uppercase letter.

Parameters:
text - to be checked.
Returns:
formatted string.

getLinkedFlatFile

public static String getLinkedFlatFile(String flatFile)
Create hyperlinks for all cross-references (xrefs) in a flat file.

Parameters:
flatFile - The flat file string.
Returns:
the hyperlinked flat file string.
Throws:
NullPointerException - if flatFile is null.


Copyright © 2013 EMBL-EBI. All Rights Reserved.