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

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.data.metadata.AbstractVectorMetaData
      extended by at.tuwien.ifs.somtoolbox.data.metadata.AudioVectorMetaData
Direct Known Subclasses:
MP3VectorMetaData

public class AudioVectorMetaData
extends AbstractVectorMetaData


Field Summary
private  File audioFile
           
private  String orig
           
 
Constructor Summary
AudioVectorMetaData(File file, String id)
           
 
Method Summary
protected static File checkFileExistence(String filename)
          Check if the file exists (absolut or with pre- and suffix)
static AudioVectorMetaData createMetaData(File audioFile)
           
static AudioVectorMetaData createMetaData(String id, File audioFile)
           
 File getAudioFile()
          Get the file this MetaData is describing.
 String getDisplayLabel()
          Returns a String to display on screen.
 String getID()
          Return the unique ID of the Vector.
 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.
protected static String stripFileNamePreAndSuffix(String filename)
           
 
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

orig

private final String orig

audioFile

private final File audioFile
Constructor Detail

AudioVectorMetaData

public AudioVectorMetaData(File file,
                           String id)
Method Detail

checkFileExistence

protected static File checkFileExistence(String filename)
                                  throws FileNotFoundException
Check if the file exists (absolut or with pre- and suffix)

Parameters:
filename - The filename
Returns:
the File
Throws:
FileNotFoundException - if the file does not exist.
See Also:
CommonSOMViewerStateData.fileNamePrefix, CommonSOMViewerStateData.fileNameSuffix

stripFileNamePreAndSuffix

protected static String stripFileNamePreAndSuffix(String filename)

getAudioFile

public File getAudioFile()
Get the file this MetaData is describing.

Returns:
the audioFile

getID

public String getID()
Description copied from class: AbstractVectorMetaData
Return the unique ID of the Vector. (The name/label it is identified by)

Specified by:
getID in class AbstractVectorMetaData
Returns:
the ID-String

createMetaData

public static AudioVectorMetaData createMetaData(String id,
                                                 File audioFile)
                                          throws FileNotFoundException
Throws:
FileNotFoundException

createMetaData

public static AudioVectorMetaData createMetaData(File audioFile)
                                          throws FileNotFoundException
Throws:
FileNotFoundException

getDisplayLabel

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

Specified by:
getDisplayLabel in class AbstractVectorMetaData
Returns:
the (Display)Label

matches

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

Specified by:
matches in class AbstractVectorMetaData
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.

Specified by:
matches in class AbstractVectorMetaData
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)