Class FedXRepositoryWrapper
java.lang.Object
org.eclipse.rdf4j.repository.base.RepositoryWrapper
org.eclipse.rdf4j.federated.repository.FedXRepositoryWrapper
- All Implemented Interfaces:
FederatedServiceResolverClient
,DelegatingRepository
,Repository
,RepositoryResolverClient
public class FedXRepositoryWrapper
extends RepositoryWrapper
implements RepositoryResolverClient, FederatedServiceResolverClient
Wrapper for the
FedXRepository
in order to allow for lazy initialization.
The wrapper is used from FedXRepositoryFactory
in environments with a RepositoryManager
, e.g. in the
RDF4J workbench. The background is that the RDF4J repository manager requires control over the repository instance.
The data directory and the RepositoryResolver
are handled by RDF4J RepositoryManager
.
- Author:
- Andreas Schwarte
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FedXFactory
Create the initializedFedXFactory
Get the directory where data and logging for this repository is stored.Gets theFederatedServiceResolver
used by this client.void
init()
Initializes this repository.boolean
Indicates if the Repository has been initialized.void
setDataDir
(File dataDir) Set the directory where data and logging for this repository is stored.void
Sets theFederatedServiceResolver
to use for this client.void
setRepositoryResolver
(RepositoryResolver resolver) void
shutDown()
Shuts the repository down, releasing any resources that it keeps hold of.Methods inherited from class org.eclipse.rdf4j.repository.base.RepositoryWrapper
getConnection, getDelegate, getValueFactory, isWritable, setDelegate, toString
-
Constructor Details
-
FedXRepositoryWrapper
-
-
Method Details
-
setDataDir
Description copied from interface:Repository
Set the directory where data and logging for this repository is stored.- Specified by:
setDataDir
in interfaceRepository
- Overrides:
setDataDir
in classRepositoryWrapper
- Parameters:
dataDir
- the directory where data for this repository is stored
-
getDataDir
Description copied from interface:Repository
Get the directory where data and logging for this repository is stored.- Specified by:
getDataDir
in interfaceRepository
- Overrides:
getDataDir
in classRepositoryWrapper
- Returns:
- the directory where data for this repository is stored.
-
isInitialized
public boolean isInitialized()Description copied from interface:Repository
Indicates if the Repository has been initialized. Note that the initialization status may change if the Repository is shut down.- Specified by:
isInitialized
in interfaceRepository
- Overrides:
isInitialized
in classRepositoryWrapper
- Returns:
- true iff the repository has been initialized.
-
init
Description copied from interface:Repository
Initializes this repository. A repository needs to be initialized before it can be used, however explicitly calling this method is not necessary: the repository will automatically initialize itself if an operation is executed on it that requires it to be initialized.- Specified by:
init
in interfaceRepository
- Overrides:
init
in classRepositoryWrapper
- Throws:
RepositoryException
- If the initialization failed.
-
createFactory
-
shutDown
Description copied from interface:Repository
Shuts the repository down, releasing any resources that it keeps hold of. Once shut down, the repository can no longer be used until it is re-initialized.- Specified by:
shutDown
in interfaceRepository
- Overrides:
shutDown
in classRepositoryWrapper
- Throws:
RepositoryException
-
setRepositoryResolver
- Specified by:
setRepositoryResolver
in interfaceRepositoryResolverClient
-
setFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClient
Sets theFederatedServiceResolver
to use for this client.- Specified by:
setFederatedServiceResolver
in interfaceFederatedServiceResolverClient
- Parameters:
resolver
- The resolver to use.
-
getFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClient
Gets theFederatedServiceResolver
used by this client.- Specified by:
getFederatedServiceResolver
in interfaceFederatedServiceResolverClient
-