com.blackledge.david.tivo.hmoclient
Class Container

java.lang.Object
  extended by com.blackledge.david.tivo.hmoclient.Item
      extended by com.blackledge.david.tivo.hmoclient.ContainerItem
          extended by com.blackledge.david.tivo.hmoclient.Container

public class Container
extends ContainerItem

an HMO Container representation which contains meta information and a list of items that may be Containers or Audio or Video or Image information.

Version:
$Revision: 1.2 $

Field Summary
 
Fields inherited from class com.blackledge.david.tivo.hmoclient.Item
contentLink, request
 
Constructor Summary
Container(ContainerRequest request, URL queryUrl)
           
 
Method Summary
 long getFirstItemIndex()
          "This element indicates the position within the entire container (as a zero-based index) of the actual item represented by the first TiVoContainer.Item appearing within the meta-data."
 List getItems()
          Get the list of Items in this container.
 long getLastItemIndex()
           
 Throwable getLoadError()
          If this is not null, there was a problem loading the containerRequest and this container is not initialized.
 long getSize()
          "This element indicates the number of items described in the meta-data."
 long getTotalDuration()
          "TotalDuration provides the combined durations of all audio items in the container.
protected  void initDetails(Element description)
          for a queried container: {text} {mime-type} {mime-type} {count}
 boolean isSourceChanged()
          "This element indicates whether any aspect of the container has changed since the last query."
 Container nextPage()
           
 Container requestItems(long startOffset, long numItems)
           
 Container requestItems(long startOffset, long numItems, Item startItem)
           
 
Methods inherited from class com.blackledge.david.tivo.hmoclient.ContainerItem
getTotalItems, getTotalSize, isContainer
 
Methods inherited from class com.blackledge.david.tivo.hmoclient.Item
getAllDetails, getChildElementsByTagName, getChildTagMap, getContentType, getContentURL, getCopyright, getCreated, getCreationDate, getCustomIcon, getDate, getLastAccessDate, getLastAccessed, getLastChanged, getLastChangeDate, getLinks, getLong, getNodeValue, getSingleChildElementByTagName, getSourceFormat, getSourceLocation, getSourceSize, getTitle, newContainerRequest, newContainerRequest, singleNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Container

public Container(ContainerRequest request,
                 URL queryUrl)
Method Detail

getLoadError

public Throwable getLoadError()
If this is not null, there was a problem loading the containerRequest and this container is not initialized.

Returns:
any throwable that was caught during instantiation.

initDetails

protected void initDetails(Element description)
for a queried container: {text} {mime-type} {mime-type} {count}

Overrides:
initDetails in class ContainerItem
Parameters:
elementsByTagName -

requestItems

public Container requestItems(long startOffset,
                              long numItems)

requestItems

public Container requestItems(long startOffset,
                              long numItems,
                              Item startItem)

nextPage

public Container nextPage()

getLastItemIndex

public long getLastItemIndex()

getFirstItemIndex

public long getFirstItemIndex()
"This element indicates the position within the entire container (as a zero-based index) of the actual item represented by the first TiVoContainer.Item appearing within the meta-data."


getItems

public List getItems()
Get the list of Items in this container.

Returns:
an unmodifiable list of Item instances

getSize

public long getSize()
"This element indicates the number of items described in the meta-data."


getTotalDuration

public long getTotalDuration()
"TotalDuration provides the combined durations of all audio items in the container. This item is optional because, 1) not all containers contain audio items, and 2) the information may not be readily available."

Overrides:
getTotalDuration in class ContainerItem

isSourceChanged

public boolean isSourceChanged()
"This element indicates whether any aspect of the container has changed since the last query."