Describing Federations
This page explains how to describe data sources (federation members) and their access interfaces using the HeFQUIN Federation Description Vocabulary. These descriptions are used by the HeFQUIN query engine to understand how to access and integrate the data sources that should be made available to a given engine instance.
1. Basic Concepts
fd:FederationMember- Represents a federation member (data source) that can be queried.fd:serviceURI- A property to specify the URI via which a federation member is identified in SERVICE clauses.fd:Interface- Represents the access mechanism used to query a federation member.fd:interface- A property linking a federation member to its interface.
2. Interface Types
Use one of the concrete subclasses of fd:Interface to describe how to query the federation
member:
fd:SPARQLEndpointInterface- For federation members accessible via the SPARQL protocolfd:TPFInterface- For federation members accessible via Triple Pattern Fragments (TPF)fd:brTPFInterface- For federation members accessible via Bindings-Restricted TPF (brTPF)fd:RESTInterface- For federation members that are based on a REST endpointfd:GraphQLEndpointInterface- For federation members that are based on a GraphQL APIfd:BoltInterface- For federation members accessible via the Bolt protocol (e.g., for Neo4j)
3. Key Properties
fd:endpointAddress- URI of a federation member that can be accessed via a single HTTP endpoint (e.g., SPARQL, REST, and GraphQL endpoints)fd:exampleFragmentAddress- Example URL of a fragment that can be used to access a specific subset of the dataset of a federation member (e.g., for TPF and brTPF interfaces)fd:vocabularyMappingsFile- Link to an RDF file aligning different vocabulariesfd:mappingConfiguration- Resource pointing to a mapping configuration for translating non-RDF data models (e.g., GraphQL, LPG) into RDFfd:wrapper- Link to anfd:Wrapperthat has RML triples maps listed via afd:rmlTriplesMapsproperty
4. Example Descriptions
SPARQL Endpoint
@prefix fd: <http://www.example.org/se/liu/ida/hefquin/fd#> .
@prefix ex: <http://example.org/> .
ex:dbpediaSPARQL
fd:serviceURI <http://dbpedia.org/sparql> ;
fd:interface [
a fd:SPARQLEndpointInterface ;
fd:endpointAddress <http://dbpedia.org/sparql>
] .
TPF Server
@prefix fd: <http://www.example.org/se/liu/ida/hefquin/fd#> .
@prefix ex: <http://example.org/> .
ex:dbpediaTPF
fd:serviceURI <http://fragments.dbpedia.org/2016-04/en> ;
fd:interface [
a fd:TPFInterface ;
fd:exampleFragmentAddress <http://fragments.dbpedia.org/2016-04/en>
] .
RML-Wrapped REST Endpoint
@prefix fd: <http://www.example.org/se/liu/ida/hefquin/fd#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example.org/> .
ex:openMeteo
fd:serviceURI <https://api.open-meteo.com/v1/forecast> ;
fd:interface _:openMeteoRestEndpoint ;
fd:wrapper _:openMeteoWrapper .
_:openMeteoRestEndpoint a fd:RESTInterface ;
fd:endpointAddress <https://api.open-meteo.com/v1/forecast> ;
fd:queryParameters ( [ fd:paramName "latitude" ; fd:paramType xsd:float ]
[ fd:paramName "longitude" ; fd:paramType xsd:float ]
[ fd:paramName "current" ; fd:paramType xsd:string ] ) .
# the corresponding wrapper with two RML triples maps
_:openMeteoWrapper
fd:rmlTriplesMaps ( _:openMeteoTM1 _:openMeteoTM2 ) .
_:openMeteoTM1
rml:logicalSource [ rml:source _:openMeteoRestEndpoint ;
rml:referenceFormulation rml:JSONPath ;
rml:iterator "$.current" ] ;
rml:subjectMap [ rml:termType rml:BlankNode ;
rml:reference "time" ];
rml:predicateObjectMap [ rml:predicateMap [ rml:constant ex:temperature ] ;
rml:objectMap [ rml:reference "temperature_2m" ; rml:datatype xsd:double ] ] .
_:openMeteoTM2
rml:logicalSource [ rml:source _:openMeteoRestEndpoint ;
rml:referenceFormulation rml:JSONPath ;
rml:iterator "$.current" ] ;
rml:subjectMap [ rml:termType rml:BlankNode ;
rml:reference "time" ];
rml:predicateObjectMap [ rml:predicateMap [ rml:constant ex:windSpeed ] ;
rml:objectMap [ rml:reference "wind_speed_10m" ; rml:datatype xsd:double ] ] .
Neo4j
@prefix fd: <http://www.example.org/se/liu/ida/hefquin/fd#> .
@prefix lpg2rdf: <http://w3id.org/hefquin/lpg2rdf#> .
@prefix ex: <http://example.org/> .
ex:neo4jTest
a fd:FederationMember ;
fd:serviceURI <http://localhost:7474/neo4j> ;
fd:interface [
a fd:BoltInterface ;
fd:endpointAddress <http://localhost:7474/db/neo4j/tx> ;
fd:mappingConfiguration [
a lpg2rdf:LPGToRDFConfiguration ;
# ...
]
] .