|
|||||||||
| 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.MediaFragments
The MediaFragment builder describes a piece of media. This can be audio, or video. A media fragment contains a title, description, and more information about the media fragment. A media fragment will have relations with mediasources which are the actual files in different formats (mp3, real, etc.) The classification, and replace methods are added for backwards compatibility.
| Field Summary | |
static Parameter[] |
AVAILABLE_PARAMETERS
|
static Parameter[] |
DURATION_PARAMETERS
|
static Parameter[] |
FILTEREDURLS_PARAMETERS
|
static Parameter[] |
FORMAT_PARAMETERS
|
static java.lang.String |
FUNCTION_AVAILABLE
|
static java.lang.String |
FUNCTION_DURATION
|
static java.lang.String |
FUNCTION_FILTEREDURLS
|
static java.lang.String |
FUNCTION_FORMAT
|
static java.lang.String |
FUNCTION_NUDEURL
|
static java.lang.String |
FUNCTION_PARENTS
|
static java.lang.String |
FUNCTION_ROOT
|
static java.lang.String |
FUNCTION_SUBFRAGMENT
|
static java.lang.String |
FUNCTION_SUBFRAGMENTS
|
static java.lang.String |
FUNCTION_URL
|
static java.lang.String |
FUNCTION_URLS
|
static Parameter[] |
ISSUBFRAGMENT_PARAMETERS
|
static Parameter[] |
NUDEURL_PARAMETERS
|
static Parameter[] |
PARENTS_PARAMETERS
|
static Parameter[] |
ROOT_PARAMETERS
|
static Parameter[] |
SUBFRAGMENT_SPARAMETERS
|
static Parameter[] |
URL_PARAMETERS
|
static Parameter[] |
URLS_PARAMETERS
|
| 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 | |
MediaFragments()
|
|
| Method Summary | |
protected boolean |
addParentFragment(java.util.Stack fragments)
Adds a parent fragment to the Stack and returns true, or returns false. |
protected long |
calculateLength(MMObjectNode node)
Calculate the length of a mediafragment |
boolean |
equals(MMObjectNode o1,
MMObjectNode o2)
Implements equals for nodes (this is in MMObjectBuilder because you cannot override MMObjectNode) Stack.contains is used, so make sure equal node are equal. |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
Executes a function on the field of a node, and returns the result. |
protected java.util.List |
getFilteredURLs(MMObjectNode fragment,
java.util.Map info,
java.util.Set cacheExpireObjects)
|
protected java.lang.String |
getFormat(MMObjectNode fragment,
java.util.Map info)
|
java.lang.String |
getGUIIndicator(MMObjectNode node)
Will show the title (clickable if possible) |
java.lang.String |
getGUIIndicator(java.lang.String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
java.lang.Object |
getObjectValue(MMObjectNode node,
java.lang.String field)
Like getValue, but without the 'old' code (short_ html_ etc). |
Parameter[] |
getParameterDefinition(java.lang.String function)
perhaps we need something like this |
java.util.Stack |
getParentFragments(MMObjectNode fragment)
Returns a Stack with all parent fragments. |
MMObjectNode |
getRootFragment(MMObjectNode fragment)
Find the mediafragment of which the given mediafragment is a part. |
java.util.List |
getSources(MMObjectNode fragment)
Get all mediasources belonging to this mediafragment (scope should be protected) |
protected java.lang.String |
getURL(MMObjectNode fragment,
java.util.Map info)
Retrieves the url of the mediasource that matches best. |
protected java.util.List |
getURLs(MMObjectNode fragment,
java.util.Map info,
java.util.List urls,
java.util.Set cacheExpireObjects)
Returns a List of all possible (unfiltered) URLComposer's for this Fragment. |
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
boolean |
isSubFragment(MMObjectNode mediafragment)
If a mediafragment is coupled to another mediafragment instead of being directly coupled to mediasources, the mediafragment is a subfragment. |
void |
removeSources(MMObjectNode fragment)
Removes related media sources. |
java.lang.String |
replace(scanpage sp,
java.util.StringTokenizer command)
Replace all for frontend code Replace commands available are GETURL (gets mediafile url for an objectnumber), |
boolean |
setValue(MMObjectNode node,
java.lang.String fieldname)
Provides additional functionality when setting field values. |
protected static java.util.Map |
translateURLArguments(java.util.List arguments,
java.util.Map info)
Would something like this be feasible to translate a List to a Map? |
| 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_NUDEURL
public static final java.lang.String FUNCTION_PARENTS
public static final java.lang.String FUNCTION_ROOT
public static final java.lang.String FUNCTION_SUBFRAGMENT
public static final java.lang.String FUNCTION_SUBFRAGMENTS
public static final java.lang.String FUNCTION_AVAILABLE
public static final java.lang.String FUNCTION_FORMAT
public static final java.lang.String FUNCTION_DURATION
public static final Parameter[] URLS_PARAMETERS
public static final Parameter[] FILTEREDURLS_PARAMETERS
public static final Parameter[] URL_PARAMETERS
public static final Parameter[] NUDEURL_PARAMETERS
public static final Parameter[] PARENTS_PARAMETERS
public static final Parameter[] ROOT_PARAMETERS
public static final Parameter[] ISSUBFRAGMENT_PARAMETERS
public static final Parameter[] SUBFRAGMENT_SPARAMETERS
public static final Parameter[] AVAILABLE_PARAMETERS
public static final Parameter[] FORMAT_PARAMETERS
public static final Parameter[] DURATION_PARAMETERS
| Constructor Detail |
public MediaFragments()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()
protected static java.util.Map translateURLArguments(java.util.List arguments,
java.util.Map info)
public Parameter[] getParameterDefinition(java.lang.String function)
getParameterDefinition in class MMObjectBuilder
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
MMObjectBuilderMMObjectBuilder.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 long calculateLength(MMObjectNode node)
node - the mediafragment
public java.lang.String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - the mediafragment node
public java.lang.String getGUIIndicator(java.lang.String field,
MMObjectNode node)
MMObjectBuilder
getGUIIndicator in class MMObjectBuildernode - The node to displayfield - the name field of the field to display
String, null if not specified
protected java.util.List getURLs(MMObjectNode fragment,
java.util.Map info,
java.util.List urls,
java.util.Set cacheExpireObjects)
protected java.util.List getFilteredURLs(MMObjectNode fragment,
java.util.Map info,
java.util.Set cacheExpireObjects)
protected java.lang.String getURL(MMObjectNode fragment,
java.util.Map info)
fragment - the media fragmentinfo - extra information (i.e. request, wanted bitrate, preferred format)
protected java.lang.String getFormat(MMObjectNode fragment,
java.util.Map info)
public boolean isSubFragment(MMObjectNode mediafragment)
protected boolean addParentFragment(java.util.Stack fragments)
public java.util.Stack getParentFragments(MMObjectNode fragment)
public MMObjectNode getRootFragment(MMObjectNode fragment)
fragment - sub media fragment
public java.util.List getSources(MMObjectNode fragment)
fragment - the mediafragment
public void removeSources(MMObjectNode fragment)
fragment - The MMObjectNode
public java.lang.String replace(scanpage sp,
java.util.StringTokenizer command)
replace in class MMObjectBuildersp - the scanpagecommand - the stringtokenizer reference with the replace command.
public java.lang.Object getObjectValue(MMObjectNode node,
java.lang.String field)
MMObjectBuilder
getObjectValue in class MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String)
public boolean setValue(MMObjectNode node,
java.lang.String fieldname)
MMObjectBuilder
setValue in class MMObjectBuildernode - the node whose fields are changed
true if the call was handled.
public boolean equals(MMObjectNode o1,
MMObjectNode o2)
equals in class MMObjectBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||