Class ProxyRepository
- java.lang.Object
-
- org.eclipse.rdf4j.repository.base.AbstractRepository
-
- org.eclipse.rdf4j.repository.sail.ProxyRepository
-
- All Implemented Interfaces:
Repository,RepositoryResolverClient
public class ProxyRepository extends AbstractRepository implements RepositoryResolverClient
Repositoryimplementation that takes aRepositoryResolverinstance and the id of a managed repository, and delegate all calls through to the given repository.The purpose is to allow
Sails to refer to other local repositories using a unique identifier without having to go through an HTTP layer.The implementation is independent of
DelegatingRepositoryso that it is freed from having to provide implementation details in its configuration data. Instead, it only has to provide an unambiguous local identifier to the proxy.- Author:
- Dale Visser
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository
logger
-
-
Constructor Summary
Constructors Constructor Description ProxyRepository()ProxyRepository(String proxiedIdentity)Creates a repository instance that proxies to a repository of the give ID.ProxyRepository(RepositoryResolver resolver, String proxiedIdentity)Creates a repository instance that proxies to the given repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryConnectiongetConnection()FilegetDataDir()StringgetProxiedIdentity()org.eclipse.rdf4j.model.ValueFactorygetValueFactory()protected voidinitializeInternal()booleanisWritable()voidsetDataDir(File dataDir)voidsetProxiedIdentity(String value)voidsetRepositoryResolver(RepositoryResolver resolver)protected voidshutDownInternal()-
Methods inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository
init, isInitialized, shutDown
-
-
-
-
Constructor Detail
-
ProxyRepository
public ProxyRepository()
-
ProxyRepository
public ProxyRepository(String proxiedIdentity)
Creates a repository instance that proxies to a repository of the give ID.- Parameters:
proxiedIdentity- id of the proxied repository
-
ProxyRepository
public ProxyRepository(RepositoryResolver resolver, String proxiedIdentity)
Creates a repository instance that proxies to the given repository.- Parameters:
resolver- manager that the proxied repository is associated withproxiedIdentity- id of the proxied repository
-
-
Method Detail
-
setProxiedIdentity
public final void setProxiedIdentity(String value)
-
getProxiedIdentity
public String getProxiedIdentity()
-
setRepositoryResolver
public final void setRepositoryResolver(RepositoryResolver resolver)
- Specified by:
setRepositoryResolverin interfaceRepositoryResolverClient
-
setDataDir
public void setDataDir(File dataDir)
- Specified by:
setDataDirin interfaceRepository
-
getDataDir
public File getDataDir()
- Specified by:
getDataDirin interfaceRepository
-
isWritable
public boolean isWritable() throws RepositoryException- Specified by:
isWritablein interfaceRepository- Throws:
RepositoryException
-
getConnection
public RepositoryConnection getConnection() throws RepositoryException
- Specified by:
getConnectionin interfaceRepository- Throws:
RepositoryException
-
getValueFactory
public org.eclipse.rdf4j.model.ValueFactory getValueFactory()
- Specified by:
getValueFactoryin interfaceRepository
-
initializeInternal
protected void initializeInternal() throws RepositoryException- Specified by:
initializeInternalin classAbstractRepository- Throws:
RepositoryException
-
shutDownInternal
protected void shutDownInternal() throws RepositoryException- Specified by:
shutDownInternalin classAbstractRepository- Throws:
RepositoryException
-
-