|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jreceiver.common.rec.BaseRec
|
+--jreceiver.common.rec.source.SourceRec
|
+--jreceiver.common.rec.source.TuneRec
Abstract class to provide basic implementation of Tune interface
| Field Summary | |
protected Album |
m_album
|
protected Artist |
m_artist
|
protected int |
m_bitrate
|
protected Comment |
m_comment
|
protected Composer |
m_composer
|
protected int |
m_data_offset
|
protected java.util.Vector |
m_genres
|
protected boolean |
m_is_checked
is the item selected in the form? |
protected int |
m_trackno
|
protected int |
m_tune_type
File (1), Station (2) or CD-based (4) |
protected int |
m_year
|
| Fields inherited from class jreceiver.common.rec.source.SourceRec |
m_content_url, m_direct_uri, m_dst_mime, m_duration, m_mime, m_site_id, m_src_id, m_src_type, m_title |
| Fields inherited from interface jreceiver.common.rec.source.Tune |
HKEY_ALBUM, HKEY_BITRATE, HKEY_COMMENT, HKEY_COMPOSER, HKEY_CONTENT_TYPE, HKEY_DATA_OFFSET, HKEY_LEAD_PERFORMER, HKEY_TRACK_NUMBER, HKEY_TUNE_TYPE, HKEY_YEAR, POPULATE_ALBUM, POPULATE_ARTIST, POPULATE_COMMENTS, POPULATE_COMPOSER, POPULATE_GENRELIST, TUNE_TYPE_ALL, TUNE_TYPE_CD_BASED, TUNE_TYPE_FILE, TUNE_TYPE_STATION |
| Fields inherited from interface jreceiver.common.rec.source.Source |
DEFAULT_URL, FORCE_PLAYLIST_URL, HKEY_CONTENT_URL, HKEY_DIRECT_URI, HKEY_DST_MIME, HKEY_DURATION, HKEY_MIME, HKEY_SITE_ID, HKEY_SRC_ID, HKEY_SRC_TYPE, HKEY_TITLE, MAX_SRC_ID, MIN_SRC_ID, POPULATE_CONTENT_URL, POPULATE_DIRECT_URI, POPULATE_MEXTERNAL, POPULATE_MFILE, SRCTYPE_PLAYLIST, SRCTYPE_TUNE, SRCTYPE_UNDEFINED |
| Fields inherited from interface jreceiver.common.rec.Rec |
HKEY_KEY, NO_LIMIT |
| Fields inherited from interface jreceiver.common.rec.Selectable |
HKEY_CHECKED |
| Constructor Summary | |
|
TuneRec()
ctor - default (for use with beanutils) |
protected |
TuneRec(java.util.Hashtable hash)
ctor - construct from a hashtable, usually retrieved via XML-RPC |
protected |
TuneRec(int src_id,
java.lang.String mime,
int tune_type)
ctor - minimalist |
protected |
TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url)
ctor |
protected |
TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url,
java.util.Vector genres,
int bitrate)
ctor |
protected |
TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url,
java.util.Vector genres,
int bitrate,
int data_offset,
int trackno,
int year,
Artist artist,
Album album,
Composer composer,
Comment comment)
ctor |
| Method Summary | |
void |
addComment(java.lang.String str)
add a comment, starting with the summary and then text |
void |
addGenre(java.lang.String genre)
assign a single genre |
static SourceRec |
createInstance(java.util.Hashtable hash)
Create a TuneRec object preserved as a hash that has arrived over an XML-RPC connection or similar. |
static SourceRec |
createInstance(java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
java.util.Vector genres,
int bitrate,
int data_offset,
int trackno,
int year,
Artist artist,
Album album,
Composer composer,
Comment comment)
Create a basic TuneRec object of the specified type. |
Album |
getAlbum()
obtain the album |
java.lang.String |
getAlbumStr()
obtain the album name, (used for display in jsp) |
Artist |
getArtist()
obtain the lead performer |
java.lang.String |
getArtistStr()
obtain the artist name, (used for display in jsp) |
int |
getBitrate()
obtain the 'bitrate' |
boolean |
getChecked()
get the current select state |
Comment |
getComment()
obtain the comment |
java.lang.String |
getCommentStr()
assign the comment |
Composer |
getComposer()
obtain the composer |
java.lang.String |
getComposerStr()
obtain the composer name, (used for display in jsp) |
int |
getDataOffset()
obtain the offset in the music file where the mpeg data starts. |
java.util.Vector |
getGenres()
obtain the genres |
java.lang.String |
getGenreStr()
obtain the genre list, as a comma-delimited string (used for display) |
boolean |
getIsCdBasedTune()
|
boolean |
getIsStationTune()
|
boolean |
getIsTuneFile()
|
int |
getTrackNo()
obtain the 'trackno' |
int |
getTuneType()
obtain the 'type' of the tune (Tune.TUNE_TYPE_*) |
int |
getYear()
obtain the 'year' |
static java.util.Vector |
reconstitute(java.util.Vector vector)
Reconstitute each DtuneRec object that appears as a hash in the list. |
void |
setAlbum(Album album)
assign the album |
void |
setAlbum(java.lang.String album)
assign the album (as a String) |
void |
setArtist(Artist artist)
assign the lead performer |
void |
setArtist(java.lang.String artist)
assign the lead performer (as a String) |
void |
setBitrate(int bitrate)
assign the 'bitrate' |
void |
setChecked(boolean is_checked)
set the select state |
void |
setComment(Comment comment)
assign the comment |
void |
setComposer(Composer composer)
assign the composer |
void |
setComposer(java.lang.String composer)
assign the composer (as a String) |
void |
setDataOffset(int data_offset)
assign the offset in the music file where the mpeg data starts. |
void |
setGenres(java.util.Vector genres)
assign the genres |
void |
setTrackNo(int trackno)
assign the 'trackno' |
void |
setTuneType(int tune_type)
assign the 'type' of the tune (Tune.TUNE_TYPE_*) |
void |
setYear(int year)
assign the 'year' |
java.util.Hashtable |
toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class jreceiver.common.rec.source.SourceRec |
getContentSystemId, getContentURL, getDirectSystemId, getDirectURI, getDstMime, getDuration, getFile, getFileExtension, getFileName, getFilePath, getIsLocal, getIsOffsite, getIsPlaylist, getIsTune, getKey, getMime, getSiteId, getSrcId, getTitle, getType, setContentURL, setDirectURI, setDirectURI, setDuration, setKey, setMime, setSrcId, setTitle |
| Methods inherited from class jreceiver.common.rec.BaseRec |
dissolve, dissolveMap, find, find, find, find |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jreceiver.common.rec.source.Source |
getContentSystemId, getContentURL, getDirectSystemId, getDirectURI, getDstMime, getDuration, getFile, getFileExtension, getFileName, getFilePath, getIsLocal, getIsOffsite, getIsPlaylist, getIsTune, getMime, getSiteId, getSrcId, getTitle, getType, setContentURL, setDirectURI, setDirectURI, setDuration, setMime, setSrcId, setTitle |
| Methods inherited from interface jreceiver.common.rec.Rec |
getKey, setKey |
| Field Detail |
protected int m_tune_type
protected int m_data_offset
protected int m_bitrate
protected int m_trackno
protected int m_year
protected Artist m_artist
protected Album m_album
protected Composer m_composer
protected Comment m_comment
protected java.util.Vector m_genres
protected boolean m_is_checked
| Constructor Detail |
public TuneRec()
protected TuneRec(int src_id,
java.lang.String mime,
int tune_type)
protected TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url)
protected TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url,
java.util.Vector genres,
int bitrate)
protected TuneRec(int src_id,
java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
org.esau.ptarmigan.util.PtarURI direct_uri,
java.net.URL content_url,
java.util.Vector genres,
int bitrate,
int data_offset,
int trackno,
int year,
Artist artist,
Album album,
Composer composer,
Comment comment)
protected TuneRec(java.util.Hashtable hash)
throws RecException
| Method Detail |
public java.util.Hashtable toHash()
Use DtuneRec(Hashtable) to transform the data
back into an object of this type.
toHash in interface HashabletoHash in class SourceRecjreceiver.common.rec.Hashablepublic int getTuneType()
getTuneType in interface Tunepublic void setTuneType(int tune_type)
setTuneType in interface Tunepublic int getDataOffset()
getDataOffset in interface Tunepublic void setDataOffset(int data_offset)
setDataOffset in interface Tunepublic int getBitrate()
units are in kbps, e.g., 80 == 80kbps
getBitrate in interface Tunepublic void setBitrate(int bitrate)
units are in kbps, e.g., 80 == 80kbps
setBitrate in interface Tunepublic int getTrackNo()
getTrackNo in interface Tunepublic void setTrackNo(int trackno)
setTrackNo in interface Tunepublic int getYear()
getYear in interface Tunepublic void setYear(int year)
setYear in interface Tunepublic Artist getArtist()
getArtist in interface Tunepublic void setArtist(Artist artist)
setArtist in interface Tunepublic void setArtist(java.lang.String artist)
public java.lang.String getArtistStr()
getArtistStr in interface Tunepublic Album getAlbum()
getAlbum in interface Tunepublic void setAlbum(Album album)
setAlbum in interface Tunepublic void setAlbum(java.lang.String album)
public java.lang.String getAlbumStr()
getAlbumStr in interface Tunepublic Composer getComposer()
getComposer in interface Tunepublic void setComposer(Composer composer)
setComposer in interface Tunepublic void setComposer(java.lang.String composer)
public java.lang.String getComposerStr()
getComposerStr in interface Tunepublic Comment getComment()
getComment in interface Tunepublic void setComment(Comment comment)
setComment in interface Tunepublic void addComment(java.lang.String str)
public java.lang.String getCommentStr()
public java.util.Vector getGenres()
getGenres in interface Tunepublic void setGenres(java.util.Vector genres)
setGenres in interface Tunepublic void addGenre(java.lang.String genre)
addGenre in interface Tunepublic java.lang.String getGenreStr()
getGenreStr in interface Tunepublic boolean getChecked()
SelectablegetChecked in interface Selectablejreceiver.common.rec.Selectableboolean true if the item has been selected by the user; false otherwisepublic void setChecked(boolean is_checked)
SelectablesetChecked in interface Selectablejreceiver.common.rec.Selectableis_checked - public boolean getIsTuneFile()
getIsTuneFile in interface Tunepublic boolean getIsStationTune()
getIsStationTune in interface Tunepublic boolean getIsCdBasedTune()
getIsCdBasedTune in interface Tunepublic java.lang.String toString()
HashabletoString in interface HashabletoString in class SourceRec
public static SourceRec createInstance(java.util.Hashtable hash)
throws RecException
The hash should have been created with
toHash().
public static SourceRec createInstance(java.lang.String mime,
int duration,
int tune_type,
java.lang.String title,
java.util.Vector genres,
int bitrate,
int data_offset,
int trackno,
int year,
Artist artist,
Album album,
Composer composer,
Comment comment)
throws RecException
public static java.util.Vector reconstitute(java.util.Vector vector)
throws RecException,
java.net.MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||