• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SailImplConfig类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.eclipse.rdf4j.sail.config.SailImplConfig的典型用法代码示例。如果您正苦于以下问题:Java SailImplConfig类的具体用法?Java SailImplConfig怎么用?Java SailImplConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SailImplConfig类属于org.eclipse.rdf4j.sail.config包,在下文中一共展示了SailImplConfig类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSail

点赞 3

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
@Override
public Sail getSail(SailImplConfig config) throws SailConfigException	{
	
	if (!SAIL_TYPE.equals(config.getType())) {
		throw new SailConfigException("Invalid Sail type: " + config.getType());
	}
	
	if (!(config instanceof FedXSailConfig)) {
		throw new SailConfigException("FedXSail config expected, was " + config.getClass().getCanonicalName());
	}	
	
	FedXSailConfig fedXSailConfig = (FedXSailConfig)config;
	String fedxConfig = fedXSailConfig.getFedxConfig();
	
	if (fedxConfig==null)
		throw new SailConfigException("FedX Sail Configuration must not be null");
	
	try	{
		return FedXFactory.initializeFederation(fedxConfig, new DefaultEndpointListProvider(Collections.<String>emptyList())).getSail();
	} catch (FedXException e) {
		throw new SailConfigException(e);
	}
}
 

开发者ID:dice-group,
项目名称:CostFed,
代码行数:24,
代码来源:FedXSailFactory.java

示例2: connectorIsAbleToConnectToAlreadyInitializedLocalNativeStorage

点赞 3

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
@Test
public void connectorIsAbleToConnectToAlreadyInitializedLocalNativeStorage() throws Exception {
    final String repoId = "repositoryTest";
    final URI repoUri = URI
            .create("file://" + getProjectRootPath() + File.separator + "repositories" + File.separator + repoId);
    this.repositoryFolder = new File(getProjectRootPath() + File.separator + "repositories");
    SailImplConfig backend = new NativeStoreConfig();
    final SailRepositoryConfig repoType = new SailRepositoryConfig(backend);
    final RepositoryConfig config = new RepositoryConfig(repoId, repoType);
    final RepositoryManager repoManager = RepositoryProvider.getRepositoryManagerOfRepository(repoUri.toString());
    repoManager.addRepositoryConfig(config);
    final Repository repo = repoManager.getRepository(repoId);
    repo.initialize();
    final OntologyStorageProperties storageProperties = OntologyStorageProperties.driver(DRIVER)
                                                                                 .physicalUri(repoUri).build();

    final StorageConnector connector = new StorageConnector(new Configuration(storageProperties));
    assertTrue(connector.isOpen());
    connector.close();
}
 

开发者ID:kbss-cvut,
项目名称:jopa,
代码行数:21,
代码来源:StorageConnectorTest.java

示例3: getSail

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
@Override
public Sail getSail(SailImplConfig config) throws SailConfigException {
    if (!SAIL_TYPE.equals(config.getType())) {
        throw new SailConfigException("Invalid Sail type: " + config.getType());
    }
    if (config instanceof HBaseSailConfig) {
        HBaseSailConfig hconfig = (HBaseSailConfig) config;
        //instantiate the sail
        HBaseSail sail = new HBaseSail(HBaseConfiguration.create(), hconfig.getTablespace(), hconfig.isCreate(), hconfig.getSplitBits(), hconfig.isPush(), hconfig.getEvaluationTimeout(), hconfig.getElasticIndexURL(), null);
        return sail;
    } else {
        throw new SailConfigException("Invalid configuration: " + config);
    }
}
 

开发者ID:Merck,
项目名称:Halyard,
代码行数:15,
代码来源:HBaseSailFactory.java

示例4: createLocalNativeRepositoryConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
private RepositoryConfig createLocalNativeRepositoryConfig(String repoId, Configuration configuration) {
    SailImplConfig backend = new NativeStoreConfig();
    if (configuration.is(SesameConfigParam.USE_INFERENCE)) {
        backend = new ForwardChainingRDFSInferencerConfig(backend);
    }
    final SailRepositoryConfig repoType = new SailRepositoryConfig(backend);
    return new RepositoryConfig(repoId, repoType);
}
 

开发者ID:kbss-cvut,
项目名称:jopa,
代码行数:9,
代码来源:StorageConnector.java

示例5: getConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
@Override
public SailImplConfig getConfig() {
	return new FedXSailConfig();
}
 

开发者ID:dice-group,
项目名称:CostFed,
代码行数:5,
代码来源:FedXSailFactory.java

示例6: getConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
/**
 * Factory method for instantiating an HBaseSailConfig
 * @return new HBaseSailConfig instance
 */
@Override
public SailImplConfig getConfig() {
    return new HBaseSailConfig();
}
 

开发者ID:Merck,
项目名称:Halyard,
代码行数:9,
代码来源:HBaseSailFactory.java

示例7: getConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public SailImplConfig getConfig() {
    return new VOIDInferencerConfig();
}
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:4,
代码来源:VOIDInferencerFactory.java

示例8: getSail

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public Sail getSail(SailImplConfig sailImplConfig) throws SailConfigException {
    return new VOIDInferencer();
}
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:4,
代码来源:VOIDInferencerFactory.java

示例9: VOIDInferencerConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public VOIDInferencerConfig(SailImplConfig baseConfig) {
        super(VOIDInferencerFactory.SAIL_TYPE, baseConfig);
}
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:4,
代码来源:VOIDInferencerConfig.java

示例10: getConfig

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public SailImplConfig getConfig() {
    return new SEVODInferencerConfig();
}
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:4,
代码来源:SEVODInferencerFactory.java

示例11: getSail

点赞 2

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public Sail getSail(SailImplConfig sailImplConfig) throws SailConfigException {
    return new SEVODInferencer();
}
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:4,
代码来源:SEVODInferencerFactory.java

示例12: SEVODInferencerConfig

点赞 1

import org.eclipse.rdf4j.sail.config.SailImplConfig; //导入依赖的package包/类
public SEVODInferencerConfig(SailImplConfig baseConfig) {

        super(SEVODInferencerFactory.SAIL_TYPE, baseConfig);
    }
 

开发者ID:semagrow,
项目名称:semagrow,
代码行数:5,
代码来源:SEVODInferencerConfig.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)