|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.ecat.util.Util
Field Summary | |
static char[] |
badchars
|
static String |
badExtensions
|
static Hashtable |
stopwords
|
static int |
TRACE_ALL
|
static int |
TRACE_CALLS
|
static int |
TRACE_MSGS
|
static int |
TRACE_NONE
|
static int |
TRACE_PARMS
|
static int |
TRACE_READ_MSGS
|
static int |
TRACE_WRITE_MSGS
|
Constructor Summary | |
Util()
|
Method Summary | |
static String |
breakdownUrlForBCP(String s)
|
static String |
breakdownUrlForInsert(String s)
|
static String |
breakdownUrlForSelect(String s)
|
static Vector |
breakdownUrlIntoVector(String s)
|
static Vector |
breakdownUrlIntoVectorAndEscape(String s)
|
static char |
chop(StringBuffer val)
|
static String |
collapseBlankLines(String s)
Remove leading and trailing space from each line, new lines, and blank lines. |
static String |
collapseLines(String s)
Remove leading and trailing space as well as new lines from each line. |
static boolean |
compareCharArray(char[] s1,
int s1start,
char[] s2)
|
static int |
convertClientDateToSeconds(String cdate)
|
static String |
convertSecondsToYYYYMMDD(int seconds)
|
static String |
current_hhmmss()
|
static String |
current_HHmmss()
|
static String |
current_yyyymmdd()
|
static StringBuffer |
escapeStringForDbInsertion(String s)
|
static StringBuffer |
escapeStringForDbInsertionOld(String s)
|
static String |
findNameValue(String name,
String data)
|
static String |
findNameValue(String name,
String data,
boolean replace_newlines_with_spaces)
|
static String |
getCharsUpTo(String s,
int max)
Returns a String terminating at the last space in s before max or <max if s does not contain a space. |
static Hashtable |
getMetadataFrom(String content)
Generate a Hashtable of metadata in the document. |
static Hashtable |
getMetadataFrom(String content,
String lower)
Generate a Hashtable of metadata in the document. |
static int |
getStemLevel(String db)
|
static String |
getTitle(String content)
Get the title from the <TITLE> tag. |
static String |
getTitle(String content,
String lower)
Get the title from the <TITLE> tag. |
static int |
hashCode(String s)
Returns a hashcode for a string. |
static boolean |
isalpha(char c)
|
static void |
logMsg(String msg)
|
static void |
logMsg(String msg,
boolean debug)
|
static String |
makeUniqueIndexableUrl(String s)
|
static String |
ms2hhmmss_smart(long curTimeMs)
|
static String |
ms2hhmmss_smart(long curTimeMs,
boolean diffOnly)
|
static String |
ms2hhmmss(long curTimeMs)
|
static int |
parseTraceLevel(String traceString)
|
static Vector |
parseUrlString(String s)
|
static void |
printSQLError(SQLException ex)
|
static void |
QuickSortStringArray(String[] a,
int lo0,
int hi0)
This is a generic version of C.A.R Hoare's Quick Sort algorithm. |
static void |
QuickSortStringVector(Vector a,
int lo0,
int hi0)
This is a generic version of C.A.R Hoare's Quick Sort algorithm. |
static String |
removeAllTagsFrom(String content)
|
static String |
removeBlanksFrom(String content)
Collapse blanks. |
static String |
removeCharactersAndCharactersInRangeFrom(String content,
char[] bad,
int start,
int stop)
Replace characters with space. |
static String |
removeCharactersFrom(String content,
char[] bad)
Replace characters with space. |
static String |
removeCharactersInRangeFrom(String content,
int start,
int stop)
Replace characters whose ordinal value is between start and stop with space. |
static String |
removeDoctypeFrom(String buf)
Remove any <DOCTYPE> tags. |
static String |
removeDoctypeFrom(String buf,
String lower)
Remove any <DOCTYPE> tags. |
static String |
removeDot(String s)
Remove lines that contain the character '.'. |
static String |
removeEntitiesFrom(String content)
|
static String |
removeLines(String s)
Remove new lines from the string. |
static String |
removeNumbersFrom(String content)
Remove any numbers from the string. |
static String |
removeSGMLCommentsFrom(String buf)
|
static String |
removeStopWordsAndNumbersAndWordsLessThanNCharsFrom(String content,
Hashtable stopwords,
int n)
Remove stopwords, numbers and words less than n characters from the string. |
static String |
removeStopWordsAndWordsLessThanNCharsFrom(String content,
Hashtable stopwords,
int n)
Remove stopwords and words less than n characters from the string. |
static String |
removeStopWordsFrom(String content,
Hashtable stopwords)
Remove any stopwords form the string. |
static String |
removeWordsLessThanNChars(String content,
int n)
Remove any words with length less than n. |
static void |
sortStringArray(String[] in,
int order)
|
static void |
sortStringVector(Vector in,
int order)
|
static String |
stripAllTagsAndAnchors(String content)
|
static int |
theNextTagIn(int start_here,
int[] res,
char[] char_array)
|
static int |
theNextTagIn(int start_here,
int[] res,
String mybuf)
|
static String |
truncateEscapedString(StringBuffer s,
int len)
|
static String |
truncateEscapedUrl(StringBuffer s,
int len)
|
static String |
wrapLines(String s,
int w)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int TRACE_NONE
public static final int TRACE_CALLS
public static final int TRACE_PARMS
public static final int TRACE_MSGS
public static final int TRACE_READ_MSGS
public static final int TRACE_WRITE_MSGS
public static final int TRACE_ALL
public static final String badExtensions
public static final char[] badchars
public static final Hashtable stopwords
Constructor Detail |
public Util()
Method Detail |
public static final void printSQLError(SQLException ex)
public static final String getCharsUpTo(String s, int max)
s
- input stringmax
- max characterspublic static final String collapseLines(String s)
s
- input stringpublic static final String removeLines(String s)
s
- input stringpublic static final String collapseBlankLines(String s)
s
- input stringpublic static final String removeDot(String s)
s
- input stringpublic static final String getTitle(String content)
content
- the document contentpublic static final String getTitle(String content, String lower)
content
- the document contentlower
- lower case version of the document content (so we don't have to lower case it)public static final boolean isalpha(char c)
public static final String removeSGMLCommentsFrom(String buf)
public static final String removeDoctypeFrom(String buf)
content
- the document contentpublic static final String removeDoctypeFrom(String buf, String lower)
content
- the document contentlower
- lower case version of the document content (so we don't have to lower case it)public static final int theNextTagIn(int start_here, int[] res, String mybuf)
public static final int theNextTagIn(int start_here, int[] res, char[] char_array)
public static final String stripAllTagsAndAnchors(String content)
public static final Hashtable getMetadataFrom(String content)
content
- the document contentpublic static final Hashtable getMetadataFrom(String content, String lower)
content
- the document contentlower
- lower case version of the document content (so we don't have to lower case it)public static final String removeAllTagsFrom(String content)
public static final String removeBlanksFrom(String content)
content
- the document contentpublic static final String removeStopWordsFrom(String content, Hashtable stopwords)
content
- the document contentstopwords
- stopwords to be removedpublic static final String removeWordsLessThanNChars(String content, int n)
content
- the document contentn
- maximum length of words to be removedpublic static final String removeNumbersFrom(String content)
content
- the document contentpublic static final String removeStopWordsAndNumbersAndWordsLessThanNCharsFrom(String content, Hashtable stopwords, int n)
content
- the document contentn
- the maximum length of words to be removedpublic static final String removeStopWordsAndWordsLessThanNCharsFrom(String content, Hashtable stopwords, int n)
content
- the document contentn
- the maximum length of words to be removedpublic static final String removeCharactersFrom(String content, char[] bad)
content
- the document contentbad
- characters to be removedpublic static final String removeCharactersInRangeFrom(String content, int start, int stop)
content
- the document contentstart
- the ordinal value to start atstop
- the ordinal value to stop atpublic static final String removeCharactersAndCharactersInRangeFrom(String content, char[] bad, int start, int stop)
content
- the document contentbad
- characters to be removedstart
- the ordinal value to start atstop
- the ordinal value to stop atpublic static final String removeEntitiesFrom(String content)
public static final Vector parseUrlString(String s)
public static final int convertClientDateToSeconds(String cdate)
public static final String convertSecondsToYYYYMMDD(int seconds)
public static final int hashCode(String s)
public static final String makeUniqueIndexableUrl(String s)
public static final String breakdownUrlForSelect(String s)
public static final Vector breakdownUrlIntoVectorAndEscape(String s)
public static final Vector breakdownUrlIntoVector(String s)
public static final String breakdownUrlForInsert(String s)
public static final String breakdownUrlForBCP(String s)
public static final StringBuffer escapeStringForDbInsertionOld(String s)
public static final StringBuffer escapeStringForDbInsertion(String s)
public static final String truncateEscapedUrl(StringBuffer s, int len)
public static final String truncateEscapedString(StringBuffer s, int len)
public static final void logMsg(String msg, boolean debug)
public static final void logMsg(String msg)
public static final String findNameValue(String name, String data)
public static final String findNameValue(String name, String data, boolean replace_newlines_with_spaces)
public static final void sortStringVector(Vector in, int order)
public static final void sortStringArray(String[] in, int order)
public static final String wrapLines(String s, int w)
public static final int parseTraceLevel(String traceString)
public static final void QuickSortStringArray(String[] a, int lo0, int hi0)
a
- a String arraylo0
- left boundary of array partitionhi0
- right boundary of array partitionpublic static final void QuickSortStringVector(Vector a, int lo0, int hi0)
a
- a String arraylo0
- left boundary of array partitionhi0
- right boundary of array partitionpublic static final int getStemLevel(String db)
public static final boolean compareCharArray(char[] s1, int s1start, char[] s2)
public static final char chop(StringBuffer val)
public static String current_yyyymmdd()
public static String current_hhmmss()
public static String current_HHmmss()
public static String ms2hhmmss(long curTimeMs)
public static String ms2hhmmss_smart(long curTimeMs)
public static String ms2hhmmss_smart(long curTimeMs, boolean diffOnly)
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |