All Packages Class Hierarchy This Package Previous Next Index
Class xset.SETutils
java.lang.Object
|
+----xset.SETutils
- public class SETutils
- extends Object
-
SETutils()
-
-
getChildren(Element)
- Methods that takes an XML4J/DOM element and returns its children,
ignoring whitespaces between tags
-
hasher(Document, String)
-
-
hasher(String, String)
- Method that implements a hashing algorithm (MD5 or SHA-1).
-
numChildren(Element)
- Method to take an XML4J DOM element and count its number of children
Whitespaces here are not ignored.
-
parseFile(String)
- Method that packages up a file into an inputstream
-
printElement(Element)
- Simplistic method to print out an element with its immediate children
-
queryMax(Vector, String)
- Vector queryMax(Vector, String) ***
Method that returns the desired document or tags that represents
the maximum value in a given tag.
-
queryMin(Vector, String)
- Vector queryMin(Vector, String) ***
Method that returns the desired document or tags that represents
the minimum value in a given tag.
-
stringMaxMin(Vector, int)
- String stringMaxMin(Vector, int) ***
Method that rerturns the min or max string from a vector of strings
SETutils
public SETutils()
queryMax
public static Vector queryMax(Vector xmlVector,
String rangeTag)
- Vector queryMax(Vector, String) ***
Method that returns the desired document or tags that represents
the maximum value in a given tag. Just a wrapper for queryMaxMin
- Parameters:
- xmlVector - The vector of XML documents to be compared
- rangeTag - The string name of the tag the max is executed on
- Returns:
- vector of simple xml documents as strings
queryMin
public static Vector queryMin(Vector xmlVector,
String rangeTag)
- Vector queryMin(Vector, String) ***
Method that returns the desired document or tags that represents
the minimum value in a given tag. Just a wrapper for queryMaxMin
- Parameters:
- xmlVector - The vector of XML documents to be compared
- rangeTag - The string name of the tag the min is executed on
- Returns:
- vector of simple xml documents as strings
stringMaxMin
public static String stringMaxMin(Vector stringV,
int maxmin)
- String stringMaxMin(Vector, int) ***
Method that rerturns the min or max string from a vector of strings
- Parameters:
- stringV - the vector of strings that we take the max or min from
- maxmin, - indicator of max or min, if <0 min, if >0 max, if 0 null
- Returns:
- string that is the end result value as the max or min
numChildren
public static int numChildren(Element e)
- Method to take an XML4J DOM element and count its number of children
Whitespaces here are not ignored. For that value, do getChildren().size()
- Parameters:
- e - The DOM element in question
- Returns:
- integer that represents the number of children it has
getChildren
public static Vector getChildren(Element e)
- Methods that takes an XML4J/DOM element and returns its children,
ignoring whitespaces between tags
- Parameters:
- e - The DOM element that we find nonwhitespace children for
- Returns:
- Vector containing the child DOM elements
printElement
public static void printElement(Element n)
- Simplistic method to print out an element with its immediate children
parseFile
public static InputStream parseFile(String f) throws FileNotFoundException
- Method that packages up a file into an inputstream
hasher
public static String hasher(String inString,
String alg) throws NoSuchAlgorithmException
- Method that implements a hashing algorithm (MD5 or SHA-1). Takes in
a string and returns a string that represented the hashed value.
- Parameters:
- inString - The input that is to be hashed
- alg - The algorithm to be used, either "MD5" or "SHA-1"
- Returns:
- the hashed value of inString
- Throws: NoSuchAlgorithmException
- thrown when algorithm is unknown
hasher
public static String hasher(Document d,
String alg) throws NoSuchAlgorithmException
All Packages Class Hierarchy This Package Previous Next Index