jlscp
v0.8

org.linuxsampler.lscp
Class DbInstrumentInfo

java.lang.Object
  extended by org.linuxsampler.lscp.AbstractInstrument
      extended by org.linuxsampler.lscp.DbInstrumentInfo
All Implemented Interfaces:
Instrument, Parseable

public class DbInstrumentInfo
extends AbstractInstrument
implements Parseable

Provides information about a database instrument.


Constructor Summary
DbInstrumentInfo(java.lang.String[] resultSet)
          Creates a new instance of DbInstrumentInfo.
 
Method Summary
 java.lang.String getArtists()
          Lists the artist names.
 java.util.Date getDateCreated()
          Returns the date when the instrument is created.
 java.util.Date getDateModified()
          Returns the date when the instrument is last modified.
 java.lang.String getDirectoryPath()
          Returns the absolute path name of the directory containing this instrument.
 java.lang.String getEngine()
          Gets the name of the sampler engine to be used to load the instrument.
 java.lang.String getFormatedSize()
          Gets a user friendly representation of the instruments size.
 java.lang.String getInstrumentPath()
          Returns the absolute path name of this instrument or null if the directory path for this instrument is not set.
 java.lang.String getKeywords()
          Provides a list of keywords that refer to the instrument.
 java.lang.String getProduct()
          Returns the product title of the instrument.
 boolean getShowAbsolutePath()
          Determines whether the toString() method should return the instrument name or the absolute path name of the instrument.
 long getSize()
          Returns the size of the instrument in bytes.
 boolean isDrum()
          Determines whether the instrument is a drumkit or a chromatic instrument.
 boolean parse(java.lang.String s)
          Parses a line of text.
 void setDirectoryPath(java.lang.String dir)
          Sets the absolute path name of the directory containing this instrument.
 void setShowAbsolutePath(boolean b)
          Sets whether the toString() method should return the absolute path name of the instrument.
 java.lang.String toString()
          Returns the name or the absolute path name of the instrument as specified by getShowAbsolutePath().
 
Methods inherited from class org.linuxsampler.lscp.AbstractInstrument
getDescription, getFilePath, getFormatFamily, getFormatVersion, getInstrumentIndex, getKeyMapping, getKeyswitchMapping, getName, setFilePath, setInstrumentIndex, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbInstrumentInfo

public DbInstrumentInfo(java.lang.String[] resultSet)
                 throws LscpException
Creates a new instance of DbInstrumentInfo.

Parameters:
resultSet - An array with information categories about a DB instrument.
Throws:
LscpException
Method Detail

getDirectoryPath

public java.lang.String getDirectoryPath()
Returns the absolute path name of the directory containing this instrument.


setDirectoryPath

public void setDirectoryPath(java.lang.String dir)
Sets the absolute path name of the directory containing this instrument.


getInstrumentPath

public java.lang.String getInstrumentPath()
Returns the absolute path name of this instrument or null if the directory path for this instrument is not set.


getDateCreated

public java.util.Date getDateCreated()
Returns the date when the instrument is created.


getDateModified

public java.util.Date getDateModified()
Returns the date when the instrument is last modified.


getSize

public long getSize()
Returns the size of the instrument in bytes.


getFormatedSize

public java.lang.String getFormatedSize()
Gets a user friendly representation of the instruments size.


isDrum

public boolean isDrum()
Determines whether the instrument is a drumkit or a chromatic instrument.


getProduct

public java.lang.String getProduct()
Returns the product title of the instrument.


getArtists

public java.lang.String getArtists()
Lists the artist names.


getKeywords

public java.lang.String getKeywords()
Provides a list of keywords that refer to the instrument. Keywords are separated with semicolon and blank.


getEngine

public java.lang.String getEngine()
Description copied from interface: Instrument
Gets the name of the sampler engine to be used to load the instrument.

Specified by:
getEngine in interface Instrument
Returns:
The name of the sampler engine to be used to load the instrument.

parse

public boolean parse(java.lang.String s)
              throws LscpException
Parses a line of text.

Specified by:
parse in interface Parseable
Overrides:
parse in class AbstractInstrument
Parameters:
s - The string to be parsed.
Returns:
true if the line has been processed, false otherwise.
Throws:
LscpException - If some error occurs.

getShowAbsolutePath

public boolean getShowAbsolutePath()
Determines whether the toString() method should return the instrument name or the absolute path name of the instrument. The default value is false.


setShowAbsolutePath

public void setShowAbsolutePath(boolean b)
Sets whether the toString() method should return the absolute path name of the instrument.

Parameters:
b - If true the toString() method will return the absolute path name of the instrument instead of the instrument name.

toString

public java.lang.String toString()
Returns the name or the absolute path name of the instrument as specified by getShowAbsolutePath().

Overrides:
toString in class java.lang.Object
See Also:
setShowAbsolutePath(boolean)

jlscp
v0.8

Copyright © 2009 Grigor Iliev. All rights reserved.