at.tuwien.ifs.somtoolbox.data.metadata
Class MP3VectorMetaData

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.data.metadata.AbstractVectorMetaData
      extended by at.tuwien.ifs.somtoolbox.data.metadata.AudioVectorMetaData
          extended by at.tuwien.ifs.somtoolbox.data.metadata.MP3VectorMetaData

public class MP3VectorMetaData
extends AudioVectorMetaData

Version:
$Id: MP3VectorMetaData.java 3587 2010-05-21 10:35:33Z mayer $
Author:
Jakob Frank

Field Summary
private  String cacheAlbum
           
private  String cacheArtist
           
private  String cacheTitle
           
private static String displayFormat
           
private static String emptyLabel
           
private  org.blinkenlights.jid3.MP3File mp3File
           
 
Constructor Summary
MP3VectorMetaData(File file)
           
MP3VectorMetaData(File file, String id)
           
MP3VectorMetaData(String filename)
           
 
Method Summary
private  void createSearchCache()
           
private static void fillListWithFiles(LinkedList<MP3VectorMetaData> lls, File baseDir)
           
private  String getAlbum()
           
private  String getArtist()
           
 String getDisplayLabel()
          Returns a String to display on screen.
private  String getTitle()
           
static void main(String[] args)
           
 boolean matches(Pattern pattern)
          Tests if the vectors MetaData matches the given Pattern.
 boolean matches(String pattern, boolean ignoreCase)
          Tests if the vector's MetaData matches the given pattern.
static void setDisplayLabelFormat(String format)
          Define the Format of the DisplayLabel.
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.metadata.AudioVectorMetaData
checkFileExistence, createMetaData, createMetaData, getAudioFile, getID, stripFileNamePreAndSuffix
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.metadata.AbstractVectorMetaData
createMetaData, equals, hashCode, matches, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

displayFormat

private static String displayFormat

emptyLabel

private static String emptyLabel

cacheTitle

private String cacheTitle

cacheAlbum

private String cacheAlbum

cacheArtist

private String cacheArtist

mp3File

private final org.blinkenlights.jid3.MP3File mp3File
Constructor Detail

MP3VectorMetaData

public MP3VectorMetaData(String filename)
                  throws FileNotFoundException
Throws:
FileNotFoundException

MP3VectorMetaData

public MP3VectorMetaData(File file,
                         String id)
                  throws FileNotFoundException
Throws:
FileNotFoundException

MP3VectorMetaData

public MP3VectorMetaData(File file)
                  throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

getDisplayLabel

public String getDisplayLabel()
Description copied from class: AbstractVectorMetaData
Returns a String to display on screen.

Overrides:
getDisplayLabel in class AudioVectorMetaData
Returns:
the (Display)Label

matches

public boolean matches(Pattern pattern)
Description copied from class: AbstractVectorMetaData
Tests if the vectors MetaData matches the given Pattern.

Overrides:
matches in class AudioVectorMetaData
Parameters:
pattern - the Pattern to test.
Returns:
true if the pattern matches.
See Also:
AbstractVectorMetaData.matches(String)

matches

public boolean matches(String pattern,
                       boolean ignoreCase)
Description copied from class: AbstractVectorMetaData
Tests if the vector's MetaData matches the given pattern. It is the vectors metadata's decision whether it wants to be found by the given Pattern or not and how to handle wildcards.

Overrides:
matches in class AudioVectorMetaData
Parameters:
pattern - The pattern to match.
ignoreCase - set true to ignore case considerations.
Returns:
true if the pattern matches.
See Also:
AbstractVectorMetaData.matches(Pattern), AbstractVectorMetaData.matches(String)

setDisplayLabelFormat

public static void setDisplayLabelFormat(String format)
Define the Format of the DisplayLabel.

The following macros are valid and can be used:

The default format is $title - $artist.

Parameters:
format - the Format.

main

public static void main(String[] args)

fillListWithFiles

private static void fillListWithFiles(LinkedList<MP3VectorMetaData> lls,
                                      File baseDir)
                               throws FileNotFoundException
Throws:
FileNotFoundException

getArtist

private String getArtist()

getTitle

private String getTitle()

getAlbum

private String getAlbum()

createSearchCache

private void createSearchCache()