com.edustructures.sifworks.tools.xpath
Class ADKFunctions

java.lang.Object
  extended by com.edustructures.sifworks.tools.xpath.ADKFunctions

public class ADKFunctions
extends java.lang.Object

Contains built-in functions that are automatically registered with SIFXPathContext, using the namespace prefix "adk". See the class documentation for SIFXPathContext for an example of using these functions.

Version:
ADK 2.0

Constructor Summary
ADKFunctions()
           
 
Method Summary
static boolean equalsIgnoreCase(java.lang.String str1, java.lang.String str2)
          Returns true if the two strings are equal, ignoring any differences in case
static java.lang.String padBegin(java.lang.String source, java.lang.String padding, int width)
          padBegin( Source, PadChar, Width ) Pads the beginning of the Source string with the specified PadChar character so that the source string is at least Width characters in length.
static java.lang.String padEnd(java.lang.String source, java.lang.String padding, int width)
          padEnd( Source, PadChar, Width ) Pads the end of the Source string with the specified PadChar character so that the source string is at least Width characters in length.
static java.lang.String toLowerCase(java.lang.String str)
          Returns the string converted to all Lower case
static java.lang.String toProperCase(java.lang.String source)
          toProperCase( Source ) Converts the source string to 'Proper' case.
static java.lang.String toUpperCase(java.lang.String str)
          Returns the string converted to all Upper case
static boolean x()
          Used internally by the ADK
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADKFunctions

public ADKFunctions()
Method Detail

toUpperCase

public static java.lang.String toUpperCase(java.lang.String str)
Returns the string converted to all Upper case

Parameters:
str - The string to convert to upper case, or null
Returns:
The string converted to upper case

toLowerCase

public static java.lang.String toLowerCase(java.lang.String str)
Returns the string converted to all Lower case

Parameters:
str - The string to convert to lower case, or null
Returns:
The string converted to lower case

equalsIgnoreCase

public static boolean equalsIgnoreCase(java.lang.String str1,
                                       java.lang.String str2)
Returns true if the two strings are equal, ignoring any differences in case

Parameters:
str1 - The first string to compare
str2 - The second string to compare
Returns:
true if both strings are equal, differing only by the case of the letters

padBegin

public static java.lang.String padBegin(java.lang.String source,
                                        java.lang.String padding,
                                        int width)
padBegin( Source, PadChar, Width ) Pads the beginning of the Source string with the specified PadChar character so that the source string is at least Width characters in length. If the Source string is already equal to or greater than Width, no action is taken. If an exception is thrown while evaluating this method, it will be eaten and the source string will be returned

Parameters:
source - The string to start with
padding - The string to use for padding (only the first char will be used)
width - The length the final string should be
Returns:
The padded string or 'Null' if the source is null

padEnd

public static java.lang.String padEnd(java.lang.String source,
                                      java.lang.String padding,
                                      int width)
padEnd( Source, PadChar, Width ) Pads the end of the Source string with the specified PadChar character so that the source string is at least Width characters in length. If the Source string is already equal to or greater than Width, no action is taken. If an exception is thrown while evaluating this method, it will be eaten and the source string will be returned

Parameters:
source - The string to start with
padding - The string to use for padding (only the first char will be used)
width - The length the final string should be
Returns:
The padded string or 'Null' if the source is null

toProperCase

public static java.lang.String toProperCase(java.lang.String source)
toProperCase( Source ) Converts the source string to 'Proper' case. In general, this means capitalizing the first letter of each word. However, in some cases, such as O'Reilly, letters within the word will be capitalized as well. This function trims the string as well.

Parameters:
source - The String to ProperCase
Returns:
The source string, proper-cased, or null if the source isnull

x

public static boolean x()
Used internally by the ADK

Returns:


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.