Package be.gaudry.model.file.mreport
Class MReportParser
- All Implemented Interfaces:
PropertyChangeListener,EventListener
Provided by the broldev.file.mediareporter.model project.
- Since:
- 1.0 (Mar 31, 2011), broldev.file.mediareporter.model 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 (Mar 31, 2011)
- Author:
- Steph GAUDRY
-
Field Summary
FieldsFields inherited from class be.gaudry.model.file.AbstractFileParser
validPreviousProgress -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(String extension)Adds an extension to the episode valid extensionslongparse(AbstractBrolWorker<Long> bgw)Parses files from the definedstart path, and call theAbstractFileParser.performOnFile(AbstractBrolWorker, File, int, int)on each file.protected voidperformOnDirectory(AbstractBrolWorker<Long> bgw, File directory, int subDirDeep)Do something on each directory.protected booleanperformOnFile(AbstractBrolWorker<Long> bgw, File file, int progressPercent, int subDirDeep)Do something on each filevoidsetCoverFileName(String coverFileName)voidsetExtensions(List<String> extensions)voidsetInfosFileName(String infosFileName)voidsetSynopsisFileName(String synopsisFileName)Methods inherited from class be.gaudry.model.file.AbstractFileParser
equals, finalize, getProgressMax, getStartPath, hashCode, init, isIncludeHiddenFiles, isIncludeSubFolders, isPauseProcessing, isPreCalcProgress, isPreCalculated, parseFiles, propertyChange, setIncludeHiddenFiles, setIncludeSubFolders, setLanguage, setPreCalcProgress, setStartPath, togglePause
-
Field Details
-
series
-
-
Constructor Details
-
MReportParser
public MReportParser()
-
-
Method Details
-
getExtensions
- Returns:
- the extensions
-
setExtensions
- Parameters:
extensions- the extensions to set
-
getCoverFileName
- Returns:
- the coverFileName
-
setCoverFileName
- Parameters:
coverFileName- the coverFileName to set- See Also:
getCoverFileName()
-
getInfosFileName
- Returns:
- the infosFileName
-
setInfosFileName
- Parameters:
infosFileName- the infosFileName to set- See Also:
getInfosFileName()
-
getSynopsisFileName
- Returns:
- the synopsisFileName
-
setSynopsisFileName
- Parameters:
synopsisFileName- the synopsisFileName to set- See Also:
getSynopsisFileName()
-
addExtension
Adds an extension to the episode valid extensions- Parameters:
extension-
-
performOnFile
protected boolean performOnFile(AbstractBrolWorker<Long> bgw, File file, int progressPercent, int subDirDeep)Description copied from class:AbstractFileParserDo something on each file- Specified by:
performOnFilein classAbstractFileParser<Long>- Parameters:
bgw-AbstractBrolWorkerto perform cancel if needed, and report progressfile- file to checkprogressPercent- Progress percentagesubDirDeep- Deep of the directory in comparison with start directory- Returns:
- true if we must stop the parsing of current directory (ie. if we have a vob file, we don't check the other files in this directory) false otherwise
-
performOnDirectory
Description copied from class:AbstractFileParserDo something on each directory. Does nothing in this default implementation, but may be overrided.- Overrides:
performOnDirectoryin classAbstractFileParser<Long>- Parameters:
bgw-AbstractBrolWorkerto notify progress.directory-Fileobject. No need to check if is directory (already done in the parser)subDirDeep- Deep of the directory in comparison with start directory
-
parse
Description copied from class:AbstractFileParserParses files from the definedstart path, and call theAbstractFileParser.performOnFile(AbstractBrolWorker, File, int, int)on each file.- Overrides:
parsein classAbstractFileParser<Long>- Returns:
- the size of the matching files, not the size of the parsed directory
-