01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.repository.config;
07:
08: import org.openrdf.repository.Repository;
09:
10: /**
11: * A RepositoryFactory takes care of creating and initializing a specific type
12: * of {@link Repository}s based on RDF configuration data. RepositoryFactory's
13: * are used by the {@link RepositoryManager} to create specific repositories and
14: * to initialize them based on the configuration data that it manages, for
15: * example in a server environment.
16: *
17: * @author Arjohn Kampman
18: */
19: public interface RepositoryFactory {
20:
21: /**
22: * Returns the type of the repositories that this factory creates. Repository
23: * types are used for identification and should uniquely identify specific
24: * implementations of the Repository API. This type <em>can</em> be equal
25: * to the fully qualified class name of the repository, but this is not
26: * required.
27: */
28: public String getRepositoryType();
29:
30: public RepositoryImplConfig getConfig();
31:
32: /**
33: * Returns a Repository instance that has been initialized using the supplied
34: * configuration data.
35: * @param config TODO
36: *
37: * @return The created (but un-initialized) repository.
38: * @throws RepositoryConfigException
39: * If no repository could be created due to invalid or incomplete
40: * configuration data.
41: */
42: public Repository getRepository(RepositoryImplConfig config)
43: throws RepositoryConfigException;
44: }
|