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.sail.config;
07:
08: import org.openrdf.sail.Sail;
09:
10: /**
11: * A SailFactory takes care of creating and initializing a specific type of
12: * {@link Sail}s based on RDF configuration data. SailFactory's are used by the
13: * {@link org.openrdf.repository.sail.SailRepositoryFactory} to create specific
14: * Sails and to initialize them based on the configuration data that iis
15: * supplied to it, for example in a server environment.
16: *
17: * @author Arjohn Kampman
18: */
19: public interface SailFactory {
20:
21: /**
22: * Returns the type of the Sails that this factory creates. Sail types are
23: * used for identification and should uniquely identify specific
24: * implementations of the Sail API. This type <em>can</em> be equal to the
25: * fully qualified class name of the Sail, but this is not required.
26: */
27: public String getSailType();
28:
29: public SailImplConfig getConfig();
30:
31: /**
32: * Returns a Sail instance that has been initialized using the supplied
33: * configuration data.
34: * @param config TODO
35: *
36: * @return The created (but un-initialized) Sail.
37: * @throws SailConfigException
38: * If no Sail could be created due to invalid or incomplete
39: * configuration data.
40: */
41: public Sail getSail(SailImplConfig config)
42: throws SailConfigException;
43: }
|