textmaven.util
Class Helper

java.lang.Object
  extended bytextmaven.util.Helper

public class Helper
extends java.lang.Object

Author:
krebtho

Constructor Summary
Helper()
           
 
Method Summary
static java.lang.String compress(java.lang.String in)
           
static java.lang.String replaceItemTag(java.lang.String src, java.lang.String startTag, java.lang.String endTag, java.lang.String classID)
          This is not like I originally intended to solve this.
static java.lang.String replaceVariables(java.lang.String str)
          Substitutes all strings enclosed in % characters.
static java.lang.String toSingleLine(java.lang.String in)
          Converts specified string into a single line string, removing all \n and \r characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper()
Method Detail

replaceVariables

public static java.lang.String replaceVariables(java.lang.String str)
Substitutes all strings enclosed in % characters. It tries to retrieve the replacing string from the system properties. If no value was specified it is replaced with an empty string.

Parameters:
str -
Returns:
String all strings enclosed in % replaced by appropriate system properties.

replaceItemTag

public static final java.lang.String replaceItemTag(java.lang.String src,
                                                    java.lang.String startTag,
                                                    java.lang.String endTag,
                                                    java.lang.String classID)
This is not like I originally intended to solve this. I planned to use XLST until I realized that the stuff I get from the database is not well-formed, caused by the occurences of < characters.

Parameters:
src - string on which operation should occur
startTag - start tag which should replace
endTag - end tag which should replace
classID - CSS class id for the new start tag
Returns:
String string result of replace

toSingleLine

public static java.lang.String toSingleLine(java.lang.String in)
Converts specified string into a single line string, removing all \n and \r characters.

Parameters:
in - input string
Returns:
single line string trimmed and without duplicate space characters.

compress

public static java.lang.String compress(java.lang.String in)


Copyright © 2002-2005 Sourceforge. All Rights Reserved.