org.w3c.mwi.mobileok.basic
Class RetrievalFailedContent

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.DecodedContent
      extended by org.w3c.mwi.mobileok.basic.RetrievalFailedContent

public class RetrievalFailedContent
extends DecodedContent

Class that represents a resource that could not be retrieved because some of some network error.

An instance of this class must be returned by the DecodedContentFactory being used when the resource could not be retrieved.

Version:
$Revision: 1.1 $
Author:
Francois Daoust

Constructor Summary
RetrievalFailedContent(java.net.URI uri, java.util.List<RetrievalElement> retrieved)
          Creates a class instance bound to a URI.
 
Method Summary
 boolean isValid()
          Returns false because resources that cannot be retrieved are de facto not valid.
 org.w3c.dom.Node toMokiNode(org.w3c.dom.Document document, org.w3c.dom.Node parent)
          Serializes the content to its moki representation as a DOM node.
 
Methods inherited from class org.w3c.mwi.mobileok.basic.DecodedContent
addByteErrorMessages, addLineAndColumnMessages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrievalFailedContent

public RetrievalFailedContent(java.net.URI uri,
                              java.util.List<RetrievalElement> retrieved)
                       throws TestException
Creates a class instance bound to a URI.

Parameters:
uri - absolute URI of the resource.
retrieved - the retrieved representation of the resource.
Throws:
TestException - an unexpected error occurred while retrieving the resource.
Method Detail

isValid

public boolean isValid()
Returns false because resources that cannot be retrieved are de facto not valid.

Specified by:
isValid in class DecodedContent
Returns:
true when the content is valid, false otherwise.

toMokiNode

public org.w3c.dom.Node toMokiNode(org.w3c.dom.Document document,
                                   org.w3c.dom.Node parent)
Description copied from class: DecodedContent
Serializes the content to its moki representation as a DOM node.

Specified by:
toMokiNode in class DecodedContent
Parameters:
document - DOM document the created node should belong to
parent - DOM node to which the representation should be appended.
Returns:
the moki representation of the resource as a DOM node.