Class FedXRepositoryConfig
java.lang.Object
org.eclipse.rdf4j.repository.config.AbstractRepositoryImplConfig
org.eclipse.rdf4j.federated.repository.FedXRepositoryConfig
- All Implemented Interfaces:
RepositoryImplConfig
A
RepositoryImplConfig to configure FedX for the use in the RDF4J workbench.
Federation member repositories (e.g. NativeStore or SPARQL endpoints) can be managed in the RDF4J Workbench, and referenced as members in the federation. Alternatively, FedX can manage repositories, please refer to the documentation for data configuration.
Example configuration file:
# RDF4J configuration template for a FedX Repository
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rep: <http://www.openrdf.org/config/repository#>.
@prefix fedx: <http://www.fluidops.com/config/fedx#>.
[] a rep:Repository ;
rep:repositoryImpl [
rep:repositoryType "fedx:FedXRepository" ;
fedx:member [
fedx:store "ResolvableRepository" ;
fedx:repositoryName "endpoint1"
],
[
fedx:store "ResolvableRepository" ;
fedx:repositoryName "endpoint2"
]
# optionally define data config
#fedx:fedxConfig "fedxConfig.prop" ;
fedx:dataConfig "dataConfig.ttl" ;
# optionally define FedXConfig overrides
fedx:config [
fedx:sourceSelectionCacheSpec "maximumSize=0" ;
fedx:enforceMaxQueryTime 30 ;
]
];
rep:repositoryID "fedx" ;
rdfs:label "FedX Federation" .
Note that the location of the fedx config and the data config is relative to the repository's data dir (as managed by the RDF4J repository manager)
- Author:
- Andreas Schwarte
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IRIIRI of the property populatingFedXConfig.getBoundJoinBlockSize()static final IRIIRI of the property populatingFedXConfig.getConsumingIterationMax()static final IRIIRI of the property populatingFedXConfig.isDebugQueryPlan()static final IRIIRI of the property populatingFedXConfig.isEnableMonitoring()static final IRIIRI of the property populatingFedXConfig.isEnableOptionalAsBindJoin()static final IRIIRI of the property populatingFedXConfig.getEnableServiceAsBoundJoin()static final IRIIRI of the property populatingFedXConfig.getEnforceMaxQueryTime()static final IRIIRI of the property populatingFedXConfig.getIncludeInferredDefault()static final IRIIRI of the property populatingFedXConfig.getJoinWorkerThreads()static final IRIIRI of the property populatingFedXConfig.getLeftJoinWorkerThreads()static final IRIIRI of the property populatingFedXConfig.isLogQueries()static final IRIIRI of the property populatingFedXConfig.isLogQueryPlan()static final IRIIRI of the property populatingFedXConfig.getPrefixDeclarations()static final IRIIRI of the property populatingFedXConfig.getSourceSelectionCacheSpec()static final IRIIRI of the property populatingFedXConfig.getUnionWorkerThreads()static final IRIIRI of the property pointing to the FedX data configstatic final IRIIRI of the property pointing to theFedXConfigstatic final IRIIRI of the property pointing to a federation member nodestatic final StringFedX schema namespace (http://rdf4j.org/config/federation#). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExport thisRepositoryImplConfigto its RDF representationprotected voidexportFedXConfig(Model model, Resource implNode) Export the providedFedXConfigto its RDF representation.voidReads the properties of thisRepositoryImplConfigfrom the supplied Model and sets them accordingly.protected voidparseFedXConfig(Model m, Resource implNode) Updates the containerFedXConfiginstance with properties from the supplied model.voidsetConfig(FedXConfig config) voidsetDataConfig(String dataConfig) voidsetMembers(Model members) voidvalidate()Validates this configuration.Methods inherited from class org.eclipse.rdf4j.repository.config.AbstractRepositoryImplConfig
create, getType, setType
-
Field Details
-
NAMESPACE
FedX schema namespace (http://rdf4j.org/config/federation#).- See Also:
-
DATA_CONFIG
IRI of the property pointing to the FedX data config -
FEDX_CONFIG
IRI of the property pointing to theFedXConfig -
MEMBER
IRI of the property pointing to a federation member node -
CONFIG_JOIN_WORKER_THREADS
IRI of the property populatingFedXConfig.getJoinWorkerThreads() -
CONFIG_UNION_WORKER_THREADS
IRI of the property populatingFedXConfig.getUnionWorkerThreads() -
CONFIG_LEFT_JOIN_WORKER_THREADS
IRI of the property populatingFedXConfig.getLeftJoinWorkerThreads() -
CONFIG_BOUND_JOIN_BLOCK_SIZE
IRI of the property populatingFedXConfig.getBoundJoinBlockSize() -
CONFIG_ENFORCE_MAX_QUERY_TIME
IRI of the property populatingFedXConfig.getEnforceMaxQueryTime() -
CONFIG_ENABLE_SERVICE_AS_BOUND_JOIN
IRI of the property populatingFedXConfig.getEnableServiceAsBoundJoin() -
CONFIG_ENABLE_OPTIONAL_AS_BIND_JOIN
IRI of the property populatingFedXConfig.isEnableOptionalAsBindJoin() -
CONFIG_ENABLE_MONITORING
IRI of the property populatingFedXConfig.isEnableMonitoring() -
CONFIG_LOG_QUERY_PLAN
IRI of the property populatingFedXConfig.isLogQueryPlan() -
CONFIG_LOG_QUERIES
IRI of the property populatingFedXConfig.isLogQueries() -
CONFIG_DEBUG_QUERY_PLAN
IRI of the property populatingFedXConfig.isDebugQueryPlan() -
CONFIG_INCLUDE_INFERRED_DEFAULT
IRI of the property populatingFedXConfig.getIncludeInferredDefault() -
CONFIG_SOURCE_SELECTION_CACHE_SPEC
IRI of the property populatingFedXConfig.getSourceSelectionCacheSpec() -
CONFIG_PREFIX_DECLARATIONS
IRI of the property populatingFedXConfig.getPrefixDeclarations() -
CONFIG_CONSUMING_ITERATION_MAX
IRI of the property populatingFedXConfig.getConsumingIterationMax()
-
-
Constructor Details
-
FedXRepositoryConfig
public FedXRepositoryConfig()
-
-
Method Details
-
getDataConfig
-
setDataConfig
-
getMembers
-
setMembers
-
getConfig
-
setConfig
-
export
Description copied from interface:RepositoryImplConfigExport thisRepositoryImplConfigto its RDF representation- Specified by:
exportin interfaceRepositoryImplConfig- Overrides:
exportin classAbstractRepositoryImplConfig- Parameters:
m- aModelobject. After successful completion of this method this Model will contain the RDF representation of thisRepositoryImplConfig.- Returns:
- the subject
Resourcethat identifies thisRepositoryImplConfigin the Model.
-
validate
Description copied from interface:RepositoryImplConfigValidates this configuration. ARepositoryConfigExceptionis thrown when the configuration is invalid. The exception should contain an error message that indicates why the configuration is invalid.- Specified by:
validatein interfaceRepositoryImplConfig- Overrides:
validatein classAbstractRepositoryImplConfig- Throws:
RepositoryConfigException- If the configuration is invalid.
-
parse
Description copied from interface:RepositoryImplConfigReads the properties of thisRepositoryImplConfigfrom the supplied Model and sets them accordingly.- Specified by:
parsein interfaceRepositoryImplConfig- Overrides:
parsein classAbstractRepositoryImplConfig- Parameters:
m- aModelcontaining repository configuration data.implNode- the subjectResourcethat identifies theRepositoryImplConfigin the Model.- Throws:
RepositoryConfigException- if the configuration data could not be read from the supplied Model.
-
parseFedXConfig
Updates the containerFedXConfiginstance with properties from the supplied model. It is up to the caller to retrieve configuration fromFEDX_CONFIGas well as to initialise the parsed configuration (viasetConfig(FedXConfig)) since it can be null.- Parameters:
m- the model from which to read configuration propertiesimplNode- the subject against which to expect theFEDX_CONFIGproperty.- Throws:
RepositoryConfigException- if any of the overridden fields are deemed to be invalid
-
exportFedXConfig
Export the providedFedXConfigto its RDF representation. Note thatgetConfig()could be null if configuration has not been set yet.- Parameters:
config- the configuration to exportimplNode- the node to which to write the config reference (i.e.FEDX_CONFIG) to
-