public class FedXFactory extends Object
FederationManager
and all
required FedX structures. See FederationManager
for some a code snippet.
Use the newFederation()
builder to create an advanced and customized federation
Modifier and Type | Field and Description |
---|---|
protected FedXConfig |
config |
protected FederatedServiceResolver |
federatedServiceResolver |
protected File |
fedxBaseDir |
protected static org.slf4j.Logger |
log |
protected List<Endpoint> |
members |
protected RepositoryResolver |
repositoryResolver |
Modifier and Type | Method and Description |
---|---|
FedXRepository |
create()
Create the federation using the provided configuration
|
static FedXRepository |
createFederation(File dataConfig)
Create the federation with a specified data source configuration file (*.ttl).
|
static FedXRepository |
createFederation(List<Endpoint> endpoints)
Create the federation by providing the endpoints to add.
|
static FedXRepository |
createSparqlFederation(List<String> sparqlEndpoints)
Create a federation with the provided sparql endpoints
|
static FedXFactory |
newFederation()
Create a new customizable FedX federation.
|
FedXFactory |
withConfig(FedXConfig config) |
FedXFactory |
withFederatedServiceResolver(FederatedServiceResolver federatedServiceResolver) |
FedXFactory |
withFedXBaseDir(File fedxBaseDir)
Configure the FedX base directory at federation construction time.
|
FedXFactory |
withMembers(File dataConfig) |
FedXFactory |
withMembers(List<Endpoint> endpoints) |
FedXFactory |
withMembers(Model model)
Initialize the federation with members from the model.
|
FedXFactory |
withRepositoryResolver(RepositoryResolver repositoryResolver) |
FedXFactory |
withResolvableEndpoint(String repositoryId) |
FedXFactory |
withResolvableEndpoint(String repositoryId,
boolean writable) |
FedXFactory |
withSparqlEndpoint(String sparqlEndpoint) |
FedXFactory |
withSparqlEndpoints(List<String> sparqlEndpoints) |
protected static final org.slf4j.Logger log
protected RepositoryResolver repositoryResolver
protected FederatedServiceResolver federatedServiceResolver
protected FedXConfig config
protected File fedxBaseDir
public static FedXRepository createSparqlFederation(List<String> sparqlEndpoints) throws Exception
sparqlEndpoints
- the list of SPARQL endpointsSail
wrapped in a FedXRepository
Exception
public static FedXRepository createFederation(File dataConfig) throws Exception
dataConfig
- the location of the data source configurationSail
wrapped in a FedXRepository
Exception
public static FedXRepository createFederation(List<Endpoint> endpoints) throws FedXException
endpoints
- additional endpoints to be added, may be null or emptySail
wrapped in a FedXRepository
Exception
FedXException
public static FedXFactory newFederation()
create()
FedXFactory
builderpublic FedXFactory withRepositoryResolver(RepositoryResolver repositoryResolver)
public FedXFactory withFederatedServiceResolver(FederatedServiceResolver federatedServiceResolver)
public FedXFactory withMembers(List<Endpoint> endpoints)
public FedXFactory withMembers(File dataConfig)
public FedXFactory withMembers(Model model)
Currently the types NativeStore, ResolvableEndpoint and SPARQLEndpoint are supported. For details please refer to
the documentation in NativeRepositoryInformation
, ResolvableRepositoryInformation
and
SPARQLRepositoryInformation
.
model
- the model defining the federation memberspublic FedXFactory withSparqlEndpoint(String sparqlEndpoint)
public FedXFactory withSparqlEndpoints(List<String> sparqlEndpoints)
public FedXFactory withResolvableEndpoint(String repositoryId)
public FedXFactory withResolvableEndpoint(String repositoryId, boolean writable)
public FedXFactory withConfig(FedXConfig config)
public FedXFactory withFedXBaseDir(File fedxBaseDir)
fedxBaseDir
- the fedx base directoryFedXFactory
instancepublic FedXRepository create()
FedXRepository
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.