Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

medi.plugin
Class MP3File2Db  view MP3File2Db download MP3File2Db.java

java.lang.Object
  extended bymedi.plugin.MediPlugin
      extended bymedi.plugin.AbstractFile2Db
          extended bymedi.plugin.MP3File2Db
All Implemented Interfaces:
javatools.util.plugin.GenericPlugin

public class MP3File2Db
extends AbstractFile2Db

Maps an MP3 into the database, storing information about the title, sampling, author, album. Thanks go to the creator of jd3lib.

Version:
0.3.1

Field Summary
private  java.util.HashMap author2ID
           
private  java.util.HashMap dataSet2ID
           
private  java.util.HashMap genre2ID
           
 
Fields inherited from class medi.plugin.AbstractFile2Db
extensions
 
Fields inherited from class medi.plugin.MediPlugin
inited, prv
 
Constructor Summary
MP3File2Db()
          Creates new MP3File2Db
 
Method Summary
private  java.lang.Long findDataSet(java.lang.String name)
           
private  java.lang.Integer findGenre(java.lang.String name)
           
 java.lang.String getDisplayName()
           
 java.lang.String getLongDescription()
           
 java.lang.String getPluginName()
           
private  java.lang.String guessAuthor(java.lang.String filePath)
           
private  java.lang.String guessTitle(java.lang.String filePath)
           
 void init()
           
 java.lang.Long process(java.io.File procFile, java.lang.Integer fileTypeID)
          Processes a file.
 java.lang.Long process(java.io.File procFile, java.lang.Integer fileTypeID, java.lang.Long dataID)
          Processes a file.
 
Methods inherited from class medi.plugin.AbstractFile2Db
getExtensions, getPluginType, setProvider
 
Methods inherited from class medi.plugin.MediPlugin
isInited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

author2ID

private java.util.HashMap author2ID

genre2ID

private java.util.HashMap genre2ID

dataSet2ID

private java.util.HashMap dataSet2ID
Constructor Detail

MP3File2Db

public MP3File2Db()
Creates new MP3File2Db

Method Detail

getPluginName

public java.lang.String getPluginName()

getDisplayName

public java.lang.String getDisplayName()

getLongDescription

public java.lang.String getLongDescription()

init

public void init()
          throws javatools.util.plugin.PluginException
Specified by:
init in interface javatools.util.plugin.GenericPlugin
Overrides:
init in class MediPlugin

process

public java.lang.Long process(java.io.File procFile,
                              java.lang.Integer fileTypeID)
                       throws javatools.db.DbException
Processes a file.

Specified by:
process in class AbstractFile2Db

process

public java.lang.Long process(java.io.File procFile,
                              java.lang.Integer fileTypeID,
                              java.lang.Long dataID)
                       throws javatools.db.DbException
Processes a file.

Specified by:
process in class AbstractFile2Db

guessTitle

private java.lang.String guessTitle(java.lang.String filePath)

guessAuthor

private java.lang.String guessAuthor(java.lang.String filePath)

findGenre

private java.lang.Integer findGenre(java.lang.String name)
                             throws javatools.db.DbException

findDataSet

private java.lang.Long findDataSet(java.lang.String name)
                            throws javatools.db.DbException