|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.applications.media.urlcomposers.URLComposer
public class URLComposer
URLComposer is a wrapper/container class around an URL. It contains besides the URL some extra meta information about it, like the original source object of the resource it represents and if it is currently available or not. An URL can be unavailable because of two reasons: because the provider is offline, or because the fragment where it belongs to is not valid (e.g. because of publishtimes). It is used by the Media builders to pass around information (mainly as an entry in Lists).
| Field Summary | |
|---|---|
protected Map<String,Object> |
info
|
protected int |
preference
|
protected MMObjectNode |
provider
|
protected MMObjectNode |
source
|
| Constructor Summary | |
|---|---|
URLComposer()
|
|
| Method Summary | |
|---|---|
boolean |
canCompose()
Returns true. |
boolean |
equals(Object o)
|
Codec |
getAcodec()
Audio codec if its field is present, returns 'UNKNOWN' (-1) if no such field or codec is unknown. |
int |
getBitrate()
|
Codec |
getCodec()
|
String |
getDescription(Map<String,Locale> options)
|
Dimension |
getDimension()
|
String |
getFilename()
Returns the 'short' url (typically the filename) for display purposes, just the source field value url. |
int |
getFilesize()
|
Format |
getFormat()
The format of the produced URL. |
String |
getGUIIndicator(Map<String,Locale> options)
|
Map<String,Object> |
getInfo()
|
MimeType |
getMimeType()
The mime-type of the produced URL. |
MMObjectNode |
getProvider()
|
MMObjectNode |
getSource()
|
State |
getState()
|
String |
getURL()
Returns the URL as a String. |
protected StringBuilder |
getURLBuffer()
Extension will normally create URL's differently. |
int |
hashCode()
|
void |
init(MMObjectNode provider,
MMObjectNode source,
MMObjectNode fragment,
Map<String,Object> info,
Set<MMObjectNode> cacheExpireObjects)
|
boolean |
isAvailable()
Wether the URL which will be produced by this composer is actually already useable. |
boolean |
isMain()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MMObjectNode source
protected MMObjectNode provider
protected Map<String,Object> info
protected int preference
| Constructor Detail |
|---|
public URLComposer()
| Method Detail |
|---|
public void init(MMObjectNode provider,
MMObjectNode source,
MMObjectNode fragment,
Map<String,Object> info,
Set<MMObjectNode> cacheExpireObjects)
public MMObjectNode getSource()
public MMObjectNode getProvider()
public Map<String,Object> getInfo()
public Format getFormat()
public Codec getCodec()
public Codec getAcodec()
public int getBitrate()
public MimeType getMimeType()
public String getGUIIndicator(Map<String,Locale> options)
public String getDescription(Map<String,Locale> options)
public Dimension getDimension()
public int getFilesize()
public boolean canCompose()
protected StringBuilder getURLBuffer()
public final String getURL()
public final String getFilename()
public boolean isAvailable()
State.SOURCE), or its a generated source and its generation is done.
public boolean isMain()
public State getState()
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||