|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.blackledge.david.tivo.hmoclient.Item
public class Item
Superclass of all Items in HMO listing.
Field Summary | |
---|---|
protected Link |
contentLink
|
protected ContainerRequest |
request
|
Constructor Summary | |
---|---|
protected |
Item(ContainerRequest request)
|
|
Item(ContainerRequest request,
Element node)
|
Method Summary | |
---|---|
Map |
getAllDetails()
|
protected List |
getChildElementsByTagName(Element parentElement,
String name)
Often we want to work with all the subtags of a given name (or just all subtags) - this gets them for us. |
protected Map |
getChildTagMap(Node parent)
Get a mapping of keys to values where the key is the child tag name and the value is the text contained in the tag (which could be null, I think). |
String |
getContentType()
|
URL |
getContentURL()
Shortcut for getLinks() , look up "Content" link, call
Link.getURL() . |
String |
getCopyright()
|
Date |
getCreated()
|
String |
getCreationDate()
|
URL |
getCustomIcon()
Get the URL to the custom icon link for this item |
static Date |
getDate(String encodedDate)
|
String |
getLastAccessDate()
|
Date |
getLastAccessed()
|
Date |
getLastChanged()
|
String |
getLastChangeDate()
|
List |
getLinks()
|
protected long |
getLong(Node numericNode)
Interpret the node's child value as an long integer. |
protected String |
getNodeValue(Node element)
Typically we want the text value contained within a tag... |
protected Element |
getSingleChildElementByTagName(Element parentElement,
String name)
Often we know we want one subtag and it won't appear more than once, this gets it for us. |
String |
getSourceFormat()
|
String |
getSourceLocation()
|
long |
getSourceSize()
|
String |
getTitle()
|
protected void |
initDetails(Element description)
Basic Item details: <Title>{text}</Title> <ContentType>{mime-type}</ContentType> <SourceFormat>{mime-type}</SourceFormat> Optional details: <CreationDate>{date}</CreationDate> <LastChangeDate>{date}</LastChangeDate> <LastAccessDate>{date}</LastAccessDate> <SourceLocation>{text}</SourceLocation> <SourceSize>{bytes}</SourceSize> <Copyright>{text}</Copyright> |
boolean |
isContainer()
Is this item a container? Some methods only work for Containers, some only work for non-containers. |
ContainerRequest |
newContainerRequest()
|
ContainerRequest |
newContainerRequest(boolean copyCurrentSettings)
|
protected Node |
singleNode(NodeList elementsByTagName)
Get the only node of the length=1 NodeList. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ContainerRequest request
protected Link contentLink
Constructor Detail |
---|
protected Item(ContainerRequest request)
public Item(ContainerRequest request, Element node)
Method Detail |
---|
public URL getCustomIcon()
public static Date getDate(String encodedDate)
public List getLinks()
Link
instances.public URL getContentURL()
getLinks()
, look up "Content" link, call
Link.getURL()
. Often that's the only link, anyhow.
public boolean isContainer()
newContainerRequest()
, but can't return information about links (
getContentURL()
, getLinks()
).
public ContainerRequest newContainerRequest()
UnsupportedOperationException
- if this is not a Container
item. See isContainer()
public ContainerRequest newContainerRequest(boolean copyCurrentSettings)
protected String getNodeValue(Node element)
element
-
protected Element getSingleChildElementByTagName(Element parentElement, String name)
parentElement
- name
- may not be null.
protected List getChildElementsByTagName(Element parentElement, String name)
parentElement
- name
- - null means accept all tag names into the list.
protected long getLong(Node numericNode)
numericNode
-
NumberFormatException
- if there is a problem including a null node.protected Node singleNode(NodeList elementsByTagName)
elementsByTagName
-
IllegalArgumentException
- if length is not 1.protected void initDetails(Element description)
description
- public Map getAllDetails()
protected Map getChildTagMap(Node parent)
parent
-
public String getTitle()
public String getSourceFormat()
public String getContentType()
public String getCopyright()
public String getCreationDate()
public Date getCreated()
public String getLastAccessDate()
public Date getLastAccessed()
public String getLastChangeDate()
public Date getLastChanged()
public String getSourceLocation()
public long getSourceSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |