Package org.eclipse.rdf4j.federated.repository

## Class FedXRepositoryConfig

- java.lang.Object
- - org.eclipse.rdf4j.repository.config.AbstractRepositoryImplConfig
  - - org.eclipse.rdf4j.federated.repository.FedXRepositoryConfig

- All Implemented Interfaces:
    `RepositoryImplConfig`

      public class FedXRepositoryConfig
      extends AbstractRepositoryImplConfig

  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: .
       @prefix rep: .
       @prefix 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" ;
       ];
       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

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static IRI` | `DATA_CONFIG` | IRI of the property pointing to the FedX data config
    `static IRI` | `MEMBER` | IRI of the property pointing to a federation member node
    `static String` | `NAMESPACE` | FedX schema namespace (http://rdf4j.org/config/federation#).

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FedXRepositoryConfig()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Resource` | `export​(Model m)` | Export this `RepositoryImplConfig` to its RDF representation
    `FedXConfig` | `getConfig()` |
    `String` | `getDataConfig()` |
    `Model` | `getMembers()` |
    `void` | `parse​(Model m, Resource implNode)` | Reads the properties of this `RepositoryImplConfig` from the supplied Model and sets them accordingly.
    `void` | `setConfig​(FedXConfig config)` |
    `void` | `setDataConfig​(String dataConfig)` |
    `void` | `setMembers​(Model members)` |
    `void` | `validate()` | Validates this configuration.

    - ### Methods inherited from class org.eclipse.rdf4j.repository.config.AbstractRepositoryImplConfig

      `create, getType, setType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAMESPACE

          public static final String NAMESPACE

      FedX schema namespace (http://rdf4j.org/config/federation#).
      See Also:
        Constant Field Values

    - #### DATA_CONFIG

          public static final IRI DATA_CONFIG

      IRI of the property pointing to the FedX data config

    - #### MEMBER

          public static final IRI MEMBER

      IRI of the property pointing to a federation member node

  - ### Constructor Detail

    - #### FedXRepositoryConfig

          public FedXRepositoryConfig()

  - ### Method Detail

    - #### getDataConfig

          public String getDataConfig()

    - #### setDataConfig

          public void setDataConfig​(String dataConfig)

    - #### getMembers

          public Model getMembers()

    - #### setMembers

          public void setMembers​(Model members)

    - #### getConfig

          public FedXConfig getConfig()

    - #### setConfig

          public void setConfig​(FedXConfig config)

    - #### export

          public Resource export​(Model m)

      Description copied from interface: `RepositoryImplConfig`
      Export this `RepositoryImplConfig` to its RDF representation
      Specified by:
        `export` in interface `RepositoryImplConfig`
      Overrides:
        `export` in class `AbstractRepositoryImplConfig`
      Parameters:
        `m` - a `Model` object. After successful completion of this method this Model will contain the RDF representation of this `RepositoryImplConfig`.
      Returns:
        the subject `Resource` that identifies this `RepositoryImplConfig` in the Model.

    - #### validate

          public void validate()
                        throws RepositoryConfigException

      Description copied from interface: `RepositoryImplConfig`
      Validates this configuration. A `RepositoryConfigException` is thrown when the configuration is invalid. The exception should contain an error message that indicates why the configuration is invalid.
      Specified by:
        `validate` in interface `RepositoryImplConfig`
      Overrides:
        `validate` in class `AbstractRepositoryImplConfig`
      Throws:
        `RepositoryConfigException` - If the configuration is invalid.

    - #### parse

          public void parse​(Model m,
                            Resource implNode)
                     throws RepositoryConfigException

      Description copied from interface: `RepositoryImplConfig`
      Reads the properties of this `RepositoryImplConfig` from the supplied Model and sets them accordingly.
      Specified by:
        `parse` in interface `RepositoryImplConfig`
      Overrides:
        `parse` in class `AbstractRepositoryImplConfig`
      Parameters:
        `m` - a `Model` containing repository configuration data.
        `implNode` - the subject `Resource` that identifies the `RepositoryImplConfig` in the Model.
      Throws:
        `RepositoryConfigException` - if the configuration data could not be read from the supplied Model.