org.mmbase.applications.media.urlcomposers
Class URLComposer

java.lang.Object
  extended byorg.mmbase.applications.media.urlcomposers.URLComposer
Direct Known Subclasses:
FragmentURLComposer, SimpleWmURLComposer, WmSbURLComposer

public class URLComposer
extends Object

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 entry in Lists)

Author:
Michiel Meeuwissen, Rob Vermeulen (VPRO)

Field Summary
protected  Map info
           
protected  MMObjectNode provider
           
protected  MMObjectNode source
           
 
Constructor Summary
URLComposer()
           
 
Method Summary
 boolean canCompose()
          Returns true.
 boolean equals(Object o)
           
 String getDescription(Map options)
           
 Format getFormat()
          The format of the produced URL.
 String getGUIIndicator(Map options)
           
 Map getInfo()
           
 String getMimeType()
          The mime-type of the produced URL.
 MMObjectNode getProvider()
           
 MMObjectNode getSource()
           
 String getURL()
          Returns the URL as a String.
protected  StringBuffer getURLBuffer()
          Extension will normally create URL's differently.
 int hashCode()
           
 void init(MMObjectNode provider, MMObjectNode source, MMObjectNode fragment, Map info, Set cacheExpireObjects)
           
 boolean isAvailable()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected MMObjectNode source

provider

protected MMObjectNode provider

info

protected Map info
Constructor Detail

URLComposer

public URLComposer()
Method Detail

init

public void init(MMObjectNode provider,
                 MMObjectNode source,
                 MMObjectNode fragment,
                 Map info,
                 Set cacheExpireObjects)

getSource

public MMObjectNode getSource()

getProvider

public MMObjectNode getProvider()

getInfo

public Map getInfo()

getFormat

public Format getFormat()
The format of the produced URL. This is not necessarily the format of the source. (Though it normally would be)


getMimeType

public String getMimeType()
The mime-type of the produced URL. This is not necessarily the mimetype of the source. (Though it normally would be)


getGUIIndicator

public String getGUIIndicator(Map options)

getDescription

public String getDescription(Map options)

canCompose

public boolean canCompose()
Returns true. This can be overridden if the URLComposer not always can do it's job. It then returns false if it is (can be?) taken from consideration.


getURLBuffer

protected StringBuffer getURLBuffer()
Extension will normally create URL's differently. They override this function.


getURL

public final String getURL()
Returns the URL as a String. To encourage efficient coding, this method is final. Override getURLBuffer instead.


isAvailable

public boolean isAvailable()

toString

public String toString()

equals

public boolean equals(Object o)
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()


MMBase build 1.8.1.20060716