|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.applications.media.builders.MediaSources
The MediaSource builder describes a specific type of media that can be retrieved (real/mp3/etc). Information about format, quality, and status will be maintained in this object. A MediaSource belongs to a MediaFragement that describes the piece of media, the MediaSource is the real audio/video itself. A MediaSource is connected to provider objects that indicate where the real audio/video files can be found.
| Field Summary | |
static java.lang.String |
FUNCTION_AVAILABLE
|
static java.lang.String |
FUNCTION_CODEC
|
static java.lang.String |
FUNCTION_FILTEREDURLS
|
static java.lang.String |
FUNCTION_FORMAT
|
static java.lang.String |
FUNCTION_MIMETYPE
|
static java.lang.String |
FUNCTION_URL
|
static java.lang.String |
FUNCTION_URLS
|
static int |
MONO
|
static int |
STATE_DONE
|
static java.lang.String |
STATES_RESOURCE
|
static int |
STEREO
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, GUI_PARAMETERS, listCache, nodeCache, OBJ2TYPE_MAX_SIZE, oType, REPLACE_CACHE, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
| Fields inherited from class org.mmbase.module.core.MMTable |
mmb, tableName |
| Constructor Summary | |
MediaSources()
|
|
| Method Summary | |
void |
addProvider(MMObjectNode source,
java.lang.String providername,
java.lang.String owner)
relates a source with given provider. |
boolean |
commit(MMObjectNode node)
The commit can be used to automaticly fill unfilled fields. |
MMObjectNode |
createSource(MMObjectNode mediafragment,
int status,
int format,
int speed,
int channels,
java.lang.String url,
java.lang.String owner)
create a new mediasource, and relate it with specified mediafragment. |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
Functions. |
int |
getChannels(MMObjectNode node)
|
protected Codec |
getCodec(MMObjectNode source)
The codec field is an integer, this function returns a string-presentation |
protected java.util.List |
getFilteredURLs(MMObjectNode source,
MMObjectNode fragment,
java.util.Map info)
Returns all URLs for this source, but filtered, with the best ones on top. |
protected Format |
getFormat(MMObjectNode source)
The format field is an integer, this function returns a string-presentation |
protected java.lang.String |
getFormat(MMObjectNode source,
java.util.Map info)
|
java.lang.String |
getGUIIndicator(MMObjectNode source)
used in the editors |
protected java.util.List |
getProviders(MMObjectNode source)
get all mediaproviders belonging to this mediasource |
int |
getSpeed(MMObjectNode node)
|
protected java.lang.String |
getURL(MMObjectNode source,
java.util.Map info)
resolve the url of the mediasource. |
protected java.util.List |
getURLs(MMObjectNode source,
MMObjectNode fragment,
java.util.Map info,
java.util.List urls,
java.util.Set cacheExpireObjects)
Returns all possible URLs for this source. |
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
int |
insert(java.lang.String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
boolean |
setValue(MMObjectNode node,
java.lang.String fieldName,
java.lang.Object value)
Sets a key/value pair in the main values of this node. |
| Methods inherited from class org.mmbase.module.core.MMTable |
created, getFullTableName, getTableName, size |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String FUNCTION_URLS
public static final java.lang.String FUNCTION_FILTEREDURLS
public static final java.lang.String FUNCTION_URL
public static final java.lang.String FUNCTION_AVAILABLE
public static final java.lang.String FUNCTION_FORMAT
public static final java.lang.String FUNCTION_CODEC
public static final java.lang.String FUNCTION_MIMETYPE
public static final int STATE_DONE
public static final java.lang.String STATES_RESOURCE
public static final int MONO
public static final int STEREO
| Constructor Detail |
public MediaSources()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()
public MMObjectNode createSource(MMObjectNode mediafragment,
int status,
int format,
int speed,
int channels,
java.lang.String url,
java.lang.String owner)
mediafragment - the media fragment to which this source belongsstatus - of the media sourceformat - the format of the source (Real, Mp3)channels - stereo/monourl - the file name of the media sourceowner - creator of the new object
MediaSource
protected java.lang.String getURL(MMObjectNode source,
java.util.Map info)
source - the media sourceinfo - extra info (i.e. HttpRequestIno, bitrate, etc.)
public java.lang.String getGUIIndicator(MMObjectNode source)
getGUIIndicator in class MMObjectBuildersource - The node to display
Stringpublic int getSpeed(MMObjectNode node)
public int getChannels(MMObjectNode node)
protected Format getFormat(MMObjectNode source)
protected java.lang.String getFormat(MMObjectNode source,
java.util.Map info)
protected Codec getCodec(MMObjectNode source)
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)
protected java.util.List getURLs(MMObjectNode source,
MMObjectNode fragment,
java.util.Map info,
java.util.List urls,
java.util.Set cacheExpireObjects)
protected java.util.List getFilteredURLs(MMObjectNode source,
MMObjectNode fragment,
java.util.Map info)
public void addProvider(MMObjectNode source,
java.lang.String providername,
java.lang.String owner)
source - the media source.providername - the name of the provider that is going to be related.owner - the owner name that is creating the relation.protected java.util.List getProviders(MMObjectNode source)
source - the mediasource
public boolean setValue(MMObjectNode node,
java.lang.String fieldName,
java.lang.Object value)
MMObjectBuilder
setValue in class MMObjectBuildervalue - the value which was original in the field
true When an update is required(when changed),
false if original value was set back into the field.public boolean commit(MMObjectNode node)
commit in class MMObjectBuildernode - The node to be committed
public int insert(java.lang.String owner,
MMObjectNode node)
MMObjectBuilderMMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
insert in class MMObjectBuilderowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.
int value which is the new object's unique number, -1 if the insert failed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||