Search in sources :

Example 6 with LuceneSail

use of org.eclipse.rdf4j.sail.lucene.LuceneSail in project inception by inception-project.

the class SPARQLQueryBuilderTest method setUp.

@BeforeEach
public void setUp() {
    suspendSslVerification();
    kb = new KnowledgeBase();
    kb.setDefaultLanguage("en");
    kb.setType(RepositoryType.LOCAL);
    kb.setFullTextSearchIri(null);
    kb.setMaxResults(100);
    initRdfsMapping();
    // Local RDF4J in-memory store - this should be used for most tests because we can
    // a) rely on its availability
    // b) import custom test data
    LuceneSail lucenesail = new LuceneSail();
    lucenesail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, "true");
    lucenesail.setBaseSail(new MemoryStore());
    rdf4jLocalRepo = new SailRepository(lucenesail);
    rdf4jLocalRepo.init();
    // Local Fuseki in-memory story
    fusekiServer = // 
    FusekiServer.create().add("/fuseki", // 
    createFusekiFTSDataset()).build();
    fusekiServer.start();
    fusekiLocalRepo = buildSparqlRepository("http://localhost:" + fusekiServer.getPort() + "/fuseki");
    ukpVirtuosoRepo = buildSparqlRepository("http://knowledgebase.ukp.informatik.tu-darmstadt.de:8890/sparql");
    wikidata = buildSparqlRepository("https://query.wikidata.org/sparql");
    dbpedia = buildSparqlRepository("http://de.dbpedia.org/sparql");
    yago = buildSparqlRepository("https://yago-knowledge.org/sparql/query");
    hucit = buildSparqlRepository("http://nlp.dainst.org:8888/sparql");
    britishMuseum = buildSparqlRepository("http://collection.britishmuseum.org/sparql");
    // Web: http://zbw.eu/beta/sparql-lab/?endpoint=http://zbw.eu/beta/sparql/stw/query
    zbwStw = buildSparqlRepository("http://zbw.eu/beta/sparql/stw/query");
    // Web: http://zbw.eu/beta/sparql-lab/?endpoint=http://zbw.eu/beta/sparql/gnd/query
    zbwGnd = buildSparqlRepository("http://zbw.eu/beta/sparql/gnd/query");
}
Also used : MemoryStore(org.eclipse.rdf4j.sail.memory.MemoryStore) KnowledgeBase(de.tudarmstadt.ukp.inception.kb.model.KnowledgeBase) SailRepository(org.eclipse.rdf4j.repository.sail.SailRepository) LuceneSail(org.eclipse.rdf4j.sail.lucene.LuceneSail) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

SailRepository (org.eclipse.rdf4j.repository.sail.SailRepository)6 LuceneSail (org.eclipse.rdf4j.sail.lucene.LuceneSail)6 KnowledgeBase (de.tudarmstadt.ukp.inception.kb.model.KnowledgeBase)3 MemoryStore (org.eclipse.rdf4j.sail.memory.MemoryStore)3 BeforeEach (org.junit.jupiter.api.BeforeEach)3 File (java.io.File)2 IntelligentGraphConfig (com.inova8.intelligentgraph.sail.IntelligentGraphConfig)1 IntelligentGraphFactory (com.inova8.intelligentgraph.sail.IntelligentGraphFactory)1 IntelligentGraphSail (com.inova8.intelligentgraph.sail.IntelligentGraphSail)1 DriverConfiguration (cz.cvut.kbss.ontodriver.config.DriverConfiguration)1 Path (java.nio.file.Path)1 Repository (org.eclipse.rdf4j.repository.Repository)1 RepositoryConnection (org.eclipse.rdf4j.repository.RepositoryConnection)1 Sail (org.eclipse.rdf4j.sail.Sail)1 NativeStore (org.eclipse.rdf4j.sail.nativerdf.NativeStore)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Test (org.junit.jupiter.api.Test)1