Package nz.org.riskscape.engine.resource
Interface ResourceLoader
public interface ResourceLoader
An object able to load certain kinds of Resource
s.
-
Method Summary
-
Method Details
-
getId
String getId() -
getDescription
String getDescription() -
canLoad
Tests if this
ResourceLoader
is able to load the target resource.- Parameters:
target
- URI of resource to load- Returns:
- true if loader can load target
-
load
Get a
Resource
representing the target resource.This operation is not expected to be expensive. For example fetching remote of remote resources should be deferred until
Resource#getResourceStream()
is called.If possible there should be tests to confirm that remote resources do exist and can be accessed.
- Parameters:
target
- URI of resource to load- Returns:
- resource
- Throws:
ResourceLoadingException
-