uk.ac.ebi.intenz.webapp.utilities
Class IntEnzUtilities

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

public class IntEnzUtilities
extends Object

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

Version:
$Revision: 1.2 $ $Date: 2008/01/28 12:33:09 $
Author:
Michael Darsow

Constructor Summary
IntEnzUtilities()
           
 
Method Summary
static String firstLetterToUppercase(String text)
          Replaces the first letter with the uppercase letter.
static String linkMarkedEC(String string2Check, boolean linkUnmarkedECs)
          Transforms old links to EC numbers to the current way of linking to them.
static String linkUnmarkedEC(String text)
          Tries to link all EC numbers and checks whether the first letter is a uppercase letter.
 
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

linkUnmarkedEC

public static String linkUnmarkedEC(String text)
Tries to link all EC numbers and checks whether the first letter is a uppercase letter.

Parameters:
text - The history comment to be formatted.
Returns:
the formatted history comment.
Throws:
NullPointerException - if text is null.

linkMarkedEC

public static String linkMarkedEC(String string2Check,
                                  boolean linkUnmarkedECs)
Transforms old links to EC numbers to the current way of linking to them.

Old links may still contain hyperlinks with the wrong syntax. This method corrects these links according to the new format.

Preferably this method gets redundant, if links to EC numbers are generated on the fly in the future entirely (see linkUnmarkedEC(String). At the moment it has not been agreed upon this as some EC should not be linked automatically (esp. in comments).

Parameters:
string2Check - String to be checked for outdated links.
linkUnmarkedECs -
Returns:
a corrected version of the given string.

firstLetterToUppercase

public static String firstLetterToUppercase(String text)
Replaces the first letter with the uppercase letter.

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


Copyright © 2013 EMBL-EBI. All Rights Reserved.