org.pentaho.reporting.libraries.resourceloader.loader.file

Class FileResourceLoader

public class FileResourceLoader extends Object implements ResourceLoader

Creation-Date: 05.04.2006, 14:17:56

Author: Thomas Morgner

Field Summary
static StringSCHEMA_NAME
Constructor Summary
FileResourceLoader()
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)
Generates a String representation of the ResourceKey specified.
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)
Generates a String representation of the ResourceKey specified.
URLtoURL(ResourceKey key)

Field Detail

SCHEMA_NAME

public static final String SCHEMA_NAME

Constructor Detail

FileResourceLoader

public FileResourceLoader()

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)
Generates a String representation of the ResourceKey specified. TODO: implement

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)
Generates a String representation of the ResourceKey specified. TODO: implement

Parameters: bundleKey key

toURL

public URL toURL(ResourceKey key)