|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.mwi.mobileok.basic.DecodedContent org.w3c.mwi.mobileok.basic.NotSupportedContent
public class NotSupportedContent
Class that represents a resource whose content-type is not supported, or whose content-type is not supported within the context of the resource.
An instance of this class must be returned by the DecodedContentFactory
being used when there is no more appropriate decoded content.
For instance, mobileOK only accepts image/gif
and
image/jpeg
for ResourceContext.Image
resources.
An instance of this class will thus be returned whenever an image
with a different content-type is created.
Constructor Summary | |
---|---|
NotSupportedContent(java.net.URI uri,
java.util.List<RetrievalElement> retrieved)
Creates a class instance bound to a URI. |
Method Summary | |
---|---|
boolean |
isValid()
Returns false because not supported content is 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 |
---|
public NotSupportedContent(java.net.URI uri, java.util.List<RetrievalElement> retrieved) throws TestException
uri
- absolute URI of the resource.retrieved
- the retrieved representation of the resource.
TestException
- an unexpected error occurred while retrieving the resource.Method Detail |
---|
public boolean isValid()
false
because not supported content is de facto
not valid.
isValid
in class DecodedContent
true
when the content is valid,
false
otherwise.public org.w3c.dom.Node toMokiNode(org.w3c.dom.Document document, org.w3c.dom.Node parent)
DecodedContent
toMokiNode
in class DecodedContent
document
- DOM document the created node should belong toparent
- DOM node to which the representation should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |