org.w3c.mwi.mobileok.basic
Class HTTPXHTMLResource

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.HTTPResource
      extended by org.w3c.mwi.mobileok.basic.HTTPTextResource
          extended by org.w3c.mwi.mobileok.basic.HTTPXHTMLResource

public final class HTTPXHTMLResource
extends HTTPTextResource

Represents an XHTML resource retrieved via HTTP (or HTTPS).

The class extends HTTPTextResource to add XHTML markup validation, and the extraction of CSS styles, embedded resources, and other information that needs to be computed to build the intermediate moki representation of the resource.

A tidied version of the resource, created by a Parser is used when the resource is not a valid XHTML one. Tidying the resource may not always be possible.

Version:
$Revision: 1.1 $
Author:
The W3C mobileOK Checker Task Force

Constructor Summary
HTTPXHTMLResource(java.net.URI uri)
           
 
Method Summary
(package private) static int countExtraneousChars(char[] ch, int start, int length)
           
 org.w3c.dom.Document getDOM()
           
 java.util.List<java.lang.String> getEmbeddedCSS()
           
 java.util.List<java.net.URI> getExtractedCSS()
           
 java.util.List<java.net.URI> getExtractedImages()
           
 java.util.List<java.net.URI> getExtractedLinks()
           
 java.util.List<HTTPObjectResource> getExtractedObjects()
           
 int getExtraneousChars()
           
 java.util.Map<java.lang.String,java.lang.Integer> getInlineCSS()
           
 XHTMLValidationStatus getMarkupValid()
           
 java.util.List<ValidationLineAndColumnMessage> getMobileErrorMessageList()
           
 XHTMLValidationStatus getMobileValid()
           
 java.lang.String getPublicDoctype()
           
 int getRootElementLine()
           
 java.lang.String getSystemDoctype()
           
 org.w3c.dom.Document getTidiedDOM()
           
 int getTotalChars()
           
 java.util.List<ValidationLineAndColumnMessage> getXHTMLErrorMessageList()
           
 boolean hasXmlDeclaration()
           
 boolean hasXmlNamespace()
           
 
Methods inherited from class org.w3c.mwi.mobileok.basic.HTTPTextResource
getBody, getUTF8ErrorMessageList, isValidUTF8
 
Methods inherited from class org.w3c.mwi.mobileok.basic.HTTPResource
configureHTTPMethod, executeMethod, getLastRedirect, getRawRequestHeaders, getRawResponseBody, getRawResponseHeaders, getRedirect, getRedirectCount, getRequestHeaders, getResponseHeaders, getResponseProtocol, getResponseReason, getResponseStatus, getStatusCode, getURI, getURI, isValidDateHeader, isValidExpirationDate, massageURI, parseURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPXHTMLResource

public HTTPXHTMLResource(java.net.URI uri)
                  throws java.io.IOException,
                         TestException
Throws:
java.io.IOException
TestException
Method Detail

getDOM

public org.w3c.dom.Document getDOM()

getExtractedCSS

public java.util.List<java.net.URI> getExtractedCSS()

getExtractedImages

public java.util.List<java.net.URI> getExtractedImages()

getExtractedObjects

public java.util.List<HTTPObjectResource> getExtractedObjects()

getExtractedLinks

public java.util.List<java.net.URI> getExtractedLinks()

getTidiedDOM

public org.w3c.dom.Document getTidiedDOM()

getRootElementLine

public int getRootElementLine()

getXHTMLErrorMessageList

public java.util.List<ValidationLineAndColumnMessage> getXHTMLErrorMessageList()

getMobileErrorMessageList

public java.util.List<ValidationLineAndColumnMessage> getMobileErrorMessageList()

getMarkupValid

public XHTMLValidationStatus getMarkupValid()

getMobileValid

public XHTMLValidationStatus getMobileValid()

getEmbeddedCSS

public java.util.List<java.lang.String> getEmbeddedCSS()

getPublicDoctype

public java.lang.String getPublicDoctype()

getSystemDoctype

public java.lang.String getSystemDoctype()

hasXmlDeclaration

public boolean hasXmlDeclaration()

getInlineCSS

public java.util.Map<java.lang.String,java.lang.Integer> getInlineCSS()

getTotalChars

public int getTotalChars()

getExtraneousChars

public int getExtraneousChars()

countExtraneousChars

static int countExtraneousChars(char[] ch,
                                int start,
                                int length)

hasXmlNamespace

public boolean hasXmlNamespace()