@Test public void summarize_whole() { DmdlSemantics resolved = resolve(); ModelDeclaration counter = resolved.findModelDeclaration("counter"); assertThat(counter, not(nullValue())); PropertyDeclaration count = counter.findPropertyDeclaration("count"); assertThat(count, not(nullValue())); assertThat(count.getType(), is(type(BasicTypeKind.LONG))); SummarizeTrait trait = counter.getTrait(SummarizeTrait.class); assertThat(trait, not(nullValue())); assertThat(trait.getTerms().size(), is(1)); ReduceTerm<AstSummarize> aTerm = trait.getTerms().get(0); assertThat(aTerm.getSource(), is(model("simple"))); assertThat(aTerm.getGrouping().size(), is(0)); assertThat(aTerm.getMappings(), has(mapping(PropertyMappingKind.COUNT, "sid", "count"))); }
public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve();  }