public class EndpointFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
EndpointFactory.DefaultRDFHandler |
| Constructor and Description |
|---|
EndpointFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getId(String endpointID,
String type)
Construct a unique id for the provided SPARQL Endpoint, e.g
http://dbpedia.org/ => %type%_dbpedia.org
|
static Endpoint |
loadEndpoint(String id,
Repository repository)
Load an
Endpoint for a given (configured) Repository. |
static List<Endpoint> |
loadFederationMembers(File dataConfig,
File fedXBaseDir)
Utility function to load federation members from a data configuration file.
|
static List<Endpoint> |
loadFederationMembers(Model members,
File baseDir)
Utility function to load federation members from a model.
|
static Endpoint |
loadNativeEndpoint(File location)
Construct a
NativeStore endpoint using the provided information and the file location as name. |
static Endpoint |
loadNativeEndpoint(String name,
File location)
Construct a NativeStore endpoint using the provided information.
|
static Endpoint |
loadRemoteRepository(String repositoryServer,
String repositoryName) |
static Endpoint |
loadRemoteRepository(String repositoryServer,
String repositoryName,
boolean writable) |
static Endpoint |
loadResolvableRepository(String repositoryId)
Load a
ResolvableEndpoint |
static Endpoint |
loadResolvableRepository(String repositoryId,
boolean writable)
Load a
ResolvableEndpoint |
static Endpoint |
loadSPARQLEndpoint(String endpoint)
Construct a SPARQL endpoint using the the provided information and the host of the url as name.
|
static Endpoint |
loadSPARQLEndpoint(String name,
String endpoint)
Construct a SPARQL endpoint using the the provided information.
|
public static Endpoint loadSPARQLEndpoint(String name, String endpoint) throws FedXException
name - a descriptive name, e.g. http://dbpediaendpoint - the URL of the SPARQL endpoint, e.g. http://dbpedia.org/sparqlEndpointBase containing the repositoryExceptionFedXExceptionpublic static Endpoint loadSPARQLEndpoint(String endpoint) throws FedXException
endpoint - the URL of the SPARQL endpoint, e.g. http://dbpedia.org/sparqlEndpointBase containing the repositoryFedXExceptionpublic static Endpoint loadRemoteRepository(String repositoryServer, String repositoryName) throws FedXException
FedXExceptionpublic static Endpoint loadRemoteRepository(String repositoryServer, String repositoryName, boolean writable) throws FedXException
FedXExceptionpublic static Endpoint loadResolvableRepository(String repositoryId)
ResolvableEndpoint
The federation must be initialized with a RepositoryResolver ( see
FedXFactory.withRepositoryResolver(RepositoryResolver)) and this resolver must offer a Repository with
the id provided by Endpoint.getId()
Note that the name is set to "http://" + repositoryId
repositoryId - the repository identifierEndpointResolvableRepositoryProvider,
ResolvableRepositoryInformationpublic static Endpoint loadResolvableRepository(String repositoryId, boolean writable)
ResolvableEndpoint
The federation must be initialized with a RepositoryResolver ( see
FedXFactory.withRepositoryResolver(RepositoryResolver)) and this resolver must offer a Repository with
the id provided by Endpoint.getId()
Note that the name is set to "http://" + repositoryId
repositoryId - the repository identifierwritable - whether to configure the endpoint as writable.EndpointResolvableRepositoryProvider,
ResolvableRepositoryInformationpublic static Endpoint loadEndpoint(String id, Repository repository) throws FedXException
Endpoint for a given (configured) Repository.
Note that EndpointType is set to EndpointType.Other
If the repository is already initialized, it is assumed that the lifecycle is managed externally. Otherwise, FedX will make sure to take care for the lifecycle of the repository, i.e. initialize and shutdown.
id - the identifier, e.g. "myRepository"repository - the constructed repositoryFedXExceptionpublic static Endpoint loadNativeEndpoint(String name, File location) throws FedXException
If the repository location denotes an absolute path, the native store directory must already exist. If a relative path is used, the repository is created on the fly (if necessary).
name - a descriptive name, e.g. http://dbpedialocation - the location of the data store, either absolute or relative in a "repositories" subfolder
SailRepository.getDataDir()ExceptionFedXExceptionpublic static Endpoint loadNativeEndpoint(File location) throws FedXException
NativeStore endpoint using the provided information and the file location as name.
If the repository location denotes an absolute path, the native store directory must already exist. If a relative path is used, the repository is created on the fly (if necessary).
location - the location of the data storeExceptionFedXExceptionpublic static List<Endpoint> loadFederationMembers(File dataConfig, File fedXBaseDir) throws FedXException
A data configuration file provides information about federation members in form of turtle. Currently the types
NativeStore, ResolvableEndpoint and SPARQLEndpoint are supported. For details please refer to the documentation
in NativeRepositoryInformation, ResolvableRepositoryInformation and
SPARQLRepositoryInformation.
dataConfig - IOExceptionExceptionFedXExceptionpublic static List<Endpoint> loadFederationMembers(Model members, File baseDir) throws FedXException
Currently the types NativeStore, ResolvableEndpoint and SPARQLEndpoint are supported. For details please refer to
the documentation in NativeRepositoryInformation, ResolvableRepositoryInformation and
SPARQLRepositoryInformation.
members - baseDir - FedXExceptionCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.