org.stanwood.media.search
Class ReversePatternSearchStrategy
java.lang.Object
org.stanwood.media.search.ReversePatternSearchStrategy
- All Implemented Interfaces:
- ISearchStrategy
public class ReversePatternSearchStrategy
- extends java.lang.Object
- implements ISearchStrategy
This is a search strategy that tries to match the media directory pattern against
the media file filename and work out it's search results from that.
Method Summary |
SearchDetails |
getSearch(java.io.File mediaFile,
java.io.File rootMediaDir,
java.lang.String renamePattern,
MediaDirectory mediaDir)
Look up the media file details using the renamePattern |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReversePatternSearchStrategy
public ReversePatternSearchStrategy(Token termToken,
boolean doComplexityCheck,
boolean disallowIgnoreTokens)
- The constructor
- Parameters:
termToken
- The token type that would be used when searching for this filedoComplexityCheck
- True to reject patterns that don't have a certian complexitydisallowIgnoreTokens
- If true, them don't make if the file name contains ingored tokens
getSearch
public SearchDetails getSearch(java.io.File mediaFile,
java.io.File rootMediaDir,
java.lang.String renamePattern,
MediaDirectory mediaDir)
- Look up the media file details using the renamePattern
- Specified by:
getSearch
in interface ISearchStrategy
- Parameters:
mediaFile
- The media file that is been processedrootMediaDir
- The root media directoryrenamePattern
- The pattern that is been used to rename media filesmediaDir
- The media directory
- Returns:
- The search details