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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FedXFactoryCreate the initializedFedXFactoryGet the directory where data and logging for this repository is stored.Gets theFederatedServiceResolverused by this client.voidinit()Initializes this repository.booleanIndicates if the Repository has been initialized.voidsetDataDir(File dataDir) Set the directory where data and logging for this repository is stored.voidSets theFederatedServiceResolverto use for this client.voidsetRepositoryResolver(RepositoryResolver resolver) voidshutDown()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:RepositorySet the directory where data and logging for this repository is stored.- Specified by:
setDataDirin interfaceRepository- Overrides:
setDataDirin classRepositoryWrapper- Parameters:
dataDir- the directory where data for this repository is stored
-
getDataDir
Description copied from interface:RepositoryGet the directory where data and logging for this repository is stored.- Specified by:
getDataDirin interfaceRepository- Overrides:
getDataDirin classRepositoryWrapper- Returns:
- the directory where data for this repository is stored.
-
isInitialized
public boolean isInitialized()Description copied from interface:RepositoryIndicates if the Repository has been initialized. Note that the initialization status may change if the Repository is shut down.- Specified by:
isInitializedin interfaceRepository- Overrides:
isInitializedin classRepositoryWrapper- Returns:
- true iff the repository has been initialized.
-
init
Description copied from interface:RepositoryInitializes 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:
initin interfaceRepository- Overrides:
initin classRepositoryWrapper- Throws:
RepositoryException- If the initialization failed.
-
createFactory
Create the initializedFedXFactory- Returns:
-
shutDown
Description copied from interface:RepositoryShuts 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:
shutDownin interfaceRepository- Overrides:
shutDownin classRepositoryWrapper- Throws:
RepositoryException
-
setRepositoryResolver
- Specified by:
setRepositoryResolverin interfaceRepositoryResolverClient
-
setFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientSets theFederatedServiceResolverto use for this client.- Specified by:
setFederatedServiceResolverin interfaceFederatedServiceResolverClient- Parameters:
resolver- The resolver to use.
-
getFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientGets theFederatedServiceResolverused by this client.- Specified by:
getFederatedServiceResolverin interfaceFederatedServiceResolverClient
-