public void addDSLMapping(DSLMappingEntry entry) { DSLSentence sen = new DSLSentence(); sen.setDefinition(entry.getMappingKey()); if (entry.getSection() == DSLMappingEntry.CONDITION) { this.conditionDSLSentences.add(sen); } else if (entry.getSection() == DSLMappingEntry.CONSEQUENCE) { this.actionDSLSentences.add(sen); } else if (entry.getSection() == DSLMappingEntry.KEYWORD) { this.keywordDSLItems.add(sen); } else if (entry.getSection() == DSLMappingEntry.ANY) { this.anyScopeDSLItems.add(sen); } }
public void addDSLMapping(DSLMappingEntry entry) { DSLSentence sen = new DSLSentence(); sen.setDefinition(entry.getMappingKey()); if (entry.getSection() == DSLMappingEntry.CONDITION) { this.conditionDSLSentences.add(sen); } else if (entry.getSection() == DSLMappingEntry.CONSEQUENCE) { this.actionDSLSentences.add(sen); } else if (entry.getSection() == DSLMappingEntry.KEYWORD) { this.keywordDSLItems.add(sen); } else if (entry.getSection() == DSLMappingEntry.ANY) { this.anyScopeDSLItems.add(sen); } }
private void populateDSLSentences(final List<DSLTokenizedMappingFile> dsls) { for ( DSLTokenizedMappingFile file : dsls ) { for ( DSLMappingEntry entry : file.getMapping().getEntries() ) { if ( entry.getSection() == DSLMappingEntry.CONDITION ) { builder.addDSLConditionSentence( entry.getMappingKey() ); } else if ( entry.getSection() == DSLMappingEntry.CONSEQUENCE ) { builder.addDSLActionSentence( entry.getMappingKey() ); } else if ( entry.getSection() == DSLMappingEntry.KEYWORD ) { builder.addDSLMapping( entry ); } else if ( entry.getSection() == DSLMappingEntry.ANY ) { builder.addDSLConditionSentence( entry.getMappingKey() ); builder.addDSLActionSentence( entry.getMappingKey() ); } } } }
private void populateDSLSentences(final List<DSLTokenizedMappingFile> dsls) { for ( DSLTokenizedMappingFile file : dsls ) { for ( DSLMappingEntry entry : file.getMapping().getEntries() ) { if ( entry.getSection() == DSLMappingEntry.CONDITION ) { builder.addDSLConditionSentence( entry.getMappingKey() ); } else if ( entry.getSection() == DSLMappingEntry.CONSEQUENCE ) { builder.addDSLActionSentence( entry.getMappingKey() ); } else if ( entry.getSection() == DSLMappingEntry.KEYWORD ) { builder.addDSLMapping( entry ); } else if ( entry.getSection() == DSLMappingEntry.ANY ) { builder.addDSLConditionSentence( entry.getMappingKey() ); builder.addDSLActionSentence( entry.getMappingKey() ); } } } }
for ( final DSLMappingEntry entry : entries ) { Map<String, Integer> vars = entry.getVariables(); String mappingKey = entry.getMappingKey(); String vp = entry.getValuePattern(); Pattern kp = entry.getKeyPattern();
logger.info( "keyword: " + entry.getMappingKey() ); logger.info( " " + entry.getKeyPattern() ); logger.info( "when: " + entry.getMappingKey() ); logger.info( " " + entry.getKeyPattern() ); logger.info( "then: " + entry.getMappingKey() ); logger.info( " " + entry.getKeyPattern() );
when(mapping1.getMappingKey()).thenReturn("cond"); when(mapping2.getMappingKey()).thenReturn("cons"); when(mapping3.getMappingKey()).thenReturn("any"); when(mapping4.getMappingKey()).thenReturn("key");