|
|||||||||
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.ImageContent
public abstract class ImageContent
Abstract class that represents an image resource with a defined width and height.
The class extends Resource
to add information about the image: format
validation, image width, image height, and use of transparency. The class is more
defined as an interface than as a real Resource implementation.
Constructor Summary | |
---|---|
ImageContent(java.net.URI uri,
java.util.List<RetrievalElement> retrieved)
Creates a class instance bound to a URI. |
Method Summary | |
---|---|
abstract java.util.List<ValidationByteMessage> |
getImageErrorMessageList()
Returns the list of image format validation error messages. |
abstract int |
getImageHeight()
Returns the height of the image. |
abstract java.lang.String |
getImageType()
Returns the image content-type. |
abstract int |
getImageWidth()
Returns the width of the image. |
abstract boolean |
hasTransparency()
Returns true when the image uses transparency. |
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, isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageContent(java.net.URI uri, java.util.List<RetrievalElement> retrieved) throws TestException
The content is validated while it is instantiated.
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 abstract java.util.List<ValidationByteMessage> getImageErrorMessageList()
public abstract java.lang.String getImageType()
public abstract int getImageHeight()
public abstract int getImageWidth()
public abstract boolean hasTransparency()
true
when the image uses transparency.
Support for transparency may depend on the image format.
A false
may thus also mean that transparency simply cannot
be used.
true
when the image uses transparency,
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 |