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
Fields inherited from class be.gaudry.model.file.AbstractFileParser
validPreviousProgress
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension(String extension)
Adds an extension to the episode valid extensionslong
parse(AbstractBrolWorker<Long> bgw)
Parses files from the definedstart path
, and call theAbstractFileParser.performOnFile(AbstractBrolWorker, File, int, int)
on each file.protected void
performOnDirectory(AbstractBrolWorker<Long> bgw, File directory, int subDirDeep)
Do something on each directory.protected boolean
performOnFile(AbstractBrolWorker<Long> bgw, File file, int progressPercent, int subDirDeep)
Do something on each filevoid
setCoverFileName(String coverFileName)
void
setExtensions(List<String> extensions)
void
setInfosFileName(String infosFileName)
void
setSynopsisFileName(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:AbstractFileParser
Do something on each file- Specified by:
performOnFile
in classAbstractFileParser<Long>
- Parameters:
bgw
-AbstractBrolWorker
to 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:AbstractFileParser
Do something on each directory. Does nothing in this default implementation, but may be overrided.- Overrides:
performOnDirectory
in classAbstractFileParser<Long>
- Parameters:
bgw
-AbstractBrolWorker
to notify progress.directory
-File
object. 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:AbstractFileParser
Parses files from the definedstart path
, and call theAbstractFileParser.performOnFile(AbstractBrolWorker, File, int, int)
on each file.- Overrides:
parse
in classAbstractFileParser<Long>
- Returns:
- the size of the matching files, not the size of the parsed directory
-