org.mindswap.multimedia.impl
Class VideoImpl

java.lang.Object
  extended byResourceImpl
      extended byorg.mindswap.multimedia.impl.DigitalMediaImpl
          extended byorg.mindswap.multimedia.impl.VideoImpl
All Implemented Interfaces:
DigitalMedia, Video

public class VideoImpl
extends DigitalMediaImpl
implements Video

Title:

Description:

Copyright: Copyright (c) 2005

Company: Mindswap (http://www.mindswap.org)

See Also:
Serialized Form

Field Summary
static Implementation realFactory
           
 
Fields inherited from interface org.mindswap.multimedia.Video
NO_DURATION, NO_FRAMES
 
Constructor Summary
VideoImpl(Node n, EnhGraph g)
           
 
Method Summary
 Video addFrame(VideoFrame theFrame)
          Adds the specified frame to the video
 Video addSegment(VideoSegment theSegment)
          Adds a segement to this video
 int hasDurationSeconds()
          Returns the total duration of the video in seconds
 int hasTotalFrames()
          Returns the total number of frames in the video
 StmtIterator listFrames()
          Returns all the frames that are known to make up this video
 StmtIterator listSegments()
          List all the segments of this video
 Video removeFrame(VideoFrame theFrame)
          Removes the specified frame from the video
 Video removeSegment(VideoSegment theSegment)
          Removes a segment from this video
 
Methods inherited from class org.mindswap.multimedia.impl.DigitalMediaImpl
addDepicts, listDepicts, mustBeValidModel, removeDepicts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mindswap.multimedia.DigitalMedia
addDepicts, listDepicts, removeDepicts
 

Field Detail

realFactory

public static final Implementation realFactory
Constructor Detail

VideoImpl

public VideoImpl(Node n,
                 EnhGraph g)
Method Detail

hasTotalFrames

public int hasTotalFrames()
Description copied from interface: Video
Returns the total number of frames in the video

Specified by:
hasTotalFrames in interface Video
Returns:
int the total number of frames, or NO_FRAMES if the total number cannot be found

hasDurationSeconds

public int hasDurationSeconds()
Description copied from interface: Video
Returns the total duration of the video in seconds

Specified by:
hasDurationSeconds in interface Video
Returns:
int the duration of the video in seconds or NO_DURATION if the value is not known

listFrames

public StmtIterator listFrames()
Description copied from interface: Video
Returns all the frames that are known to make up this video

Specified by:
listFrames in interface Video
Returns:
StmtIterator a list of statements with the VideoFrame as the object

addFrame

public Video addFrame(VideoFrame theFrame)
Description copied from interface: Video
Adds the specified frame to the video

Specified by:
addFrame in interface Video
Parameters:
theFrame - VideoFrame the frame to add
Returns:
Video returns this video

removeFrame

public Video removeFrame(VideoFrame theFrame)
Description copied from interface: Video
Removes the specified frame from the video

Specified by:
removeFrame in interface Video
Parameters:
theFrame - VideoFrame the frame to remove
Returns:
Video returns this video

listSegments

public StmtIterator listSegments()
Description copied from interface: Video
List all the segments of this video

Specified by:
listSegments in interface Video
Returns:
StmtIterator an iterator over the segment statements of this video

addSegment

public Video addSegment(VideoSegment theSegment)
Description copied from interface: Video
Adds a segement to this video

Specified by:
addSegment in interface Video
Parameters:
theSegment - VideoSegment the new segment to add
Returns:
Video this video

removeSegment

public Video removeSegment(VideoSegment theSegment)
Description copied from interface: Video
Removes a segment from this video

Specified by:
removeSegment in interface Video
Parameters:
theSegment - VideoSegment the new segment to remove
Returns:
Video this video