// Path: kbox.core/src/main/java/org/aksw/kbox/utils/ArrayUtils.java
// public class ArrayUtils {
// 	
// 	/**
// 	 * This class receive an <T> array and invert it.
// 	 * 
// 	 * @param array an <T> array.
// 	 */
// 	public static <T> void reverse(T[] array) {
// 		for(int i = 0; i < array.length / 2; i++) {
// 		    T temp = array[i];
// 		    array[i] = array[array.length - i - 1];
// 		    array[array.length - i - 1] = temp;
// 		}
// 	}
// }
// 
// Path: kbox.core/src/main/java/org/aksw/kbox/utils/ObjectUtils.java
// public class ObjectUtils extends AssertionUtils {
// 	
// 	public static <T> T getValue(T value, T defaultValue) {
// 		if(value == null) {
// 			return defaultValue;
// 		}
// 		return value;
// 	}
// 
// }


import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.InvalidPathException;
import org.aksw.kbox.utils.ArrayUtils;
import org.aksw.kbox.utils.ObjectUtils;
import org.apache.log4j.Logger;
			logger.error("Error initializing KBox.", e);
		}
	}

	protected static void init() throws Exception {
		File kBoxDir = new File(KBOX_DIR);
		if (!kBoxDir.exists()) {
			kBoxDir.mkdir();
			setResourceFolder(KBOX_DIR);
		}
	}

	private static CustomParams getParams() {
		CustomParams params = new CustomParams(KBOX_DIR + File.separator
				+ KBOX_CONFIG_FILE, KBOX_CONFIG_CONTEXT);
		return params;
	}

	/**
	 * Converts an URL to a local path.
	 * 
	 * @param url an URL.
	 */
	public static String urlToPath(URL url) {
		String urlPath = url.getPath();
		String host = url.getHost();
		String protocol = url.getProtocol();
		int port = url.getPort();
		String[] pathDirs = urlPath.split("/");
		String[] hostDirs = host.split("\\.");
// Path: kbox.core/src/main/java/org/aksw/kbox/utils/ArrayUtils.java
// public class ArrayUtils {
// 	
// 	/**
// 	 * This class receive an <T> array and invert it.
// 	 * 
// 	 * @param array an <T> array.
// 	 */
// 	public static <T> void reverse(T[] array) {
// 		for(int i = 0; i < array.length / 2; i++) {
// 		    T temp = array[i];
// 		    array[i] = array[array.length - i - 1];
// 		    array[array.length - i - 1] = temp;
// 		}
// 	}
// }
// 
// Path: kbox.core/src/main/java/org/aksw/kbox/utils/ObjectUtils.java
// public class ObjectUtils extends AssertionUtils {
// 	
// 	public static <T> T getValue(T value, T defaultValue) {
// 		if(value == null) {
// 			return defaultValue;
// 		}
// 		return value;
// 	}
// 
// }


// Path: kbox.core/src/main/java/org/aksw/kbox/KBox.java
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.InvalidPathException;
import org.aksw.kbox.utils.ArrayUtils;
import org.aksw.kbox.utils.ObjectUtils;
import org.apache.log4j.Logger;

			logger.error("Error initializing KBox.", e);
		}
	}

	protected static void init() throws Exception {
		File kBoxDir = new File(KBOX_DIR);
		if (!kBoxDir.exists()) {
			kBoxDir.mkdir();
			setResourceFolder(KBOX_DIR);
		}
	}

	private static CustomParams getParams() {
		CustomParams params = new CustomParams(KBOX_DIR + File.separator
				+ KBOX_CONFIG_FILE, KBOX_CONFIG_CONTEXT);
		return params;
	}

	/**
	 * Converts an URL to a local path.
	 * 
	 * @param url an URL.
	 */
	public static String urlToPath(URL url) {
		String urlPath = url.getPath();
		String host = url.getHost();
		String protocol = url.getProtocol();
		int port = url.getPort();
		String[] pathDirs = urlPath.split("/");
		String[] hostDirs = host.split("\\.");
		ArrayUtils.reverse(hostDirs);