|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.cms.SearchFormatter
Contains utility methods which are useful for constructing search queries
| Field Summary | |
static String |
AND
An "and" join clause |
static String[] |
COMMON_WORDS
A list of common words which will be filtered out |
static String |
OR
An "or" join clause |
static String |
SPECIAL_CHARS
A list of all the special characters which will be filtered out |
static String |
versionId
|
static String |
WILD_CARD
An Intermedia wildcard that matches any sequence of characters |
| Constructor Summary | |
SearchFormatter()
|
|
| Method Summary | |
static String |
createIntermediaClause(String words)
Convert some keywords which are typed in by the user to an Intermedia search clause. |
static String |
createIntermediaClause(String words,
String joinClause,
String wildcard)
Convert some keywords which are typed in by the user to an Intermedia search clause. |
boolean |
isCommonWord(String s)
Determine if the string represents a common word. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String versionId
public static final String SPECIAL_CHARS
public static final String[] COMMON_WORDS
public static final String WILD_CARD
public static final String AND
public static final String OR
| Constructor Detail |
public SearchFormatter()
| Method Detail |
public boolean isCommonWord(String s)
s - a search keyword
s is a common word, false otherwisepublic static String createIntermediaClause(String words)
"cat, fish and bird" will be converted to
"%cat% and %fish% and %bird%"
words - a string which contains some search keywords
public static String createIntermediaClause(String words,
String joinClause,
String wildcard)
"cat, fish and bird" will be converted to
"%cat% and %fish% and %bird%"
words - a string which contains some search keywordsjoinClause - a string which will be used to combine the
keywords. Should be "and", "or",
or a similar boolean operator.wildcard - a wildcard which will be appened to the right
and to the left of each keyword
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||