net.sourceforge.neurosdbm.db
Class AdvDatabase
java.lang.Object
net.sourceforge.neurosdbm.db.Database
net.sourceforge.neurosdbm.db.AdvDatabase
- public class AdvDatabase
- extends Database
This is the main database class for the "advanced" database. This
will eventually replace Database.java.
Fields inherited from class net.sourceforge.neurosdbm.db.Database |
DB_AA_ALL, DB_AA_ARTISTS, DB_ALBUMS, DB_ARTISTS, DB_AUDIO, DB_FAILEDHISI, DB_GENRES, DB_HISI, DB_IDEDHISI, DB_PCAUDIO, DB_PLAYLISTS, DB_RECORDINGS, DB_TRACKS, DB_UNIDEDHISI, deleteQueue, device, modifyQueue, music, needForPlaylist, path, playlistQueue, syncQueue |
Constructor Summary |
AdvDatabase(java.lang.String _path,
boolean createNew,
int _device)
|
AdvDatabase(java.lang.String _path,
int _device)
Creates a database given a path and a device. |
Methods inherited from class net.sourceforge.neurosdbm.db.Database |
addFilesToPlaylist, addToPlaylist, addToPlaylist, addToPlaylist, autoBackup, backup, backupError, computeMDBPointers, createPlaylist, createPlaylist, deleteDatabase, deleteFromPlaylist, deleteQueueContains, fixDBDir, getDevice, getNewTrackFromSyncQueue, getNumberDeleted, getNumberModified, getNumberQueued, getPath, hasModifiedPlaylists, markTracksForDeletion, modifyQueueContains, modifyTrack, query, query, query, queryTracksForAlbum, queryTracksForArtist, queryTracksForGenre, queryTracksForPlaylist, queryTracksForRecordings, queueMP3TrackAdd, queueMP3TrackAdd, queueTrackAdd, queueTracksRecurseDirectories, queueWAVTrackAdd, queueWAVTrackAdd, queueWMATrackAdd, queueWMATrackAdd, rearrangePlaylist, rebuild, rebuild, refreshDatabase, refreshDatabase, removePlaylist, renamePlaylist, restore, sort, synchronize, syncQueueContains, testTrackAdd1, testTrackAdd2, testTrackAddRandom, toString, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
audioDB
private AdvAudioDB audioDB
AdvDatabase
public AdvDatabase(java.lang.String _path,
boolean createNew,
int _device)
throws java.io.IOException,
java.io.FileNotFoundException
AdvDatabase
public AdvDatabase(java.lang.String _path,
int _device)
throws java.io.FileNotFoundException,
java.io.IOException,
DatabaseCorruptException,
DatabaseDoesNotExistException
- Creates a database given a path and a device. This assumes that
the database is already created. Called on normal startup.
loadExistingDatabase
private void loadExistingDatabase()
throws java.io.IOException,
DatabaseDoesNotExistException
- This function loads an existing database from disk.
First it sees if a correct path was specified. Throws some
exceptions if things don't look correct.
Assuming everything is OK, then an AdvAudioDB object is created.
Eventually we need to add HiSi DB's and PC Audio DB.
- Throws:
java.io.IOException
DatabaseDoesNotExistException
createEmptyDatabase
public void createEmptyDatabase()
throws java.io.FileNotFoundException,
java.io.IOException,
DatabaseCorruptException
- Overrides:
createEmptyDatabase
in class Database
- Throws:
java.io.FileNotFoundException
java.io.IOException
DatabaseCorruptException
write
public void write(boolean disableAutoBackup)
throws java.io.IOException,
DatabaseInternalCorruptionException
- This function writes the current in memory database to the Neuros
device. An autobackup will occur depending on the argument and
if the option is set.
- Overrides:
write
in class Database
- Parameters:
disableAutoBackup
- true if you don't want to write a autobackup
- Throws:
java.io.IOException
DatabaseInternalCorruptionException
getMDBGroups
public java.util.Set getMDBGroups()
- Return a set of MDBGroupIDs that represent all the MDBs in this
database.
getMDBGroup
public MDBGroup getMDBGroup(MDBGroupID id)
- Return a MDBGroup given a MDBGroupID.
sort
public void sort()
- Overrides:
sort
in class Database
Copyright © 2004 NeurosDBM Dev Team All Rights Reserved.