org.w3c.mwi.mobileok.basic
Class InCssResourceExtractor

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.InCssResourceExtractor
All Implemented Interfaces:
ResourceExtractor

public class InCssResourceExtractor
extends java.lang.Object
implements ResourceExtractor

Extracts resources (images and imported CSS stylesheets) defined in the given CSS stylesheets.

The extracted is restricted to CSS styles that apply to the handheld and all media types.

URIs whose scheme is not supported are ignored. As far as mobileOK is concerned, this means that URIs must use the scheme HTTP or HTTPS, but note the code actually relies on the list of ResourceRetriever defined in TesterConfiguration.

Version:
$Revision: 1.1 $
Author:
Francois Daoust

Constructor Summary
InCssResourceExtractor()
          Default constructor.
 
Method Summary
 java.util.List<Resource> extractResources(Resource resource, java.util.List<Resource> knownResources)
          Extracts additional resources from the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InCssResourceExtractor

public InCssResourceExtractor()
Default constructor.

Method Detail

extractResources

public java.util.List<Resource> extractResources(Resource resource,
                                                 java.util.List<Resource> knownResources)
Description copied from interface: ResourceExtractor
Extracts additional resources from the given one.

The extracted resources may contain resources that have already been previously extracted, but known resources should not be automatically copied to the returned list.

Specified by:
extractResources in interface ResourceExtractor
Parameters:
resource - resource to parse.
knownResources - list of known resources.
Returns:
list of resources extracted from the resource to parse, null when no resources were extracted.