|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.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 Parameter[] |
AVAILABLE_PARAMETERS
|
static Parameter[] |
CODEC_PARAMETERS
|
static Parameter[] |
FILTEREDURLS_PARAMETERS
|
static Parameter[] |
FORMAT_PARAMETERS
|
static String |
FUNCTION_AVAILABLE
|
static String |
FUNCTION_CODEC
|
static String |
FUNCTION_FILTEREDURLS
|
static String |
FUNCTION_FORMAT
|
static String |
FUNCTION_MIMETYPE
|
static String |
FUNCTION_URL
|
static String |
FUNCTION_URLS
|
static Parameter[] |
MIMETYPE_PARAMETERS
|
static int |
MONO
|
static int |
STATE_DONE
|
static int |
STATE_REMOVED
|
static int |
STATE_SOURCE
|
static String |
STATES_RESOURCE
|
static int |
STEREO
|
static Parameter[] |
URL_PARAMETERS
|
static Parameter[] |
URLS_PARAMETERS
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, searchAge, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions |
| Constructor Summary | |
MediaSources()
|
|
| Method Summary | |
void |
addProvider(MMObjectNode source,
String providername,
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,
String url,
String owner)
create a new mediasource, and relate it with specified mediafragment. |
protected Object |
executeFunction(MMObjectNode node,
String function,
List args)
Executes a function on the field of a node, and returns the result. This method is called by the builder's MMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions. |
int |
getChannels(MMObjectNode node)
|
protected Codec |
getCodec(MMObjectNode source)
The codec field is an integer, this function returns a string-presentation |
protected List |
getFilteredURLs(MMObjectNode source,
MMObjectNode fragment,
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 String |
getFormat(MMObjectNode source,
Map info)
|
String |
getGUIIndicator(MMObjectNode source)
used in the editors |
protected List |
getProviders(MMObjectNode source)
get all mediaproviders belonging to this mediasource |
int |
getSpeed(MMObjectNode node)
|
protected String |
getURL(MMObjectNode source,
Map info)
resolve the url of the mediasource. |
protected List |
getURLs(MMObjectNode source,
MMObjectNode fragment,
Map info,
List urls,
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. The method retrieves data from the TypeDef builder, or adds data to that builder if the current builder is not yet registered. |
int |
insert(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,
String fieldName,
Object value)
Sets a key/value pair in the main values of this node. |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String FUNCTION_URLS
public static final String FUNCTION_FILTEREDURLS
public static final String FUNCTION_URL
public static final String FUNCTION_AVAILABLE
public static final String FUNCTION_FORMAT
public static final String FUNCTION_CODEC
public static final String FUNCTION_MIMETYPE
public static final Parameter[] URLS_PARAMETERS
public static final Parameter[] FILTEREDURLS_PARAMETERS
public static final Parameter[] URL_PARAMETERS
public static final Parameter[] AVAILABLE_PARAMETERS
public static final Parameter[] FORMAT_PARAMETERS
public static final Parameter[] CODEC_PARAMETERS
public static final Parameter[] MIMETYPE_PARAMETERS
public static final int STATE_DONE
public static final int STATE_SOURCE
public static final int STATE_REMOVED
public static final String STATES_RESOURCE
public static final int MONO
public static final int STEREO
| Constructor Detail |
public MediaSources()
| Method Detail |
public boolean init()
init in class MMObjectBuilderMMObjectBuilder.create()
public MMObjectNode createSource(MMObjectNode mediafragment,
int status,
int format,
int speed,
int channels,
String url,
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 String getURL(MMObjectNode source,
Map info)
source - the media sourceinfo - extra info (i.e. HttpRequestIno, bitrate, etc.)
public 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 String getFormat(MMObjectNode source,
Map info)
protected Codec getCodec(MMObjectNode source)
protected Object executeFunction(MMObjectNode node,
String function,
List args)
MMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)
protected List getURLs(MMObjectNode source,
MMObjectNode fragment,
Map info,
List urls,
Set cacheExpireObjects)
protected List getFilteredURLs(MMObjectNode source,
MMObjectNode fragment,
Map info)
public void addProvider(MMObjectNode source,
String providername,
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 List getProviders(MMObjectNode source)
source - the mediasource
public boolean setValue(MMObjectNode node,
String fieldName,
Object value)
MMObjectBuilder
setValue in class MMObjectBuilderfieldName - the name of the field to changenode - The node on which to change the field (the new value is in this node)value - 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(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 | |||||||||