Class MediaSegments

java.lang.Object
org.opencastproject.silencedetection.api.MediaSegments

public class MediaSegments extends Object
Wrapper class for holding many MediaSegments and implements XML serialization methods.
  • Constructor Details

    • MediaSegments

      public MediaSegments()
    • MediaSegments

      public MediaSegments(String trackId, String filePath, List<MediaSegment> mediaSegments)
  • Method Details

    • getMediaSegments

      public List<MediaSegment> getMediaSegments()
      Returns a list with media segments, that holds start and stop positions or null.
      Returns:
      list with MediaSegments or null
    • getTrackId

      public String getTrackId()
      Returns the Track ID.
      Returns:
      Track ID
    • getFilePath

      public String getFilePath()
      Returns file Path of media file.
      Returns:
      file path of media file
    • toXml

      public String toXml() throws javax.xml.bind.JAXBException
      Serialize to XML.
      Returns:
      XML as String
      Throws:
      javax.xml.bind.JAXBException - if an error occures
    • fromXml

      public static MediaSegments fromXml(String mediaSegmentsXml) throws javax.xml.bind.JAXBException
      Deserialize from XML.
      Parameters:
      mediaSegmentsXml - MediaSegments XML as String
      Returns:
      deserialized MediaSegments
      Throws:
      javax.xml.bind.JAXBException - if an error occures