org.w3c.mwi.mobileok.basic
Class HTTPCSSResource

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.HTTPCSSResource
All Implemented Interfaces:
CSSResource

public final class HTTPCSSResource
extends HTTPTextResource
implements CSSResource

Represents CSS styles defined in an external resource retrieved using HTTP.

The list of external CSS stylesheets that appear in the XHTML resource under test is built by the Preprocessor to compute the intermediate moki representation of the resource.

HTTPCSSResource implements the CSSResource interface and extends the HTTPTextResource class to add extraction of embedded CSS styles and CSS validation.

Version:
$Revision: 1.1 $
Author:
The W3C mobileOK Checker Task Force
See Also:
InlineCSSResource, EmbeddedCSSResource

Constructor Summary
HTTPCSSResource(java.net.URI uri)
           
 
Method Summary
(package private) static int countExtraneousChars(java.lang.String css)
           
 java.lang.String getCSS()
           
 java.util.List<ValidationLineAndColumnMessage> getCSSErrorMessageList()
           
 java.util.List<ValidationLineAndColumnMessage> getCSSWarningMessageList()
           
 java.util.List<java.net.URI> getExtractedCSSImageResources()
           
 java.util.List<java.net.URI> getExtractedCSSResources()
           
 int getExtraneousChars()
           
 java.lang.String getProcessedCSS()
           
 int getTotalChars()
           
 boolean isValid()
           
 
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
 
Methods inherited from interface org.w3c.mwi.mobileok.basic.CSSResource
getURI
 

Constructor Detail

HTTPCSSResource

HTTPCSSResource(java.net.URI uri)
          throws TestException
Throws:
TestException
Method Detail

isValid

public boolean isValid()
Specified by:
isValid in interface CSSResource

getCSSErrorMessageList

public java.util.List<ValidationLineAndColumnMessage> getCSSErrorMessageList()
Specified by:
getCSSErrorMessageList in interface CSSResource

getCSSWarningMessageList

public java.util.List<ValidationLineAndColumnMessage> getCSSWarningMessageList()
Specified by:
getCSSWarningMessageList in interface CSSResource

getCSS

public java.lang.String getCSS()
Specified by:
getCSS in interface CSSResource

getProcessedCSS

public java.lang.String getProcessedCSS()
Specified by:
getProcessedCSS in interface CSSResource

getExtractedCSSResources

public java.util.List<java.net.URI> getExtractedCSSResources()
Specified by:
getExtractedCSSResources in interface CSSResource

getExtractedCSSImageResources

public java.util.List<java.net.URI> getExtractedCSSImageResources()
Specified by:
getExtractedCSSImageResources in interface CSSResource

getTotalChars

public int getTotalChars()
Specified by:
getTotalChars in interface CSSResource

getExtraneousChars

public int getExtraneousChars()
Specified by:
getExtraneousChars in interface CSSResource

countExtraneousChars

static int countExtraneousChars(java.lang.String css)