diff options
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java b/reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java index 14a437f4bb57..798f11d18194 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/loader/InputRepositoryResourceData.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - - package com.sun.star.report.pentaho.loader; import java.io.IOException; @@ -42,47 +40,47 @@ import org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourceDat public class InputRepositoryResourceData extends AbstractResourceData { - private final InputRepository inputRepository; - private final ResourceKey key; - private final String resourceIdentifer; - public InputRepositoryResourceData (final ResourceKey key, - final InputRepository repository) - { - this.key = key; - this.inputRepository = repository; - final InputResourceKey rkey = (InputResourceKey) key.getIdentifier(); - final String identifier = rkey.getPath(); - this.resourceIdentifer = identifier.substring("sun:oo://".length()); - } + private final InputRepository inputRepository; + private final ResourceKey key; + private final String resourceIdentifer; - public Object getAttribute (final String key) - { - // we dont support attributes here .. - return null; - } + public InputRepositoryResourceData(final ResourceKey key, + final InputRepository repository) + { + this.key = key; + this.inputRepository = repository; + final InputResourceKey rkey = (InputResourceKey) key.getIdentifier(); + final String identifier = rkey.getPath(); + this.resourceIdentifer = identifier.substring("sun:oo://".length()); + } - public ResourceKey getKey () - { - return key; - } + public Object getAttribute(final String key) + { + // we dont support attributes here .. + return null; + } - public InputStream getResourceAsStream (final ResourceManager caller) - throws ResourceLoadingException - { - try + public ResourceKey getKey() { - return inputRepository.createInputStream(resourceIdentifer); + return key; } - catch (IOException e) + + public InputStream getResourceAsStream(final ResourceManager caller) + throws ResourceLoadingException { - throw new ResourceLoadingException - ("Failed to create input stream for " + resourceIdentifer, e); + try + { + return inputRepository.createInputStream(resourceIdentifer); + } + catch (IOException e) + { + throw new ResourceLoadingException("Failed to create input stream for " + resourceIdentifer, e); + } } - } - public long getVersion (final ResourceManager caller) - { - return inputRepository.getVersion(resourceIdentifer); - } + public long getVersion(final ResourceManager caller) + { + return inputRepository.getVersion(resourceIdentifer); + } } |