package org.jerrymouse.cc;

import java.io.OutputStream;

import org.jerrymouse.cc.download.ConvertConfig;
import org.jerrymouse.cc.download.ConvertTool;
import org.jerrymouse.cc.download.ConvertToolFactory;
import org.jerrymouse.cc.file.File;
import org.jerrymouse.cc.view.ViewConfig;
import org.jerrymouse.cc.view.ViewResult;

public class Resource {
	private String name;
	private ResourceType type;
	private File originalFile;

	public OutputStream convert(ConvertConfig convertConfig) {
		ConvertTool convertTool = ConvertToolFactory.getConvertTool(
				convertConfig, type);
		return convertTool.download(originalFile);
	}

	public ViewResult view(ViewConfig viewConfig) {
		return null;
	}

	public String getName() {
		return name;
	}
}
