cdox.data
Class AudioData

java.lang.Object
  extended bycdox.data.AudioData
All Implemented Interfaces:
CDCoverStandards, Data

public class AudioData
extends java.lang.Object
implements Data, CDCoverStandards

Represents the data for an audio CD.

Version:
July 3rd 2002
Author:
Rutger Bezema, Andreas Schmitz

Field Summary
 
Fields inherited from interface cdox.edit.CDCoverStandards
ALL, CDBACK_SIDE, CDBACK_SIDE_SIZE, CDBACK_SIZE, CDBOOKLET, CDBOOKLET_SIZE, CDFRONT, CDFRONT_SIZE, CDSIDE_SIZE, CDX, GIF, JPG, PNG
 
Constructor Summary
AudioData()
           
 
Method Summary
 void fillBack(Cover c)
          This method will insert a list of the tracks and sides with title and artist.
 void fillBooklet(Cover c)
          This method will insert the title, subtitle, artist, tracks and the description.
 void fillFront(Cover c)
          This method will insert a (big) title, a (not so big) subtitle and the artist (as big as title).
 java.lang.String getDescription()
          Returns a descriptive string of the CD type that this Data object represents.
 int getSupportedVersion()
          Must return the version of the CDox file format that supports this data type.
 void reconstruct(org.w3c.dom.Element desc)
          Reads its data from the DOM subtree beginning with the given Element.
 void setArtist(java.lang.String s)
          Sets the artist.
 void setDescription(java.lang.String s)
          Sets the description.
 void setSubtitle(java.lang.String s)
          Sets the subtitle.
 void setTitle(java.lang.String s)
          Sets the title.
 void setTracks(java.util.ArrayList tracks, java.util.ArrayList lengths)
          Sets the tracks.
 void storeData(org.w3c.dom.Element e)
          This method stores the data of this element in a DOM tree.
 boolean userFillData(java.awt.Frame parent)
          This method should let the user fill in appropriate values as data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioData

public AudioData()
Method Detail

userFillData

public boolean userFillData(java.awt.Frame parent)
Description copied from interface: Data
This method should let the user fill in appropriate values as data.

Specified by:
userFillData in interface Data
Parameters:
parent - the parent frame.
Returns:
true if the user clicked ok, false otherwhise

getSupportedVersion

public int getSupportedVersion()
Description copied from interface: Data
Must return the version of the CDox file format that supports this data type.

Specified by:
getSupportedVersion in interface Data
Returns:
the version number.

storeData

public void storeData(org.w3c.dom.Element e)
Description copied from interface: Data
This method stores the data of this element in a DOM tree. The desc parameter is the DOM element <description>. The type attribute of this element must be set, and the child elements must be created according to the XML Schema from the CDox format.

Specified by:
storeData in interface Data
Parameters:
e - the <description> element.

reconstruct

public void reconstruct(org.w3c.dom.Element desc)
Description copied from interface: Data
Reads its data from the DOM subtree beginning with the given Element.

Specified by:
reconstruct in interface Data
Parameters:
desc - the top node of the DOM subtree.

getDescription

public java.lang.String getDescription()
Description copied from interface: Data
Returns a descriptive string of the CD type that this Data object represents.

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

setTitle

public void setTitle(java.lang.String s)
Sets the title.

Parameters:
s - the new title.

setSubtitle

public void setSubtitle(java.lang.String s)
Sets the subtitle.

Parameters:
s - the new subtitle.

setArtist

public void setArtist(java.lang.String s)
Sets the artist.

Parameters:
s - the new artist.

setDescription

public void setDescription(java.lang.String s)
Sets the description.

Parameters:
s - the new description.

setTracks

public void setTracks(java.util.ArrayList tracks,
                      java.util.ArrayList lengths)
Sets the tracks.

Parameters:
tracks - the track names.
lengths - the lengths of the tracks as Dates.

fillFront

public void fillFront(Cover c)
               throws java.lang.IllegalArgumentException
This method will insert a (big) title, a (not so big) subtitle and the artist (as big as title).

Specified by:
fillFront in interface Data
Parameters:
c - the cover where to add new elements.
Throws:
java.lang.IllegalArgumentException - if the cover is no front side.

fillBack

public void fillBack(Cover c)
              throws java.lang.IllegalArgumentException
This method will insert a list of the tracks and sides with title and artist.//check if title is null

Specified by:
fillBack in interface Data
Parameters:
c - the cover where to add new elements.
Throws:
java.lang.IllegalArgumentException - if the cover is no back side.

fillBooklet

public void fillBooklet(Cover c)
                 throws java.lang.IllegalArgumentException
This method will insert the title, subtitle, artist, tracks and the description.

Specified by:
fillBooklet in interface Data
Parameters:
c - the cover where to add new elements.
Throws:
java.lang.IllegalArgumentException - if the cover is no booklet.