Class FedXFactory


  • public class FedXFactory
    extends Object
    FedX initialization factory methods for convenience: methods initialize the FederationManager and all required FedX structures. See FederationManager for some a code snippet.

    Use the newFederation() builder to create an advanced and customized federation

    Author:
    Andreas Schwarte
    • Method Detail

      • createSparqlFederation

        public static FedXRepository createSparqlFederation​(List<String> sparqlEndpoints)
                                                     throws Exception
        Create a federation with the provided sparql endpoints
        Parameters:
        sparqlEndpoints - the list of SPARQL endpoints
        Returns:
        the configured FedX federation Sail wrapped in a FedXRepository
        Throws:
        Exception
      • createFederation

        public static FedXRepository createFederation​(File dataConfig)
                                               throws Exception
        Create the federation with a specified data source configuration file (*.ttl). Federation members are constructed from the data source configuration. Sample data source configuration files can be found in the documentation.
        Parameters:
        dataConfig - the location of the data source configuration
        Returns:
        the configured FedX federation Sail wrapped in a FedXRepository
        Throws:
        Exception
      • createFederation

        public static FedXRepository createFederation​(List<Endpoint> endpoints)
                                               throws FedXException
        Create the federation by providing the endpoints to add. The fedx configuration can provide information about the dataConfig to be used which may contain the default federation members.

        Parameters:
        endpoints - additional endpoints to be added, may be null or empty
        Returns:
        the configured FedX federation Sail wrapped in a FedXRepository
        Throws:
        FedXException
      • newFederation

        public static FedXFactory newFederation()
        Create a new customizable FedX federation. Once all configuration is supplied, the Federation can be created using create()
        Returns:
        the FedXFactory builder
      • withSparqlEndpoint

        public FedXFactory withSparqlEndpoint​(String sparqlEndpoint)
      • withResolvableEndpoint

        public FedXFactory withResolvableEndpoint​(String repositoryId)
      • withResolvableEndpoint

        public FedXFactory withResolvableEndpoint​(String repositoryId,
                                                  boolean writable)
      • withFedXBaseDir

        public FedXFactory withFedXBaseDir​(File fedxBaseDir)
        Configure the FedX base directory at federation construction time.
        Parameters:
        fedxBaseDir - the fedx base directory
        Returns:
        the FedXFactory instance