本文整理汇总了Java中com.bigdata.rdf.sail.BigdataSail类的典型用法代码示例。如果您正苦于以下问题:Java BigdataSail类的具体用法?Java BigdataSail怎么用?Java BigdataSail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BigdataSail类属于com.bigdata.rdf.sail包,在下文中一共展示了BigdataSail类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: EmbeddedServerRunnable
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public EmbeddedServerRunnable( File jnl ) throws IOException {
this.port = getFreePort();
opts = new HashMap<>();
// the journal is the file itself
Properties dbprops = BigDataEngine.generateProperties( jnl );
Journal journal = new Journal( dbprops );
AbstractTripleStore triples
= AbstractTripleStore.class.cast( journal.getResourceLocator().
locate( "kb", ITx.UNISOLATED ) );
mgr = triples.getIndexManager();
for ( String key : dbprops.stringPropertyNames() ) {
opts.put( key, dbprops.getProperty( key ) );
}
opts.put( BigdataSail.Options.READ_ONLY, Boolean.toString( true ) );
}
开发者ID:Ostrich-Emulators,项目名称:semtool,代码行数:18,代码来源:EmbeddedServerRunnable.java
示例2: BlazegraphDataSource
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public BlazegraphDataSource( final String title,
final String description,
final Properties props )
throws DataSourceCreationException
{
this( title,
description,
new BigdataSailRepository( new BigdataSail( check(props,title) ) ),
true ); // repoHasToBeShutDown=true
try {
repo.initialize();
}
catch ( Exception e ) {
throw new DataSourceCreationException( e );
}
if ( props.getProperty(Options.BUFFER_MODE,Options.DEFAULT_BUFFER_MODE)
.equals("MemStore")
&& props.containsKey("file") )
{
loadData( props.getProperty("file") );
}
}
开发者ID:hartig,项目名称:BlazegraphBasedTPFServer,代码行数:25,代码来源:BlazegraphDataSource.java
示例3: createStore
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
/**
* Create the store provided by this SailProvider
*
* @return a new instance of the store
*/
@Override
public NotifyingSail createStore() {
log.info("Initializing Backend: BigData Store");
File journal = new File(configurationService.getHome() + File.separator + "bigdata" + File.separator + "bigdata.jnl");
Properties properties = new Properties();
properties.setProperty( BigdataSail.Options.FILE, journal.getAbsolutePath());
properties.setProperty( BigdataSail.Options.QUADS, "true");
properties.setProperty( BigdataSail.Options.TRUTH_MAINTENANCE, "false");
properties.setProperty( BigdataSail.Options.STATEMENT_IDENTIFIERS, "false");
properties.setProperty( BigdataSail.Options.AXIOMS_CLASS, "com.bigdata.rdf.axioms.NoAxioms");
properties.setProperty( BigdataSail.Options.TEXT_INDEX, ""+configurationService.getBooleanConfiguration("bigdata.textIndex",true));
properties.setProperty( Banner.Options.LOG4J_MBEANS_DISABLE, "true");
properties.setProperty( BigdataSail.Options.ISOLATABLE_INDICES, "true");
properties.setProperty( BigdataSail.Options.VOCABULARY_CLASS, "com.bigdata.rdf.vocab.NoVocabulary");
properties.setProperty( BigdataSail.Options.JUSTIFY, "false");
return new BigDataSesame27Sail(properties);
}
开发者ID:apache,项目名称:marmotta,代码行数:26,代码来源:BigDataStoreProvider.java
示例4: execInsertQuery
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
@Override
public void execInsertQuery(String query) throws SailException, UpdateExecutionException, RepositoryException, MalformedQueryException {
Update up = rc.prepareUpdate(QueryLanguage.SPARQL, query);
//sc.addStatement(vf.createURI("<http://health.mil/ontologies/dbcm/Concept/Service/tom2>"),vf.createURI("<http://health.mil/ontologies/dbcm/Relation/Exposes>"),vf.createURI("<http://health.mil/ontologies/dbcm/Concept/BusinessLogicUnit/tom1>"));
System.out.println("\nSPARQL: " + query);
//tq.setIncludeInferred(true /* includeInferred */);
//tq.evaluate();
rc.setAutoCommit(false);
up.execute();
//rc.commit();
InferenceEngine ie = ((BigdataSail)bdSail).getInferenceEngine();
ie.computeClosure(null);
rc.commit();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:18,代码来源:RemoteSparqlEngine.java
示例5: open
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
/**
* Open and initialize a BigdataSailRepository using the supplied config
* properties. You must specify a journal file in the properties.
*
* @param props
* config properties
* @return
* an open and initialized repository
*/
public static BigdataSailRepository open(final Properties props) {
if (props.getProperty(Journal.Options.FILE) == null) {
throw new IllegalArgumentException();
}
final BigdataSail sail = new BigdataSail(props);
final BigdataSailRepository repo = new BigdataSailRepository(sail);
Code.wrapThrow(() -> repo.initialize());
return repo;
}
开发者ID:blazegraph,项目名称:tinkerpop3,代码行数:20,代码来源:BasicRepositoryProvider.java
示例6: generateProperties
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public static Properties generateProperties( File jnl ) {
Properties props = new Properties();
props.setProperty( Constants.SMSS_LOCATION, jnl.toString() );
props.setProperty( BigdataSail.Options.FILE, jnl.toString() );
props.setProperty( Constants.ENGINE_IMPL,
BigDataEngine.class.getCanonicalName() );
props.setProperty( Constants.SMSS_VERSION_KEY, "1.0" );
return props;
}
开发者ID:Ostrich-Emulators,项目名称:semtool,代码行数:11,代码来源:BigDataEngine.java
示例7: main
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public static void main(String[] args) throws IOException, OpenRDFException {
// load journal properties from resources
final Properties props = loadProperties("/blazegraph.properties");
// instantiate a sail
final BigdataSail sail = new BigdataSail(props);
final Repository repo = new BigdataSailRepository(sail);
try{
repo.initialize();
/*
* Load data from resources
* src/main/resources/data.n3
*/
loadDataFromResources(repo, "/data.n3", "");
final String query = "select * {<http://blazegraph.com/blazegraph> ?p ?o}";
final TupleQueryResult result = executeSelectQuery(repo, query, QueryLanguage.SPARQL);
try {
while(result.hasNext()){
final BindingSet bs = result.next();
log.info(bs);
}
} finally {
result.close();
}
} finally {
repo.shutDown();
}
}
开发者ID:blazegraph,项目名称:blazegraph-samples,代码行数:37,代码来源:SampleBlazegraphSesameEmbedded.java
示例8: createRepository
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public static Repository createRepository(){
final Properties props = new Properties();
props.put(Options.BUFFER_MODE, BufferMode.DiskRW);
props.put(Options.FILE, journalFile);
final BigdataSail sail = new BigdataSail(props);
final Repository repo = new BigdataSailRepository(sail);
return repo;
}
开发者ID:blazegraph,项目名称:blazegraph-samples,代码行数:11,代码来源:SampleBlazegraphCustomFunctionEmbedded.java
示例9: blazegraphSail
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
@Bean
public BigdataSail blazegraphSail() throws IOException {
File tempfile = File.createTempFile("bigdata", ".jnl");
tempfile.deleteOnExit();
Properties prop = new Properties();
prop.load(this.getClass().getResourceAsStream("quads.properties"));
prop.put("com.bigdata.journal.AbstractJournal.file",
tempfile.getAbsolutePath());
return new BigdataSail(prop);
}
开发者ID:discoverygarden,项目名称:trippi-sail,代码行数:11,代码来源:EmbeddedBlazegraphConfig.java
示例10: setUpClass
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
@BeforeClass
public static void setUpClass() throws Exception
{
final Properties props = new Properties();
props.setProperty( BigdataSail.Options.TRUTH_MAINTENANCE, "false" );
props.setProperty( AbstractTripleStore.Options.TRIPLES_MODE, "true" );
props.setProperty( AbstractTripleStore.Options.AXIOMS_CLASS, "com.bigdata.rdf.axioms.NoAxioms" );
props.setProperty( AbstractTripleStore.Options.JUSTIFY, "false" );
props.setProperty( AbstractTripleStore.Options.STATEMENT_IDENTIFIERS, "false" );
props.setProperty( AbstractTripleStore.Options.TEXT_INDEX, "false" );
props.setProperty( Options.BUFFER_MODE, "MemStore" );
try {
repo = new BigdataSailRepository( new BigdataSail(props) );
repo.initialize();
loadTestData();
setDatasource( new BlazegraphDataSource("Blzgtest","Blzgtest",repo) );
}
catch ( Exception e ) {
e.printStackTrace( System.err );
throw e;
}
tpeParser = new TriplePatternElementParserForBlazegraph(
repo.getDatabase().getLexiconRelation() );
}
开发者ID:hartig,项目名称:BlazegraphBasedTPFServer,代码行数:30,代码来源:BlazegraphDataSourceTest.java
示例11: getBaseSail
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
/**
* Return the wrapped bigdata sail, even if it is somewhere deep in the stack
* @return
*/
private BigdataSail getBaseSail() {
Sail sail = wrapped;
while(sail instanceof SailWrapper) {
sail = ((SailWrapper) sail).getBaseSail();
}
if(sail instanceof BigDataSesame27Sail) {
return ((BigDataSesame27Sail) sail).getWrapped();
}
if(sail instanceof BigdataSail) {
return (BigdataSail) sail;
}
return null;
}
开发者ID:apache,项目名称:marmotta,代码行数:18,代码来源:BigDataSesame27Repository.java
示例12: getBaseSailConnection
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
private BigdataSail.BigdataSailConnection getBaseSailConnection(SailConnection con) {
SailConnection wrapped = con;
while(wrapped instanceof SailConnectionWrapper) {
wrapped = ((SailConnectionWrapper) wrapped).getWrappedConnection();
}
if(wrapped instanceof BigDataSesame27Sail.BigDataSesame27SailConnection) {
return ((BigDataSesame27Sail.BigDataSesame27SailConnection) wrapped).getWrapped();
}
if(wrapped instanceof BigdataSail.BigdataSailConnection) {
return (BigdataSail.BigdataSailConnection) wrapped;
}
return null;
}
开发者ID:apache,项目名称:marmotta,代码行数:14,代码来源:BigDataSesame27Repository.java
示例13: openGraph
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void openGraph() throws Exception {
bdSail = new BigdataSail(bdProp);
// BigdataSail.Options.TRUTH_MAINTENANCE = "true";
BigdataSailRepository repo = new BigdataSailRepository(bdSail);
repo.initialize();
rc = repo.getConnection();
// new ForwardChainingRDFSInferencer(bdSail);
InferenceEngine ie = bdSail.getInferenceEngine();
System.out.println("ie forward chaining " + ie);
System.out.println("Truth " + bdSail.isTruthMaintenance());
System.out.println("quad " + bdSail.isQuads());
// System.out.println("ie forward chaining " + ie);
// SailRepositoryConnection src = (SailRepositoryConnection) repo.getConnection();
String workingDir = System.getProperty("user.dir");
sc = ((SailRepositoryConnection) rc).getSailConnection();
String propFile = workingDir + "/DBCM_RDF_Map.prop";
loadRDFMap(propFile);
// sail = new ForwardChainingRDFSInferencer(new GraphSail(ng));
// sail.initialize();
// sc = sail.getConnection();
vf = bdSail.getValueFactory();
// return g;
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:30,代码来源:BigDataEngine.java
示例14: openGraph
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void openGraph() throws Exception {
bdSail = new BigdataSail(bdProp);
// BigdataSail.Options.TRUTH_MAINTENANCE = "true";
BigdataSailRepository repo = new BigdataSailRepository(bdSail);
repo.initialize();
rc = repo.getConnection();
//bdSail.
// new ForwardChainingRDFSInferencer(bdSail);
InferenceEngine ie = bdSail.getInferenceEngine();
System.out.println("ie forward chaining " + ie);
System.out.println("Truth " + bdSail.isTruthMaintenance());
System.out.println("quad " + bdSail.isQuads());
// System.out.println("ie forward chaining " + ie);
// SailRepositoryConnection src = (SailRepositoryConnection) repo.getConnection();
String workingDir = System.getProperty("user.dir");
sc = (rc).getSailConnection();
String propFile = workingDir + "/DBCM_RDF_Map.prop";
loadRDFMap(propFile);
// sail = new ForwardChainingRDFSInferencer(new GraphSail(ng));
// sail.initialize();
// sc = sail.getConnection();
vf = bdSail.getValueFactory();
// return g;
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:32,代码来源:BigDataRDFTester.java
示例15: openDB
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
@Override
public void openDB(String propFile)
{
try
{
super.openDB(propFile);
bdSail = new BigdataSail(prop);
// BigdataSail.Options.TRUTH_MAINTENANCE = "true";
BigdataSailRepository repo = new BigdataSailRepository(bdSail);
repo.initialize();
rc = repo.getConnection();
// System.out.println("ie forward chaining " + ie);
// need to convert to constants
String dbcmFile = prop.getProperty(Constants.DBCM_Prop);
String workingDir = System.getProperty("user.dir");
sc = ((SailRepositoryConnection) rc).getSailConnection();
dbcmFile = workingDir + "/" + dbcmFile;
rdfMap = DIHelper.getInstance().getCoreProp();
vf = bdSail.getValueFactory();
this.connected = true;
ie = ((BigdataSail)bdSail).getInferenceEngine();
// return g;
}catch(Exception ignored)
{
ignored.printStackTrace();
}
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:36,代码来源:BigDataEngine.java
示例16: execInsertQuery
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
@Override
public void execInsertQuery(String query) throws SailException, UpdateExecutionException, RepositoryException, MalformedQueryException {
Update up = rc.prepareUpdate(QueryLanguage.SPARQL, query);
//sc.addStatement(vf.createURI("<http://health.mil/ontologies/dbcm/Concept/Service/tom2>"),vf.createURI("<http://health.mil/ontologies/dbcm/Relation/Exposes>"),vf.createURI("<http://health.mil/ontologies/dbcm/Concept/BusinessLogicUnit/tom1>"));
System.out.println("\nSPARQL: " + query);
//tq.setIncludeInferred(true /* includeInferred */);
//tq.evaluate();
rc.setAutoCommit(false);
up.execute();
//rc.commit();
InferenceEngine ie = ((BigdataSail)bdSail).getInferenceEngine();
ie.computeClosure(null);
sc.commit();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:16,代码来源:BigDataEngine.java
示例17: closeDB
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void closeDB() throws Exception
{
//ng.stopTransaction(Conclusion.SUCCESS);
InferenceEngine ie = ((BigdataSail)bdSail).getInferenceEngine();
ie.computeClosure(null);
sc.commit();
sc.close();
bdSail.shutDown();
//ng.shutdown();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:12,代码来源:JCRReader.java
示例18: openDB
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void openDB() throws Exception {
bdSail = new BigdataSail(bdProp);
Repository repo = new BigdataSailRepository((BigdataSail) bdSail);
repo.initialize();
SailRepositoryConnection src = (SailRepositoryConnection) repo.getConnection();
sc = src.getSailConnection();
vf = bdSail.getValueFactory();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:11,代码来源:JCRReader.java
示例19: openDB
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void openDB() throws Exception {
bdSail = new BigdataSail(bdProp);
Repository repo = new BigdataSailRepository((BigdataSail) bdSail);
repo.initialize();
SailRepositoryConnection src = (SailRepositoryConnection) repo.getConnection();
sc = src.getSailConnection();
vf = bdSail.getValueFactory();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:12,代码来源:POIReader.java
示例20: closeDB
import com.bigdata.rdf.sail.BigdataSail; //导入依赖的package包/类
public void closeDB() throws Exception
{
System.out.println("Closing....");
//ng.stopTransaction(Conclusion.SUCCESS);
InferenceEngine ie = ((BigdataSail)bdSail).getInferenceEngine();
ie.computeClosure(null);
sc.commit();
sc.close();
bdSail.shutDown();
//ng.shutdown();
}
开发者ID:SEMOSS,项目名称:semoss,代码行数:13,代码来源:CSVReader.java
注:本文中的com.bigdata.rdf.sail.BigdataSail类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论