|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.manager.RepositoryManager
public abstract class RepositoryManager
A manager for Repositorys. Every RepositoryManager has
one SYSTEM repository and zero or more "user repositories". The SYSTEM
repository contains data that describes the configuration of the other
repositories (their IDs, which implementations of the Repository API to use,
access rights, etc.). The other repositories are instantiated based on this
configuration data.
| Field Summary | |
|---|---|
protected Logger |
logger
|
| Constructor Summary | |
|---|---|
RepositoryManager()
Creates a new RepositoryManager that operates on the specfified base directory. |
|
| Method Summary | |
|---|---|
void |
addRepositoryConfig(RepositoryConfig config)
Adds or updates the configuration of a repository to the manager's system repository. |
protected abstract void |
cleanUpRepository(String repositoryID)
Clean up a removed repository. |
protected abstract Repository |
createRepository(String id)
Creates and initializes the repository with the specified ID. |
protected abstract Repository |
createSystemRepository()
|
Collection<Repository> |
getAllRepositories()
Returns all configured repositories. |
Collection<RepositoryInfo> |
getAllRepositoryInfos()
|
abstract Collection<RepositoryInfo> |
getAllRepositoryInfos(boolean skipSystemRepo)
|
Collection<RepositoryInfo> |
getAllUserRepositoryInfos()
|
Collection<Repository> |
getInitializedRepositories()
Returns all inititalized repositories. |
Repository |
getRepository(String id)
Gets the repository that is known by the specified ID from this manager. |
RepositoryConfig |
getRepositoryConfig(String repositoryID)
|
Set<String> |
getRepositoryIDs()
|
abstract RepositoryInfo |
getRepositoryInfo(String id)
Gets the repository that is known by the specified ID from this manager. |
Repository |
getSystemRepository()
Gets the SYSTEM repository. |
boolean |
hasRepositoryConfig(String repositoryID)
|
void |
initialize()
Initializes the repository manager. |
void |
refresh()
Shuts down all initialized user repositories. |
boolean |
removeRepositoryConfig(String repositoryID)
Removes the configuration for the specified repository from the manager's system repository if such a configuration is present. |
void |
shutDown()
Shuts down all initialized repositories, including the SYSTEM repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Logger logger
| Constructor Detail |
|---|
public RepositoryManager()
baseDir - The base directory where data for repositories can be stored, among
other things.| Method Detail |
|---|
public void initialize()
throws RepositoryException
RepositoryException - If the manager failed to initialize the SYSTEM repository.
protected abstract Repository createSystemRepository()
throws RepositoryException
RepositoryExceptionpublic Repository getSystemRepository()
public Set<String> getRepositoryIDs()
throws RepositoryException
RepositoryException
public boolean hasRepositoryConfig(String repositoryID)
throws RepositoryException,
RepositoryConfigException
RepositoryException
RepositoryConfigException
public RepositoryConfig getRepositoryConfig(String repositoryID)
throws RepositoryConfigException,
RepositoryException
RepositoryConfigException
RepositoryException
public void addRepositoryConfig(RepositoryConfig config)
throws RepositoryException,
RepositoryConfigException
config - The repository configuration that should be added to or updated in
the system repository.
RepositoryException - If the manager failed to update it's system repository.
RepositoryConfigException - If the manager doesn't know how to update a configuration due to
inconsistent configuration data in the system repository. For
example, this happens when there are multiple existing
configurations with the concerning ID.
public boolean removeRepositoryConfig(String repositoryID)
throws RepositoryException,
RepositoryConfigException
repositoryID - The ID of the repository whose configuration needs to be removed.
RepositoryException - If the manager failed to update it's system repository.
RepositoryConfigException - If the manager doesn't know how to remove a configuration due to
inconsistent configuration data in the system repository. For
example, this happens when there are multiple existing
configurations with the concerning ID.
public Repository getRepository(String id)
throws RepositoryConfigException,
RepositoryException
id - A repository ID.
RepositoryConfigException - If no repository could be created due to invalid or incomplete
configuration data.
RepositoryExceptionpublic Collection<Repository> getInitializedRepositories()
getAllRepositories()
public Collection<Repository> getAllRepositories()
throws RepositoryConfigException,
RepositoryException
RepositoryConfigException
RepositoryExceptiongetInitializedRepositories()
protected abstract Repository createRepository(String id)
throws RepositoryConfigException,
RepositoryException
id - A repository ID.
RepositoryConfigException - If no repository could be created due to invalid or incomplete
configuration data.
RepositoryException
public abstract RepositoryInfo getRepositoryInfo(String id)
throws RepositoryException
id - A repository ID.
RepositoryException - When not able to retrieve existing configurations
public Collection<RepositoryInfo> getAllRepositoryInfos()
throws RepositoryException
RepositoryException
public Collection<RepositoryInfo> getAllUserRepositoryInfos()
throws RepositoryException
RepositoryException
public abstract Collection<RepositoryInfo> getAllRepositoryInfos(boolean skipSystemRepo)
throws RepositoryException
skipSystemRepo -
RepositoryException - When not able to retrieve existing configurationspublic void refresh()
shutDown()public void shutDown()
refresh()
protected abstract void cleanUpRepository(String repositoryID)
throws IOException
repositoryID - the ID of the repository to clean up
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||