|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to be implemented by a media source.
Corresponds to Source table in JReceiver database.
Field Summary | |
static java.lang.String |
DEFAULT_URL
|
static java.lang.String |
FORCE_PLAYLIST_URL
|
static java.lang.String |
HKEY_CONTENT_URL
|
static java.lang.String |
HKEY_DIRECT_URI
|
static java.lang.String |
HKEY_DST_MIME
|
static java.lang.String |
HKEY_DURATION
|
static java.lang.String |
HKEY_MIME
|
static java.lang.String |
HKEY_SITE_ID
|
static java.lang.String |
HKEY_SRC_ID
|
static java.lang.String |
HKEY_SRC_TYPE
|
static java.lang.String |
HKEY_TITLE
|
static int |
MAX_SRC_ID
an upper limit for source identifiers |
static int |
MIN_SRC_ID
source ids must start no lower than this |
static java.lang.String |
POPULATE_CONTENT_URL
Populate source url with the source on the Content server. |
static java.lang.String |
POPULATE_DIRECT_URI
Populate source url with a direct URL to the source, bypassing the content server. |
static java.lang.String |
POPULATE_MEXTERNAL
populate mexternal interface of a source bean, if available |
static java.lang.String |
POPULATE_MFILE
populate mfile interface of a source bean, if available |
static int |
SRCTYPE_PLAYLIST
a playlist, stored locally as a file, generated dynamically though a database query or fetched from a remote location. |
static int |
SRCTYPE_TUNE
a tune, stored locally as a file, generated dynamically or streamed from a remote location. |
static int |
SRCTYPE_UNDEFINED
|
Fields inherited from interface jreceiver.common.rec.Rec |
HKEY_KEY, NO_LIMIT |
Method Summary | |
java.lang.String |
getContentSystemId()
obtain the content server URL as a string |
java.net.URL |
getContentURL()
obtain the content server URL of the source |
java.lang.String |
getDirectSystemId()
Obtain the URI (as a String) of a local file source (in file:/ form) or if a remote source, a direct link to it. |
org.esau.ptarmigan.util.PtarURI |
getDirectURI()
Obtain the URI of a local file source (in file:/ form) or if a remote source, a direct link to it. |
java.lang.String |
getDstMime()
Obtain an ARBITRARY mime-types for the source that is consumable by a particular driver used in the construction of this source object, either through transcoding or (preferably) natively. |
int |
getDuration()
Obtain the duration of the source, in seconds |
java.io.File |
getFile()
|
java.lang.String |
getFileExtension()
|
java.lang.String |
getFileName()
|
java.lang.String |
getFilePath()
|
boolean |
getIsLocal()
Return true if the source refers to a local file, as indexed in the mfile table. |
boolean |
getIsOffsite()
return true if the source is offsite, i.e., stored on a peer server |
boolean |
getIsPlaylist()
return true if the source refers to list of tunes |
boolean |
getIsTune()
return true if the source refers to a single tune |
java.lang.String |
getMime()
obtain the source content-type id |
int |
getSiteId()
obtain the source's location (0 if local; >0 if off-site) |
int |
getSrcId()
obtain the source id |
java.lang.String |
getTitle()
obtain the source name |
int |
getType()
obtain the source type |
void |
setContentURL(java.net.URL url)
assign the URL of the source on the content server |
void |
setDirectURI(org.esau.ptarmigan.util.PtarURI uri)
assign the direct URI of the source |
void |
setDirectURI(java.lang.String s_uri)
assign the direct URI of the source, absolute |
void |
setDuration(int duration)
Assign the duration of the source, in seconds |
void |
setMime(java.lang.String mime)
assign the source content-type id |
void |
setSrcId(int src_id)
assign the source id |
void |
setTitle(java.lang.String title)
assign the source name |
Methods inherited from interface jreceiver.common.rec.Rec |
getKey, setKey |
Methods inherited from interface jreceiver.common.rec.Hashable |
toHash, toString |
Field Detail |
public static final java.lang.String HKEY_SRC_ID
public static final java.lang.String HKEY_TITLE
public static final java.lang.String HKEY_SRC_TYPE
public static final java.lang.String HKEY_SITE_ID
public static final java.lang.String HKEY_MIME
public static final java.lang.String HKEY_DST_MIME
public static final java.lang.String HKEY_DURATION
public static final java.lang.String HKEY_DIRECT_URI
public static final java.lang.String HKEY_CONTENT_URL
public static final int MIN_SRC_ID
public static final int MAX_SRC_ID
public static final java.lang.String POPULATE_MFILE
public static final java.lang.String POPULATE_MEXTERNAL
public static final java.lang.String POPULATE_CONTENT_URL
public static final java.lang.String DEFAULT_URL
public static final java.lang.String FORCE_PLAYLIST_URL
public static final java.lang.String POPULATE_DIRECT_URI
For Mfile sources, this will be a file:/ URL.
For Mexternal (remote) sources, this will be a http:/ URL that points to something other than the JReceiver Content Server.
public static final int SRCTYPE_UNDEFINED
public static final int SRCTYPE_TUNE
public static final int SRCTYPE_PLAYLIST
Method Detail |
public int getSrcId()
public void setSrcId(int src_id)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public int getType()
public int getSiteId()
public java.lang.String getMime()
public void setMime(java.lang.String mime)
public int getDuration()
public void setDuration(int duration)
public java.lang.String getDstMime()
Only valid if source is initialized for a particular driver.
public java.net.URL getContentURL()
If requested by a client, this URL refers to the source on the Content Server.
public java.lang.String getContentSystemId()
public void setContentURL(java.net.URL url)
public org.esau.ptarmigan.util.PtarURI getDirectURI()
public java.lang.String getDirectSystemId()
public void setDirectURI(org.esau.ptarmigan.util.PtarURI uri)
public void setDirectURI(java.lang.String s_uri) throws java.io.IOException, java.net.MalformedURLException
public java.io.File getFile() throws java.io.IOException
public java.lang.String getFilePath() throws java.io.IOException
public java.lang.String getFileName() throws java.io.IOException
public java.lang.String getFileExtension() throws java.io.IOException
public boolean getIsTune()
public boolean getIsPlaylist()
public boolean getIsOffsite()
Note that this is NOT the same thing as an 'external' source, which is outside the peergroup. An example would be the BBC streaming source.
public boolean getIsLocal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |