001/**
002 * Copyright (C) 2007-2011, Jens Lehmann
003 *
004 * This file is part of DL-Learner.
005 *
006 * DL-Learner is free software; you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation; either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * DL-Learner is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU General Public License for more details.
015 *
016 * You should have received a copy of the GNU General Public License
017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018 */
019
020package org.dllearner.configuration;
021
022import java.util.Collection;
023
024/**
025 * Created by IntelliJ IDEA.
026 * User: Chris
027 * Date: 8/18/11
028 * Time: 9:45 PM
029 * <p/>
030 * This interface represents on complete instance of a DL-Learner Configuration.
031 * <p/>
032 * Once an implementation of this interface is fully instantiated, it can be passed to an ApplicationContextBuilder in order
033 * to instantiate a Spring Application Context.
034 * <p/>
035 * Once the application context has been created, learning algorithms can be extracted and then executed.
036 *
037 * @see org.dllearner.configuration.spring.ApplicationContextBuilder
038 */
039public interface IConfiguration {
040
041    /**
042     * Get a collection of all the bean names defined in the configuration.
043     *
044     * @return a collection of all the bean names defined in the configuration.
045     */
046    Collection<String> getBeanNames();
047
048    /**
049     * Get the class for the given bean.
050     *
051     * @param beanName The name of the bean to get the class for.
052     * @return The class for the given bean.
053     */
054    Class getClass(String beanName);
055
056    /**
057     * Get the Base Directory where this configuration should be running out of.
058     *
059     * @return The Base Directory where this configuration should be running out of.
060     */
061    String getBaseDir();
062
063    /**
064     * Get the configuration properties for the specified bean.
065     *
066     * @param beanName The bean to get properties for.
067     * @return A collection of properties
068     */
069    Collection<IConfigurationProperty> getConfigurationProperties(String beanName);
070}