Class Mpeg7CaptionConverter
java.lang.Object
org.opencastproject.caption.converters.Mpeg7CaptionConverter
- All Implemented Interfaces:
CaptionConverter
This is converter for Mpeg7 caption format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexportCaption(OutputStream outputStream, List<Caption> captions, String language) Exports caption collection.Get type of specific caption element (Catalog, Attachment).Get extension of specific caption format.String[]getLanguageList(InputStream inputStream) Reads captions and return information about language if such information is available.importCaption(InputStream inputStream, String language) Imports captions toList.
-
Constructor Details
-
Mpeg7CaptionConverter
public Mpeg7CaptionConverter()
-
-
Method Details
-
importCaption
public List<Caption> importCaption(InputStream inputStream, String language) throws CaptionConverterException Description copied from interface:CaptionConverterImports captions toList. If caption format is capable of containing more than one language, language parameter is used to define which captions are parsed.- Specified by:
importCaptionin interfaceCaptionConverter- Parameters:
inputStream- stream from where captions are readlanguage- (optional) captions' language- Returns:
ListList of captions- Throws:
CaptionConverterException- if parser encounters an exception- See Also:
-
exportCaption
public void exportCaption(OutputStream outputStream, List<Caption> captions, String language) throws IOException Description copied from interface:CaptionConverterExports caption collection. Language parameter is used to set language of the captions for those caption format that are capable of storing information about language.- Specified by:
exportCaptionin interfaceCaptionConverter- Parameters:
outputStream- stream to which captions are writtencaptions- collection to be exportedlanguage- (optional) captions' language- Throws:
IOException- if exception occurs writing to output stream
-
getLanguageList
Description copied from interface:CaptionConverterReads captions and return information about language if such information is available. Returns empty list otherwise.- Specified by:
getLanguageListin interfaceCaptionConverter- Parameters:
inputStream- stream from where captions are read- Returns:
- Array containing languages in captions
- Throws:
CaptionConverterException- if parser encounters exception- See Also:
-
getExtension
Description copied from interface:CaptionConverterGet extension of specific caption format.- Specified by:
getExtensionin interfaceCaptionConverter- Returns:
- caption format extension
- See Also:
-
getElementType
Description copied from interface:CaptionConverterGet type of specific caption element (Catalog, Attachment).- Specified by:
getElementTypein interfaceCaptionConverter- Returns:
- type
-