conditionalprocedure
Class RSParser

java.lang.Object
  extended by conditionalprocedure.RSParser

public class RSParser
extends java.lang.Object

Helper methods to do recordset parsing for variable recordsets.


Field Summary
private static java.util.regex.Pattern[] authorNames
          Patterns which match various forms of names of people.
private static java.util.regex.Pattern punctuation
          Pattern which matches punctuation: "[", ";", ":", "/"
 
Constructor Summary
RSParser()
           
 
Method Summary
(package private) static boolean isAllBlank(java.lang.CharSequence chars)
          Return true if character array contains only blanks.
(package private) static boolean isAuthor(java.lang.String author)
          Return true if this character sequence matches an author name pattern.
(package private) static boolean isNumber(java.lang.CharSequence chars, int start, int end)
          Test for "is a number": right-justified decimal integer with leading whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

punctuation

private static final java.util.regex.Pattern punctuation
Pattern which matches punctuation: "[", ";", ":", "/"


authorNames

private static final java.util.regex.Pattern[] authorNames
Patterns which match various forms of names of people.

Constructor Detail

RSParser

public RSParser()
Method Detail

isAuthor

static boolean isAuthor(java.lang.String author)
Return true if this character sequence matches an author name pattern.

Parameters:
author - the String to test for an author name
Returns:
true if input parameter appears to be an author name

isAllBlank

static boolean isAllBlank(java.lang.CharSequence chars)
Return true if character array contains only blanks.

Parameters:
chars - buffer to check for blankness
Returns:
true if input contains only space characters

isNumber

static boolean isNumber(java.lang.CharSequence chars,
                        int start,
                        int end)
Test for "is a number": right-justified decimal integer with leading whitespace.

Parameters:
chars - character sequence to test
start - offset of first character to test
end - offset of first character not to test
Returns:
true if input is a number
Throws:
java.lang.IllegalArgumentException - if !(start < end)