Rakesh API

org.rakeshv.tex
Class TransformTextFile

java.lang.Object
  extended by org.rakeshv.tex.TransformTextFile

public final class TransformTextFile
extends java.lang.Object

This class provides static methods that do very common transformations to ASCII text files that are converted to LATEX.


Field Summary
private static com.stevesoft.pat.Regex[] accentRegex
          Regular expressions to convert words to accentuated words.
private static com.stevesoft.pat.Regex[] dateRegex
          Regular expressions that are used to transform unformatted dates to TeX and HTML.
private static com.stevesoft.pat.Regex[] miscRegex
          Regular expression to change miscellaneous things
private static com.stevesoft.pat.Regex[] spellingRegex
          Regular expressions that change American spelling to English
 
Constructor Summary
private TransformTextFile()
          Default constructor.
 
Method Summary
static java.lang.String accentConversions(java.lang.String contents)
          Make words accentuated.
static java.lang.String americanToEnglish(java.lang.String contents)
          Convert American spelling to English.
static java.lang.String convertDates(java.lang.String contents)
          Convert dates to formatted date.
static java.lang.String convertText(java.lang.String contents)
          Convenience method that invokes all the methods.
static java.lang.String miscConversions(java.lang.String contents)
          Make various other transformations to the text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateRegex

private static com.stevesoft.pat.Regex[] dateRegex
Regular expressions that are used to transform unformatted dates to TeX and HTML.


spellingRegex

private static com.stevesoft.pat.Regex[] spellingRegex
Regular expressions that change American spelling to English


miscRegex

private static com.stevesoft.pat.Regex[] miscRegex
Regular expression to change miscellaneous things


accentRegex

private static com.stevesoft.pat.Regex[] accentRegex
Regular expressions to convert words to accentuated words.

Constructor Detail

TransformTextFile

private TransformTextFile()
Default constructor. This is made private to prevent instantiation.

Method Detail

convertText

public static final java.lang.String convertText(java.lang.String contents)

Convenience method that invokes all the methods.

Parameters:
contents - - The input String object that is to be processed.
Returns:
String - The transformed String object.

convertDates

public static final java.lang.String convertDates(java.lang.String contents)

Convert dates to formatted date. Special code is used for generating proper HTML formatted dates.

Parameters:
contents - - The document that is being processed. document.
Returns:
String - The document after adding the part tags.

americanToEnglish

public static final java.lang.String americanToEnglish(java.lang.String contents)
Convert American spelling to English.

Parameters:
contents - - The String object that is to be converted
Returns:
String - The converted String object

miscConversions

public static final java.lang.String miscConversions(java.lang.String contents)

Make various other transformations to the text. Examples are converting double quotes, handling titles ....

Parameters:
contents - - The String object that is to be converted
Returns:
String - The converted String object

accentConversions

public static final java.lang.String accentConversions(java.lang.String contents)

Make words accentuated. Examples are converting facade, fete ....

Parameters:
contents - - The String object that is to be converted
Returns:
String - The converted String object

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan