Search in sources :

Example 16 with DefaultExpander

use of org.drools.compiler.lang.dsl.DefaultExpander in project drools-wb by kiegroup.

the class GuidedDecisionTableSourceService method getDSLExpander.

/**
 * Returns an expander for DSLs (only if there is a DSL configured for this package).
 */
private Expander getDSLExpander(final Path path) {
    final Expander expander = new DefaultExpander();
    final List<DSLMappingFile> dsls = getDSLMappingFiles(path);
    for (DSLMappingFile dsl : dsls) {
        expander.addDSLMapping(dsl.getMapping());
    }
    return expander;
}
Also used : DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) Expander(org.drools.compiler.lang.Expander) DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) DSLMappingFile(org.drools.compiler.lang.dsl.DSLMappingFile)

Example 17 with DefaultExpander

use of org.drools.compiler.lang.dsl.DefaultExpander in project drools-wb by kiegroup.

the class GuidedRuleTemplateSourceService method getDSLExpander.

/**
 * Returns an expander for DSLs (only if there is a DSL configured for this package).
 */
private Expander getDSLExpander(final Path path) {
    final Expander expander = new DefaultExpander();
    final List<DSLMappingFile> dsls = getDSLMappingFiles(path);
    for (DSLMappingFile dsl : dsls) {
        expander.addDSLMapping(dsl.getMapping());
    }
    return expander;
}
Also used : DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) Expander(org.drools.compiler.lang.Expander) DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) DSLMappingFile(org.drools.compiler.lang.dsl.DSLMappingFile)

Example 18 with DefaultExpander

use of org.drools.compiler.lang.dsl.DefaultExpander in project drools-wb by kiegroup.

the class DslrFileIndexer method getDSLExpander.

/**
 * Returns an expander for DSLs (only if there is a DSL configured for this package).
 */
private Expander getDSLExpander(final Path path) {
    final Expander expander = new DefaultExpander();
    final List<DSLMappingFile> dsls = getDSLMappingFiles(path);
    for (DSLMappingFile dsl : dsls) {
        expander.addDSLMapping(dsl.getMapping());
    }
    return expander;
}
Also used : DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) Expander(org.drools.compiler.lang.Expander) DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) DSLMappingFile(org.drools.compiler.lang.dsl.DSLMappingFile)

Aggregations

DefaultExpander (org.drools.compiler.lang.dsl.DefaultExpander)18 Test (org.junit.Test)11 Expander (org.drools.compiler.lang.Expander)7 DSLMappingFile (org.drools.compiler.lang.dsl.DSLMappingFile)7 DSLTokenizedMappingFile (org.drools.compiler.lang.dsl.DSLTokenizedMappingFile)7 IOException (java.io.IOException)6 StringReader (java.io.StringReader)6 DSLMappingEntry (org.drools.compiler.lang.dsl.DSLMappingEntry)6 InputStreamReader (java.io.InputStreamReader)5 Reader (java.io.Reader)5 ArrayList (java.util.ArrayList)2 Iterator (java.util.Iterator)1 DrlParser (org.drools.compiler.compiler.DrlParser)1 DroolsParserException (org.drools.compiler.compiler.DroolsParserException)1 ExpanderException (org.drools.compiler.lang.ExpanderException)1 CompositePackageDescr (org.drools.compiler.lang.descr.CompositePackageDescr)1 PackageDescr (org.drools.compiler.lang.descr.PackageDescr)1 DefaultDSLMapping (org.drools.compiler.lang.dsl.DefaultDSLMapping)1 DefaultExpanderResolver (org.drools.compiler.lang.dsl.DefaultExpanderResolver)1 DSLSentence (org.drools.workbench.models.datamodel.rule.DSLSentence)1