cdox.data
Class VideoFileSource

java.lang.Object
  extended bycdox.data.VideoFileSource
All Implemented Interfaces:
DataSource

public class VideoFileSource
extends java.lang.Object
implements DataSource

This is a DataSource that examines a file name and extracts a film title from it.

Version:
October 11st 2002
Author:
Rutger Bezema, Andreas Schmitz

Constructor Summary
VideoFileSource()
           
 
Method Summary
 java.lang.Class getDataType()
          Returns the class of data which this source provides.
 java.lang.String getDescription()
          Returns a short description for this source.
 boolean hasConfigurationDialog()
          Used to determine whether there is a configuration dialog for this source.
 Data retrieveData()
          This method will be invoked to get the data.
 void showConfigurationDialog(java.awt.Frame parent)
          Shows a configuration dialog where some options can be configured concerning this source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoFileSource

public VideoFileSource()
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: DataSource
Returns a short description for this source. This could be the String "CDDB Database" for a CDDB query source and should be a String that tells the user roughly what it can do.

Specified by:
getDescription in interface DataSource
Returns:
the string.

getDataType

public java.lang.Class getDataType()
Description copied from interface: DataSource
Returns the class of data which this source provides. This is needed to determine the CD type which suits the produced data.

Specified by:
getDataType in interface DataSource
Returns:
the class.

hasConfigurationDialog

public boolean hasConfigurationDialog()
Description copied from interface: DataSource
Used to determine whether there is a configuration dialog for this source.

Specified by:
hasConfigurationDialog in interface DataSource
Returns:
true, if there is one.

showConfigurationDialog

public void showConfigurationDialog(java.awt.Frame parent)
Description copied from interface: DataSource
Shows a configuration dialog where some options can be configured concerning this source. This is no must for some sources, although quite useful. For example, a CDDB source could show a dialog with the server to use, which port etc. The configured options should be saved (for example in the preferences) by the implementing classes.

Specified by:
showConfigurationDialog in interface DataSource
Parameters:
parent - the parent frame.

retrieveData

public Data retrieveData()
Description copied from interface: DataSource
This method will be invoked to get the data. The showConfigurationDialog() method will be invoked before this method, if the hasConfigurationDialog() method returns true. If there has been a dialog, the data could also have been retrieved there, but it must be returned here. If this method returns null, it is assumed that either something went wrong in the retrieval process or the user has cancelled the dialog, so that the original data is not overwritten.

Specified by:
retrieveData in interface DataSource
Returns:
the data that is hopefully found.