net.sourceforge.neurosdbm.db
Class AudioDB

java.lang.Object
  extended bynet.sourceforge.neurosdbm.db.AudioDBBase
      extended bynet.sourceforge.neurosdbm.db.AudioDB

public class AudioDB
extends AudioDBBase


Nested Class Summary
(package private)  class AudioDBBase.AlbumComparator
           
(package private)  class AudioDBBase.AlbumSubbaseComparator
           
(package private)  class AudioDBBase.ArtistComparator
           
(package private)  class AudioDBBase.ArtistSubbaseComparator
          Two key sort - album name then track number
(package private)  class AudioDBBase.AudioTitleComparator
           
(package private)  class AudioDBBase.GenreComparator
           
(package private)  class AudioDBBase.GenreSubbaseComparator
           
(package private)  class AudioDBBase.PlaylistComparator
           
 
Field Summary
(package private)  AlbumsMDB albumsMDB
           
(package private)  PAI albumsPAI
           
(package private)  AlbumsSAI albumsSAI
           
(package private)  ArtistAlbumMDB artistAlbumMDB
           
(package private)  PAI artistAlbumPAI
           
(package private)  ArtistAlbumSAI artistAlbumSAI
           
(package private)  ArtistMDB artistMDB
           
(package private)  PAI artistPAI
           
(package private)  ArtistSAI artistSAI
           
(package private)  AudioMDB audioMDB
           
(package private)  AudioSAI audioSAI
           
(package private) static int DBTYPE_AUDIO
           
(package private) static int DBTYPE_PCAUDIO
           
(package private)  GenreMDB genreMDB
           
(package private)  PAI genrePAI
           
(package private)  GenreSAI genreSAI
           
(package private)  PlaylistMDB playlistMDB
           
(package private)  PAI playlistPAI
           
(package private)  PlaylistSAI playlistSAI
           
(package private)  RecordingsMDB recordingsMDB
           
(package private)  PAI recordingsPAI
           
(package private)  RecordingsSAI recordingsSAI
           
 
Constructor Summary
AudioDB(Database database, java.lang.String path)
           
AudioDB(Database database, java.lang.String path, boolean createEmptyDB)
           
 
Method Summary
(package private)  int addNewTrack(NewTrack newTrack)
           
(package private)  void addToPlaylist(int trackKey, int playlistKey)
          This function makes the appropriate links to add a track to a playlist.
(package private)  void computeMDBPointers()
           
(package private)  int createPlaylist(java.lang.String name)
          Creates a new playlist.
(package private)  void deleteFromPlaylist(int trackKey, int playlistKey)
          This function fixes the appropriate links when a track is to be removed from a playlist.
(package private)  void deleteTrack(java.util.ArrayList playListKeys, int audioKey, int artistKey, int albumKey, int genreKey)
           
(package private)  ArtistDisplayRecord getAArtistDisplayRecord(int key)
           
(package private)  java.lang.String getAlbum(int key)
           
(package private)  AlbumDisplayRecord getAlbumDisplayRecord(int key)
           
(package private)  java.lang.String getArtist(int key)
           
(package private)  ArtistDisplayRecord getArtistDisplayRecord(int key)
           
(package private)  java.lang.String getAudioDBName()
           
(package private)  AudioDisplayRecord getAudioDisplayRecord(int key)
           
(package private)  int getDBType()
           
(package private)  java.lang.String getGenre(int key)
           
(package private)  GenreDisplayRecord getGenreDisplayRecord(int key)
           
(package private)  PlaylistDisplayRecord getPlaylistDisplayRecord(int key)
           
(package private)  RecordingDisplayRecord getRecordingDisplayRecord(int key)
           
(package private)  boolean isADuplicate(NewTrack newTrack)
          Determines if the new track is already in the database.
 AudioRecord modifyTrack(int audioKey, NewTrack newTrack)
          The purpose of this function is to modify the Neuros tags of given track.
(package private)  DisplayRecord query(DisplayIndex index)
           
(package private)  java.util.ArrayList query(int database, int type)
           
(package private)  java.util.ArrayList query(int database, int type, int key)
           
(package private)  void removePlaylist(int playlistKey)
          This function completly removes a playlist from this database.
(package private)  void renamePlaylist(java.lang.String newName, int playlistKey)
           
(package private)  void reorder(java.util.ArrayList list, int subDatabase, int mdbKey)
           
(package private)  void sort(java.util.ArrayList list)
           
(package private)  void sort(java.util.ArrayList list, int subDatabase, int mdbKey)
           
 java.lang.String toString()
           
(package private)  void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

audioMDB

AudioMDB audioMDB

audioSAI

AudioSAI audioSAI

playlistMDB

PlaylistMDB playlistMDB

playlistSAI

PlaylistSAI playlistSAI

playlistPAI

PAI playlistPAI

artistMDB

ArtistMDB artistMDB

artistSAI

ArtistSAI artistSAI

artistPAI

PAI artistPAI

albumsMDB

AlbumsMDB albumsMDB

albumsSAI

