// Path: src/com/sebuilder/interpreter/DataSource.java
// public interface DataSource {
// 	public List<Map<String, String>> getData(Map<String, String> config, File relativeTo);
// }


import com.sebuilder.interpreter.DataSource;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/*
 * Copyright 2014 Sauce Labs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sebuilder.interpreter.factory;


/**
 * Factory for data sources.
 * @author zarkonnen
 */
public class DataSourceFactory {
	public static final String DEFAULT_DATA_SOURCE_PACKAGE = "com.sebuilder.interpreter.datasource";
	
	private String customDataSourcePackage = null;

	public String getCustomDataSourcePackage() {
		return customDataSourcePackage;
	}

	/** Package from which the factory preferentially loads in data sources. */
	public void setCustomDataSourcePackage(String customDataSourcePackage) {
		this.customDataSourcePackage = customDataSourcePackage;
	}
	
	/**
	 * Lazily loaded map of data sources.
	 */
// Path: src/com/sebuilder/interpreter/DataSource.java
// public interface DataSource {
// 	public List<Map<String, String>> getData(Map<String, String> config, File relativeTo);
// }


// Path: src/com/sebuilder/interpreter/factory/DataSourceFactory.java
import com.sebuilder.interpreter.DataSource;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/*
 * Copyright 2014 Sauce Labs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sebuilder.interpreter.factory;


/**
 * Factory for data sources.
 * @author zarkonnen
 */
public class DataSourceFactory {
	public static final String DEFAULT_DATA_SOURCE_PACKAGE = "com.sebuilder.interpreter.datasource";
	
	private String customDataSourcePackage = null;

	public String getCustomDataSourcePackage() {
		return customDataSourcePackage;
	}

	/** Package from which the factory preferentially loads in data sources. */
	public void setCustomDataSourcePackage(String customDataSourcePackage) {
		this.customDataSourcePackage = customDataSourcePackage;
	}
	
	/**
	 * Lazily loaded map of data sources.
	 */
	private final HashMap<String, DataSource> sourcesMap = new HashMap<String, DataSource>();