Search in sources :

Example 1 with EclStandaloneSetup

use of com.b2international.snomed.ecl.EclStandaloneSetup in project snow-owl by b2ihealthcare.

the class SnomedPlugin method init.

@Override
public void init(SnowOwlConfiguration configuration, Environment env) throws Exception {
    final SnomedCoreConfiguration coreConfig = configuration.getModuleConfig(SnomedCoreConfiguration.class);
    env.services().registerService(SnomedCoreConfiguration.class, coreConfig);
    final Injector injector = new EclStandaloneSetup().createInjectorAndDoEMFRegistration();
    env.services().registerService(EclParser.class, new DefaultEclParser(injector.getInstance(IParser.class), injector.getInstance(IResourceValidator.class)));
    env.services().registerService(EclSerializer.class, new DefaultEclSerializer(injector.getInstance(ISerializer.class)));
    // register SNOMED CT Query based validation rule evaluator
    ValidationRuleEvaluator.Registry.register(new SnomedQueryValidationRuleEvaluator());
}
Also used : DefaultEclParser(com.b2international.snowowl.snomed.core.ecl.DefaultEclParser) SnomedQueryValidationRuleEvaluator(com.b2international.snowowl.snomed.validation.SnomedQueryValidationRuleEvaluator) Injector(com.google.inject.Injector) EclStandaloneSetup(com.b2international.snomed.ecl.EclStandaloneSetup) DefaultEclSerializer(com.b2international.snowowl.snomed.core.ecl.DefaultEclSerializer) SnomedCoreConfiguration(com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration)

Example 2 with EclStandaloneSetup

use of com.b2international.snomed.ecl.EclStandaloneSetup in project snow-owl by b2ihealthcare.

the class SnomedEclRewriterTest method givenRewriter.

@Before
public void givenRewriter() {
    final Injector injector = new EclStandaloneSetup().createInjectorAndDoEMFRegistration();
    rewriter = new SnomedEclRewriter();
    parser = new DefaultEclParser(injector.getInstance(IParser.class), injector.getInstance(IResourceValidator.class));
    serializer = new DefaultEclSerializer(injector.getInstance(ISerializer.class));
}
Also used : Injector(com.google.inject.Injector) EclStandaloneSetup(com.b2international.snomed.ecl.EclStandaloneSetup) Before(org.junit.Before)

Aggregations

EclStandaloneSetup (com.b2international.snomed.ecl.EclStandaloneSetup)2 Injector (com.google.inject.Injector)2 DefaultEclParser (com.b2international.snowowl.snomed.core.ecl.DefaultEclParser)1 DefaultEclSerializer (com.b2international.snowowl.snomed.core.ecl.DefaultEclSerializer)1 SnomedCoreConfiguration (com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration)1 SnomedQueryValidationRuleEvaluator (com.b2international.snowowl.snomed.validation.SnomedQueryValidationRuleEvaluator)1 Before (org.junit.Before)1