public class LocalRepositoryManager extends RepositoryManager
RepositoryManager interface that operates directly on the repository data
files in the local file system.| Modifier and Type | Field and Description |
|---|---|
static String |
REPOSITORIES_DIR |
initializedRepositories, logger| Constructor and Description |
|---|
LocalRepositoryManager(File baseDir)
Creates a new RepositoryManager that operates on the specfified base directory.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanUpRepository(String repositoryID)
Clean up a removed repository.
|
protected Repository |
createRepository(String id)
Creates and initializes the repository with the specified ID.
|
protected SystemRepository |
createSystemRepository() |
List<RepositoryInfo> |
getAllRepositoryInfos(boolean skipSystemRepo) |
File |
getBaseDir()
Gets the base dir against which to resolve relative paths.
|
protected org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceResolver |
getFederatedServiceResolver() |
org.apache.http.client.HttpClient |
getHttpClient() |
URL |
getLocation()
Gets the base dir against which to resolve relative paths.
|
File |
getRepositoryDir(String repositoryID) |
RepositoryInfo |
getRepositoryInfo(String id)
Gets the repository that is known by the specified ID from this manager.
|
protected SharedHttpClientSessionManager |
getSesameClient() |
SystemRepository |
getSystemRepository()
Gets the SYSTEM repository.
|
File |
resolvePath(String path)
Resolves the specified path against the manager's base directory.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Should be called before
RepositoryManager.initialize(). |
void |
shutDown()
Shuts down all initialized repositories, including the SYSTEM repository.
|
addRepositoryConfig, getAllRepositories, getAllRepositoryInfos, getAllUserRepositoryInfos, getInitializedRepositories, getInitializedRepositoryIDs, getNewRepositoryID, getRepository, getRepositoryConfig, getRepositoryIDs, hasRepositoryConfig, initialize, isInitialized, isSafeToRemove, refresh, removeRepository, removeRepositoryConfig, setInitializedRepositories, updateInitializedRepositoriespublic static final String REPOSITORIES_DIR
public LocalRepositoryManager(File baseDir)
baseDir - The base directory where data for repositories can be stored, among other things.protected SystemRepository createSystemRepository() throws RepositoryException
createSystemRepository in class RepositoryManagerRepositoryExceptionpublic File getBaseDir()
public URL getLocation() throws MalformedURLException
getLocation in class RepositoryManagerMalformedURLException - If the path cannot be parsed as a URLprotected SharedHttpClientSessionManager getSesameClient()
public org.apache.http.client.HttpClient getHttpClient()
getHttpClient in interface HttpClientDependentgetHttpClient in class RepositoryManagerRepository construction.public void setHttpClient(org.apache.http.client.HttpClient httpClient)
RepositoryManagerRepositoryManager.initialize().setHttpClient in interface HttpClientDependentsetHttpClient in class RepositoryManagerhttpClient - The httpClient to use for remote/service calls.protected org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceResolver getFederatedServiceResolver()
public void shutDown()
RepositoryManagershutDown in class RepositoryManagerRepositoryManager.refresh()public File resolvePath(String path)
getBaseDir()public SystemRepository getSystemRepository()
RepositoryManagergetSystemRepository in class RepositoryManagerprotected Repository createRepository(String id) throws RepositoryConfigException, RepositoryException
RepositoryManagercreateRepository in class RepositoryManagerid - A repository ID.RepositoryConfigException - If no repository could be created due to invalid or incomplete configuration data.RepositoryException - If the repository could not be initialized.public RepositoryInfo getRepositoryInfo(String id) throws RepositoryException
RepositoryManagergetRepositoryInfo in class RepositoryManagerid - A repository ID.RepositoryException - When not able to retrieve existing configurationspublic List<RepositoryInfo> getAllRepositoryInfos(boolean skipSystemRepo) throws RepositoryException
getAllRepositoryInfos in class RepositoryManagerRepositoryException - When not able to retrieve existing configurationsprotected void cleanUpRepository(String repositoryID) throws IOException
RepositoryManagercleanUpRepository in class RepositoryManagerrepositoryID - the ID of the repository to clean upIOExceptionCopyright © 2015-2017 Eclipse Foundation. All Rights Reserved.