Skip to content

FedX Data Configuration

Andreas Schwarte edited this page Apr 8, 2019 · 5 revisions

Federation members can be added to a federation either directly as a list of endpoints, or using a data configuration file (see Java examples). In a data configuration the federation members are specified using turtle syntax.

Example 1: SPARQL Federation:

@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix fedx: <http://www.fluidops.com/config/fedx#> .

<http://DBpedia> a sd:Service ;
	fedx:store "SPARQLEndpoint";
	sd:endpoint "http://dbpedia.org/sparql";
	fedx:supportsASKQueries false .

<http://SWDF> a sd:Service ;
	fedx:store "SPARQLEndpoint" ;
	sd:endpoint "http://data.semanticweb.org/sparql".

<http://LinkedMDB> a sd:Service ;
	fedx:store "SPARQLEndpoint";
	sd:endpoint "http://data.linkedmdb.org/sparql".

Note: if a SPARQL endpoint does not support ASK queries, the endpoint can be configured to use SELECT queries instead using fedx:supportsASKQueries false. This is for instance useful for Virtuoso based endpoints like DBpedia. Moreover note that for convenience the public DBpedia endpoint is automatically configured to use SELECT queries.

Example 2: SPARQL Federation with RDF4J remote repositories

@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix fedx: <http://www.fluidops.com/config/fedx#> .

<http://dbpedia> a sd:Service ;
	fedx:store "RemoteRepository";
	fedx:repositoryServer "http://host/rdf4j-server" ;
	fedx:repositoryName "repoName" .

Example 3: Local Federation (NativeStore):

@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix fedx: <http://www.fluidops.com/config/fedx#> .

<http://DBpedia> a sd:Service ;
	fedx:store "NativeStore";
	fedx:repositoryLocation "repositories\\native-storage.dbpedia36".

<http://NYTimes> a sd:Service ;
	fedx:store "NativeStore";
	fedx:repositoryLocation "repositories\\native-storage.nytimes".

Example 4: Federation with resolvable endpoints:

FedX supports to use resolvable endpoints as federation members. These resolvable repositories are not managed by FedX, but are resolved using a provided RepositoryResolver. An example use case is to reference a repository managed by the rdf4j-server (see here for details). Alternatively, any custom resolver can be provided to FedX during the initialization using the FedXFactory.

@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix fedx: <http://www.fluidops.com/config/fedx#> .

<http://myNtiveStore> a sd:Service ;
	fedx:store "ResolvableRepository" ;
	fedx:repositoryName "myNativeStore" .
</pre>

Note that also hybrid combinations are possible.
Clone this wiki locally