|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceExtractor
Interface that must be implemented by all resource extractors.
The goal of a resource extractor is, given a Resource
and a
list of resources that have already been extracted, to extract new
resources from the given resource.
Although there is no restriction whatsoever to the type of extraction that may occur, the spirit of this is more to define one extractor per type of resources to extract, i.e. one for style sheets, one for links, one for images, one for objects. This, in turn, means the same resource will be parsed multiple times, but the net benefit in terms of flexibility should outweigh the cost in terms of performance.
The class does not need to be thread-safe, but the same instance will
be used (through a call to extractResources(Resource, List)
) to
extract resources from different resources.
Method Summary | |
---|---|
java.util.List<Resource> |
extractResources(Resource resource,
java.util.List<Resource> knownResources)
Extracts additional resources from the given one. |
Method Detail |
---|
java.util.List<Resource> extractResources(Resource resource, java.util.List<Resource> knownResources)
The extracted resources may contain resources that have already been previously extracted, but known resources should not be automatically copied to the returned list.
resource
- resource to parse.knownResources
- list of known resources.
null
when no resources were extracted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |