org.pentaho.reporting.libraries.resourceloader.loader

Class URLResourceLoader

public class URLResourceLoader extends Object implements ResourceLoader

Creation-Date: 05.04.2006, 15:32:36

Author: Thomas Morgner

Field Summary
static StringSCHEMA_NAME
Constructor Summary
URLResourceLoader()
Method Summary
ResourceKeycreateKey(Object value, Map factoryKeys)
Creates a new resource key from the given object and the factory keys.
ResourceKeyderiveKey(ResourceKey parent, String path, Map factoryKeys)
Derives a new resource key from the given key.
ResourceKeydeserialize(ResourceKey bundleKey, String stringKey)
Parses the input string and returns a newly created ResourceKey based on the string data
booleanisSupportedDeserializer(String data)
booleanisSupportedKey(ResourceKey key)
Checks, whether this resource loader implementation was responsible for creating this key.
ResourceDataload(ResourceKey key)
Stringserialize(ResourceKey bundleKey, ResourceKey key)
Creates a String version of the resource key that can be used to generate a new ResourceKey object via deserialization
URLtoURL(ResourceKey key)

Field Detail

SCHEMA_NAME

public static final String SCHEMA_NAME

Constructor Detail

URLResourceLoader

public URLResourceLoader()

Method Detail

createKey

public ResourceKey createKey(Object value, Map factoryKeys)
Creates a new resource key from the given object and the factory keys.

Parameters: value factoryKeys

Returns: the created key.

Throws: org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException if creating the key failed.

deriveKey

public ResourceKey deriveKey(ResourceKey parent, String path, Map factoryKeys)
Derives a new resource key from the given key. If neither a path nor new factory-keys are given, the parent key is returned.

Parameters: parent the parent path the derived path (can be null). factoryKeys the optional factory keys (can be null).

Returns: the derived key.

Throws: org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException if the key cannot be derived for any reason.

deserialize

public ResourceKey deserialize(ResourceKey bundleKey, String stringKey)
Parses the input string and returns a newly created ResourceKey based on the string data

isSupportedDeserializer

public boolean isSupportedDeserializer(String data)

isSupportedKey

public boolean isSupportedKey(ResourceKey key)
Checks, whether this resource loader implementation was responsible for creating this key.

Parameters: key

Returns:

load

public ResourceData load(ResourceKey key)

serialize

public String serialize(ResourceKey bundleKey, ResourceKey key)
Creates a String version of the resource key that can be used to generate a new ResourceKey object via deserialization

Parameters: bundleKey key

toURL

public URL toURL(ResourceKey key)