Class FileSystemLibraryDescriptor

    • Constructor Detail

      • FileSystemLibraryDescriptor

        public FileSystemLibraryDescriptor​(String id)
      • FileSystemLibraryDescriptor

        public FileSystemLibraryDescriptor()
    • Method Detail

      • addRoot

        public void addRoot​(Path file)
      • getRoots

        public Path[] getRoots()
        Returns:
        alphabetically sorted roots
      • getLastModified

        public long getLastModified()
        Description copied from class: LibraryDescriptor
        If this library descriptor describes a document or is capable of determining the last modification of the library as a whole, this method returns the date.
        Specified by:
        getLastModified in class LibraryDescriptor
        Returns:
        date of last modification or 0 if unknown
      • needsRefresh

        public boolean needsRefresh​(long lastSync)
        Description copied from class: LibraryDescriptor
        Indicates whether we might want to sync this library. If this cannot determined accurately, this method returns true.
        Specified by:
        needsRefresh in class LibraryDescriptor
        Parameters:
        lastSync - date of last sync
        Returns:
        true, if we should probably sync
      • exists

        public boolean exists()
        Description copied from class: LibraryDescriptor
        Indicates whether the library described by this instance actually exists. Defaults to true.
        Overrides:
        exists in class LibraryDescriptor
        Returns:
        true or false
      • wrap

        public AudioSong wrap​(AudioSong audioSong)
        Description copied from class: LibraryDescriptor
        Wraps an internal database song into another AudioSong that is capable of writing/reading data to external databases or files (e.g. Track or AudioMetaData). Depending on the kind of library, this wrapper might be quite different.
        Specified by:
        wrap in class LibraryDescriptor
        Parameters:
        audioSong - song object to be wrapped, e.g. Song
        Returns:
        wrapper
      • wrap

        public PlayList wrap​(PlayList playList)
        Description copied from class: LibraryDescriptor
        Wraps an internal database playlist into another PlayList that is capable of writing/reading data to external databases or files. Depending on the kind of library, this wrapper might be quite different.
        Specified by:
        wrap in class LibraryDescriptor
        Parameters:
        playList - song object to be wrapped, e.g. HibernatePlayList
        Returns:
        wrapper
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object