Package de.mediathekview.mlib.tool
Class TimedTextMarkupLanguageParser
- java.lang.Object
-
- de.mediathekview.mlib.tool.TimedTextMarkupLanguageParser
-
public class TimedTextMarkupLanguageParser extends Object
Converter for TTML XML subtitle files into SubRip Text format. Tested with MediathekView downloaded subtitles and TTML format version 1.0.
-
-
Constructor Summary
Constructors Constructor Description TimedTextMarkupLanguageParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()booleanparse(Path ttmlFilePath)Parse the TTML file into internal representation.booleanparseXmlFlash(Path ttmlFilePath)Parse the XML Subtitle File for Flash Player into internal representation.voidtoSrt(Path srtFile)Convert internal representation into SubRip Text Format and save to file.
-
-
-
Method Detail
-
parse
public boolean parse(Path ttmlFilePath)
Parse the TTML file into internal representation.- Parameters:
ttmlFilePath- the TTML file to parse- Returns:
- true if the parsing was successful
-
parseXmlFlash
public boolean parseXmlFlash(Path ttmlFilePath)
Parse the XML Subtitle File for Flash Player into internal representation.- Parameters:
ttmlFilePath- the TTML file to parse- Returns:
- true if the parsing was successful
-
toSrt
public void toSrt(Path srtFile)
Convert internal representation into SubRip Text Format and save to file.- Parameters:
srtFile- The path to the srt file to convert
-
cleanup
public void cleanup()
-
-