// Path: kbox.apple/src/main/java/org/aksw/kbox/apple/AppInstall.java
// public interface AppInstall {
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the URL of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL resource, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resources the URL to the resources that are going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL[] resource, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the URL of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL resource, URL dest, String format, String version, InputStreamFactory factory) throws Exception;
// 	
// 	
// 	/**
// 	 * Install the given resources in a given URL.
// 	 * 
// 	 * @param resources the URL of the resources that are going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL[] resources, URL dest, String format, String version, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void install(URL resource, File dest, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void install(URL[] resource, File dest, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void validate(URL url, String format, String version) throws Exception;
// 	
// 	public void register(URL url, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the InputStream of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(InputStream source, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param sources the InputStreams of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(InputStream sources[], URL dest, String format, String version) throws Exception;
// 	
// 	public void install(InputStream source, File target) throws Exception;
// 	
// 	public void install(InputStream[] sources, File target) throws Exception;
// }
// 
// Path: kbox.apple/src/main/java/org/aksw/kbox/apple/ResourceAppInstall.java
// public class ResourceAppInstall extends AbstractAppInstall {	
// 	@Override
// 	public void install(InputStream source, File target) throws Exception {
// 		StreamUtils.stream(source, target);
// 	}
// }


import java.util.HashMap;
import java.util.Map;
import org.aksw.kbox.apple.AppInstall;
import org.aksw.kbox.apple.ResourceAppInstall;
package org.aksw.kbox.kns;



public class InstallFactory {

	private Map<String, AppInstall> methods = new HashMap<String, AppInstall>();

// Path: kbox.apple/src/main/java/org/aksw/kbox/apple/AppInstall.java
// public interface AppInstall {
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the URL of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL resource, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resources the URL to the resources that are going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL[] resource, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the URL of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL resource, URL dest, String format, String version, InputStreamFactory factory) throws Exception;
// 	
// 	
// 	/**
// 	 * Install the given resources in a given URL.
// 	 * 
// 	 * @param resources the URL of the resources that are going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(URL[] resources, URL dest, String format, String version, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void install(URL resource, File dest, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void install(URL[] resource, File dest, InputStreamFactory isFactory) throws Exception;
// 	
// 	public void validate(URL url, String format, String version) throws Exception;
// 	
// 	public void register(URL url, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param resource the InputStream of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(InputStream source, URL dest, String format, String version) throws Exception;
// 	
// 	/**
// 	 * Install a given resource in a given URL.
// 	 * 
// 	 * @param sources the InputStreams of the resource that is going to be published.
// 	 * @param dest the URL where the resource is going to be published.
// 	 * @param format the format.
// 	 * @param version the version.
// 	 * 
// 	 * @throws Exception
// 	 */
// 	public void install(InputStream sources[], URL dest, String format, String version) throws Exception;
// 	
// 	public void install(InputStream source, File target) throws Exception;
// 	
// 	public void install(InputStream[] sources, File target) throws Exception;
// }
// 
// Path: kbox.apple/src/main/java/org/aksw/kbox/apple/ResourceAppInstall.java
// public class ResourceAppInstall extends AbstractAppInstall {	
// 	@Override
// 	public void install(InputStream source, File target) throws Exception {
// 		StreamUtils.stream(source, target);
// 	}
// }


// Path: kbox.kns/src/main/java/org/aksw/kbox/kns/InstallFactory.java
import java.util.HashMap;
import java.util.Map;
import org.aksw.kbox.apple.AppInstall;
import org.aksw.kbox.apple.ResourceAppInstall;

package org.aksw.kbox.kns;



public class InstallFactory {

	private Map<String, AppInstall> methods = new HashMap<String, AppInstall>();

	public AppInstall get(KN kn) {