/** * Add the new mapping to this expander. * * @param mapping */ public void addDSLMapping(final DSLMapping mapping) { for ( DSLMappingEntry entry : mapping.getEntries() ) { if ( DSLMappingEntry.KEYWORD.equals( entry.getSection() ) ) { this.keywords.add( entry ); } else if ( DSLMappingEntry.CONDITION.equals( entry.getSection() ) ) { this.condition.add( entry ); } else if ( DSLMappingEntry.CONSEQUENCE.equals( entry.getSection() ) ) { this.consequence.add( entry ); } else { // if any, then add to them both condition and consequence this.condition.add( entry ); this.consequence.add( entry ); } } if ( mapping.getOption( "result" ) ) showResult = true; if ( mapping.getOption( "steps" ) ) showSteps = true; if ( mapping.getOption( "keyword" ) ) showKeyword = true; if ( mapping.getOption( "when" ) ) showWhen = true; if ( mapping.getOption( "then" ) ) showThen = true; if ( mapping.getOption( "usage" ) ) showUsage = true; }