|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stanwood.media.search.SearchHelper
public class SearchHelper
This class provides some helper functions that can be used to do things like construct a normalised search query from a file name.
Constructor Summary | |
---|---|
SearchHelper()
|
Method Summary | |
---|---|
static java.lang.Integer |
extractPart(java.lang.StringBuilder term)
Used to get a part number for the search term |
static boolean |
hasIgnoredTokens(java.lang.StringBuilder term)
Used to check if a search term has ignored tokens |
static void |
removeIgnoredTokens(java.lang.StringBuilder term)
Used to remove tokens that should be ignored from a search term |
static void |
removeUnwantedCharacters(java.lang.StringBuilder term)
This is used to remove any unwanted characters from search terms |
static void |
replaceDots(java.lang.StringBuilder term)
This is a helper method that will replace the dot's sometimes found in place of spaces of filenames. |
static void |
replaceHyphens(java.lang.StringBuilder term)
This is used to replace hyphens characters with spaces in the search term |
static void |
replaceUnderscore(java.lang.StringBuilder term)
This is used to replace underscore characters with spaces in the search term |
static void |
replaceWithSpaces(java.lang.StringBuilder term)
This is used to replace word seperator characters such as underscores with spaces. |
static void |
trimRubishFromEnds(java.lang.StringBuilder term)
Used to strip white space from either end of the search terms |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchHelper()
Method Detail |
---|
public static void replaceDots(java.lang.StringBuilder term)
term
- The term that might contains dot's instead of spaces. This buffer will have the dot's
replaced.public static void removeUnwantedCharacters(java.lang.StringBuilder term)
term
- The search termpublic static void replaceUnderscore(java.lang.StringBuilder term)
term
- The search termpublic static void replaceHyphens(java.lang.StringBuilder term)
term
- The search termpublic static void replaceWithSpaces(java.lang.StringBuilder term)
term
- The search termpublic static java.lang.Integer extractPart(java.lang.StringBuilder term)
term
- The search term
public static void removeIgnoredTokens(java.lang.StringBuilder term)
term
- The search termpublic static boolean hasIgnoredTokens(java.lang.StringBuilder term)
term
- The search term
public static void trimRubishFromEnds(java.lang.StringBuilder term)
term
- The search term
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |