Search in sources :

Example 1 with GraphTraversalServiceImpl

use of org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl in project qi4j-sdk by Qi4j.

the class Assembler method assembleInfrastructureLayer.

private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
    ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
    serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {

        @Override
        public Module map(Application application) {
            return application.findModule("CONTEXT", "CONTEXT-ContextSupport");
        }
    }).visibleIn(application);
    ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
    indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
    indexingModule.addServices(MemoryRepositoryService.class, RdfIndexingEngineService.class).instantiateOnStartup().visibleIn(application);
    ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
    entityStoreModule.addServices(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).instantiateOnStartup().visibleIn(application);
    ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
    externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) Function(org.qi4j.functional.Function) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService) GraphTraversalServiceImpl(org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl) Application(org.qi4j.api.structure.Application) GraphDAO(org.qi4j.sample.dcicargo.pathfinder.internal.GraphDAO)

Example 2 with GraphTraversalServiceImpl

use of org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl in project qi4j-sdk by Qi4j.

the class Assembler method assembleInfrastructureLayer.

private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
    ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
    serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {

        @Override
        public Module map(Application application) {
            return application.findModule("CONTEXT", "CONTEXT-RoleMap");
        }
    }).visibleIn(application);
    ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
    indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
    indexingModule.services(OrgJsonValueSerializationService.class);
    indexingModule.services(MemoryRepositoryService.class, RdfIndexingEngineService.class).instantiateOnStartup().visibleIn(application);
    ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
    entityStoreModule.services(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).instantiateOnStartup().visibleIn(application);
    ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
    externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) Function(org.qi4j.functional.Function) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService) GraphTraversalServiceImpl(org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl) Application(org.qi4j.api.structure.Application) GraphDAO(org.qi4j.sample.dcicargo.pathfinder.internal.GraphDAO)

Example 3 with GraphTraversalServiceImpl

use of org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl in project qi4j-sdk by Qi4j.

the class TestAssembler method assembleInfrastructureLayer.

private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
    ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
    serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {

        @Override
        public Module map(Application application) {
            return application.findModule("CONTEXT", "CONTEXT-RoleMap");
        }
    }).visibleIn(application);
    ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
    indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
    indexingModule.services(MemoryRepositoryService.class, RdfIndexingEngineService.class).visibleIn(application).instantiateOnStartup();
    ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
    entityStoreModule.addServices(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).visibleIn(application);
    ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
    externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
Also used : MemoryEntityStoreService(org.qi4j.entitystore.memory.MemoryEntityStoreService) UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) Function(org.qi4j.functional.Function) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService) GraphTraversalServiceImpl(org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl) Application(org.qi4j.api.structure.Application) GraphDAO(org.qi4j.sample.dcicargo.pathfinder.internal.GraphDAO)

Example 4 with GraphTraversalServiceImpl

use of org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl in project qi4j-sdk by Qi4j.

the class TestAssembler method assembleInfrastructureLayer.

private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
    ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
    serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {

        @Override
        public Module map(Application application) {
            return application.findModule("CONTEXT", "CONTEXT-ContextSupport");
        }
    }).visibleIn(application);
    ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
    indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
    indexingModule.addServices(MemoryRepositoryService.class, RdfIndexingEngineService.class).visibleIn(application);
    ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
    entityStoreModule.addServices(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).visibleIn(application);
    ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
    externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
Also used : MemoryEntityStoreService(org.qi4j.entitystore.memory.MemoryEntityStoreService) UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) Function(org.qi4j.functional.Function) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService) RdfIndexingEngineService(org.qi4j.index.rdf.RdfIndexingEngineService) GraphTraversalServiceImpl(org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl) MemoryRepositoryService(org.qi4j.library.rdf.repository.MemoryRepositoryService) Application(org.qi4j.api.structure.Application) GraphDAO(org.qi4j.sample.dcicargo.pathfinder.internal.GraphDAO)

Aggregations

Application (org.qi4j.api.structure.Application)4 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)4 Function (org.qi4j.functional.Function)4 GraphDAO (org.qi4j.sample.dcicargo.pathfinder.internal.GraphDAO)4 GraphTraversalServiceImpl (org.qi4j.sample.dcicargo.pathfinder.internal.GraphTraversalServiceImpl)4 OrgJsonValueSerializationService (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService)4 MemoryEntityStoreService (org.qi4j.entitystore.memory.MemoryEntityStoreService)2 UuidIdentityGeneratorService (org.qi4j.spi.uuid.UuidIdentityGeneratorService)2 RdfIndexingEngineService (org.qi4j.index.rdf.RdfIndexingEngineService)1 MemoryRepositoryService (org.qi4j.library.rdf.repository.MemoryRepositoryService)1