Class FedX

  • All Implemented Interfaces:
    RepositoryResolverClient, Sail

    public class FedX
    extends AbstractSail
    implements RepositoryResolverClient
    FedX serves as implementation of the federation layer. It implements RDF4J's Sail interface and can thus be used as a normal repository in a RDF4J environment. The federation layer enables transparent access to the underlying members as if they were a central repository.

    For initialization of the federation and usage see FederationManager.

    Author:
    Andreas Schwarte
    • Method Detail

      • setFederationContext

        public void setFederationContext​(FederationContext federationContext)
      • addMember

        protected void addMember​(Endpoint endpoint)
        Add a member to the federation (internal).

        If the federation is already initialized, the given endpoint is explicitly initialized as well.

        Parameters:
        endpoint -
      • removeMember

        public boolean removeMember​(Endpoint endpoint)
        Remove a member from the federation (internal)
        Parameters:
        endpoint -
        Returns:
        whether the member was removed
      • getValueFactory

        public ValueFactory getValueFactory()
        Description copied from interface: Sail
        Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.
        Specified by:
        getValueFactory in interface Sail
        Returns:
        a ValueFactory object for this Sail object.
      • isWritable

        public boolean isWritable()
                           throws SailException
        Description copied from interface: Sail
        Checks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.
        Specified by:
        isWritable in interface Sail
        Throws:
        SailException
      • setDataDir

        public void setDataDir​(File dataDir)
        Description copied from interface: Sail
        Sets the data directory for the Sail. The Sail can use this directory for storage of data, parameters, etc. This directory must be set before the Sail is initialized.
        Specified by:
        setDataDir in interface Sail
        Overrides:
        setDataDir in class AbstractSail
      • getMembers

        public List<Endpoint> getMembers()
        Returns:
        an unmodifiable view of the current members