AlbumsSAI albumsSAI

albumsPAI

PAI albumsPAI

genreMDB

GenreMDB genreMDB

genreSAI

GenreSAI genreSAI

genrePAI

PAI genrePAI

recordingsMDB

RecordingsMDB recordingsMDB

recordingsSAI

RecordingsSAI recordingsSAI

recordingsPAI

PAI recordingsPAI

artistAlbumMDB

ArtistAlbumMDB artistAlbumMDB

artistAlbumSAI

ArtistAlbumSAI artistAlbumSAI

artistAlbumPAI

PAI artistAlbumPAI

DBTYPE_AUDIO

static final int DBTYPE_AUDIO
See Also:
Constant Field Values

DBTYPE_PCAUDIO

static final int DBTYPE_PCAUDIO
See Also:
Constant Field Values
Constructor Detail

AudioDB

public AudioDB(Database database,
               java.lang.String path)
        throws java.io.FileNotFoundException,
               java.io.IOException,
               DatabaseCorruptException

AudioDB

public AudioDB(Database database,
               java.lang.String path,
               boolean createEmptyDB)
        throws java.io.FileNotFoundException,
               java.io.IOException,
               DatabaseCorruptException
Method Detail

getAudioDBName

java.lang.String getAudioDBName()
Specified by:
getAudioDBName in class AudioDBBase

getDBType

int getDBType()
Specified by:
getDBType in class AudioDBBase

write

void write()
     throws java.io.IOException,
            DatabaseInternalCorruptionException
Throws:
java.io.IOException
DatabaseInternalCorruptionException

query

java.util.ArrayList query(int database,
                          int type)

query

java.util.ArrayList query(int database,
                          int type,
                          int key)

query

DisplayRecord query(DisplayIndex index)

sort

void sort(java.util.ArrayList list)

sort

void sort(java.util.ArrayList list,
          int subDatabase,
          int mdbKey)

reorder

void reorder(java.util.ArrayList list,
             int subDatabase,
             int mdbKey)

getAudioDisplayRecord

AudioDisplayRecord getAudioDisplayRecord(int key)

getPlaylistDisplayRecord

PlaylistDisplayRecord getPlaylistDisplayRecord(int key)

getArtistDisplayRecord

ArtistDisplayRecord getArtistDisplayRecord(int key)

getAArtistDisplayRecord

ArtistDisplayRecord getAArtistDisplayRecord(int key)

getAlbumDisplayRecord

AlbumDisplayRecord getAlbumDisplayRecord(int key)

getGenreDisplayRecord

GenreDisplayRecord getGenreDisplayRecord(int key)

getRecordingDisplayRecord

RecordingDisplayRecord getRecordingDisplayRecord(int key)

addNewTrack

int addNewTrack(NewTrack newTrack)
          throws DatabaseInternalCorruptionException
Throws:
DatabaseInternalCorruptionException

deleteTrack

void deleteTrack(java.util.ArrayList playListKeys,
                 int audioKey,
                 int artistKey,
                 int albumKey,
                 int genreKey)

modifyTrack

public AudioRecord modifyTrack(int audioKey,
                               NewTrack newTrack)
The purpose of this function is to modify the Neuros tags of given track. Essentially it deletes the old track and creates a new track with the information.

Parameters:
audioKey - The key of the track to be changed in the audio database.
newTrack - The new information.
Returns:
The AudioRecord of the new track

toString

public java.lang.String toString()

isADuplicate

boolean isADuplicate(NewTrack newTrack)
Determines if the new track is already in the database.

Parameters:
newTrack - The new track to check
Returns:
Is it a duplicate - true means yes it is!

createPlaylist

int createPlaylist(java.lang.String name)
Creates a new playlist. The key of the new playlist is returned.

Parameters:
name - The name of this playlist.
Returns:
The key of the newly created playlist.

removePlaylist

void removePlaylist(int playlistKey)
This function completly removes a playlist from this database.

Parameters:
playlistKey - The playlist to remove.

addToPlaylist

void addToPlaylist(int trackKey,
                   int playlistKey)
             throws DatabaseInternalCorruptionException
This function makes the appropriate links to add a track to a playlist.

Parameters:
trackKey - The track to be added to the playlist.
playlistKey - The key to the playlist.
Throws:
DatabaseInternalCorruptionException

deleteFromPlaylist

void deleteFromPlaylist(int trackKey,
                        int playlistKey)
                  throws DatabaseInternalCorruptionException
This function fixes the appropriate links when a track is to be removed from a playlist.

Parameters:
trackKey - THe track to be removed from the playlist.
playlistKey - The key to the playlist.
Throws:
DatabaseInternalCorruptionException

renamePlaylist

void renamePlaylist(java.lang.String newName,
                    int playlistKey)

getArtist

java.lang.String getArtist(int key)

getAlbum

java.lang.String getAlbum(int key)

getGenre

java.lang.String getGenre(int key)

computeMDBPointers

void computeMDBPointers()


Copyright © 2004 NeurosDBM Dev Team All Rights Reserved.