Class FedXRepository
java.lang.Object
org.eclipse.rdf4j.repository.base.AbstractRepository
org.eclipse.rdf4j.repository.sail.SailRepository
org.eclipse.rdf4j.federated.repository.FedXRepository
- All Implemented Interfaces:
HttpClientDependent
,SessionManagerDependent
,FederatedServiceResolverClient
,Repository
,RepositoryResolverClient
A special
SailRepository
which performs the actions as defined in FedXRepositoryConnection
.- Author:
- as
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOpens a connection to this repository that can be used for querying and updating the contents of the repository.return the number of triples in the federation as string.protected void
void
Sets theFederatedServiceResolver
to use for this client.protected void
Methods inherited from class org.eclipse.rdf4j.repository.sail.SailRepository
getDataDir, getHttpClient, getHttpClientSessionManager, getSail, getValueFactory, isWritable, setDataDir, setHttpClient, setHttpClientSessionManager, setRepositoryResolver, toString
Methods inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository
init, isInitialized, shutDown
-
Constructor Details
-
FedXRepository
-
-
Method Details
-
getConnection
Description copied from interface:Repository
Opens a connection to this repository that can be used for querying and updating the contents of the repository. Created connections need to be closed to make sure that any resources they keep hold of are released. The best way to do this is to use a try-with-resources block, as follows:try (RepositoryConnection conn = repository.getConnection()) { // perform operations on the connection }
Note thatRepositoryConnection
is not guaranteed to be thread-safe! The recommended pattern for repository access in a multi-threaded application is to share the Repository object between threads, but have each thread create and use its ownRepositoryConnection
s.- Specified by:
getConnection
in interfaceRepository
- Overrides:
getConnection
in classSailRepository
- Returns:
- A connection that allows operations on this repository.
- Throws:
RepositoryException
- If something went wrong during the creation of the Connection.
-
initializeInternal
- Overrides:
initializeInternal
in classSailRepository
- Throws:
RepositoryException
-
shutDownInternal
- Overrides:
shutDownInternal
in classSailRepository
- Throws:
RepositoryException
-
setFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClient
Sets theFederatedServiceResolver
to use for this client.- Specified by:
setFederatedServiceResolver
in interfaceFederatedServiceResolverClient
- Overrides:
setFederatedServiceResolver
in classSailRepository
- Parameters:
resolver
- The resolver to use.
-
getFederationSize
return the number of triples in the federation as string. Retrieving the size is only supportedEndpointType.NativeStore
andEndpointType.RemoteRepository
. If the federation contains other types of endpoints, the size is indicated as a lower bound, i.e. the string starts with a larger sign.- Returns:
- the number of triples in the federation
-
getFederationContext
- Returns:
- the
FederationContext
-
getQueryManager
- Returns:
- the
QueryManager
from theFederationContext
-