Search in sources :

Example 1 with RdfNativeSesameStoreAssembler

use of org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler in project qi4j-sdk by Qi4j.

the class ReindexerTest method assemble.

@SuppressWarnings("unchecked")
public void assemble(ModuleAssembly module) throws AssemblyException {
    // JDBM EntityStore
    new JdbmEntityStoreAssembler().assemble(module);
    // Native Sesame EntityFinder
    new RdfNativeSesameStoreAssembler().assemble(module);
    // Reindexer
    module.services(ReindexerService.class);
    // Configuration
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    config.entities(JdbmConfiguration.class, NativeConfiguration.class, ReindexerConfiguration.class).visibleIn(Visibility.layer);
    // Test entity
    module.entities(MyEntity.class);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) JdbmConfiguration(org.qi4j.entitystore.jdbm.JdbmConfiguration) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration) JdbmEntityStoreAssembler(org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler)

Example 2 with RdfNativeSesameStoreAssembler

use of org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler in project qi4j-sdk by Qi4j.

the class ContainsAllTest method assemble.

// This test creates a one-layer, two-module application, with one module
// being testing module, and another for retrieving configuration for
// services from preferences. This test assumes that those configurations
// already exist in preference ES.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FileConfigurationService.class);
    ModuleAssembly prefModule = module.layer().module("PrefModule");
    prefModule.entities(NativeConfiguration.class).visibleIn(Visibility.application);
    prefModule.forMixin(NativeConfiguration.class).declareDefaults().dataDirectory().set(DATA_DIR.getAbsolutePath());
    new EntityTestAssembler().assemble(prefModule);
    module.entities(ExampleEntity.class);
    module.values(ExampleValue.class, ExampleValue2.class);
    EntityTestAssembler testAss = new EntityTestAssembler();
    testAss.assemble(module);
    RdfNativeSesameStoreAssembler rdfAssembler = new RdfNativeSesameStoreAssembler();
    rdfAssembler.assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Example 3 with RdfNativeSesameStoreAssembler

use of org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler in project qi4j-sdk by Qi4j.

the class RDFPerformanceTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FileConfigurationService.class);
    ModuleAssembly prefModule = module.layer().module("PrefModule");
    prefModule.entities(NativeConfiguration.class).visibleIn(Visibility.application);
    prefModule.forMixin(NativeConfiguration.class).declareDefaults().tripleIndexes().set("spoc,cspo");
    prefModule.forMixin(NativeConfiguration.class).declareDefaults().dataDirectory().set(DATA_DIR.getAbsolutePath());
    new EntityTestAssembler().assemble(prefModule);
    module.entities(ExampleEntity.class);
    EntityTestAssembler testAss = new EntityTestAssembler();
    testAss.assemble(module);
    Assembler rdfAssembler = new RdfNativeSesameStoreAssembler();
    rdfAssembler.assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) Assembler(org.qi4j.bootstrap.Assembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Example 4 with RdfNativeSesameStoreAssembler

use of org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler in project qi4j-sdk by Qi4j.

the class ContainsTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FileConfigurationService.class);
    ModuleAssembly prefModule = module.layer().module("PrefModule");
    prefModule.entities(NativeConfiguration.class).visibleIn(Visibility.application);
    prefModule.forMixin(NativeConfiguration.class).declareDefaults().dataDirectory().set(DATA_DIR.getAbsolutePath());
    new EntityTestAssembler().assemble(prefModule);
    module.entities(ExampleEntity.class);
    module.values(ExampleValue.class, ExampleValue2.class);
    EntityTestAssembler testAss = new EntityTestAssembler();
    testAss.assemble(module);
    RdfNativeSesameStoreAssembler rdfAssembler = new RdfNativeSesameStoreAssembler();
    rdfAssembler.assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Example 5 with RdfNativeSesameStoreAssembler

use of org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler in project qi4j-sdk by Qi4j.

the class QueryPerformanceTest method createInfrastructureLayer.

private LayerAssembly createInfrastructureLayer(ApplicationAssembly applicationAssembly) throws AssemblyException {
    LayerAssembly infrastructureLayer = applicationAssembly.layer(LAYER_INFRASTRUCTURE);
    // Persistence module
    ModuleAssembly persistenceModule = infrastructureLayer.module(MODULE_PERSISTENCE);
    // Indexing
    new RdfNativeSesameStoreAssembler().assemble(persistenceModule);
    // Entity store
    new OrgJsonValueSerializationAssembler().assemble(persistenceModule);
    new MemoryEntityStoreAssembler().visibleIn(Visibility.application).assemble(persistenceModule);
    return infrastructureLayer;
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) MemoryEntityStoreAssembler(org.qi4j.entitystore.memory.MemoryEntityStoreAssembler) LayerAssembly(org.qi4j.bootstrap.LayerAssembly) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Aggregations

ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)5 RdfNativeSesameStoreAssembler (org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler)5 NativeConfiguration (org.qi4j.library.rdf.repository.NativeConfiguration)4 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)4 Assembler (org.qi4j.bootstrap.Assembler)1 LayerAssembly (org.qi4j.bootstrap.LayerAssembly)1 JdbmConfiguration (org.qi4j.entitystore.jdbm.JdbmConfiguration)1 JdbmEntityStoreAssembler (org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler)1 MemoryEntityStoreAssembler (org.qi4j.entitystore.memory.MemoryEntityStoreAssembler)1 OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)1