protected String marshalRule( RuleModel model ) { boolean isDSLEnhanced = model.hasDSLSentences(); bindingsPatterns = new HashMap<String, IFactPattern>(); bindingsFields = new HashMap<String, FieldConstraint>(); StringBuilder buf = new StringBuilder(); this.marshalHeader( model, buf ); this.marshalMetadata( buf, model ); this.marshalAttributes( buf, model ); buf.append( "\twhen\n" ); this.marshalLHS( buf, model, isDSLEnhanced ); buf.append( "\tthen\n" ); this.marshalRHS( buf, model, isDSLEnhanced ); this.marshalFooter( buf ); return buf.toString(); }
protected String marshalRule( RuleModel model ) { boolean isDSLEnhanced = model.hasDSLSentences(); bindingsPatterns = new HashMap<String, IFactPattern>(); bindingsFields = new HashMap<String, FieldConstraint>(); StringBuilder buf = new StringBuilder(); this.marshalHeader( model, buf ); this.marshalMetadata( buf, model ); this.marshalAttributes( buf, model ); buf.append( "\twhen\n" ); this.marshalLHS( buf, model, isDSLEnhanced ); buf.append( "\tthen\n" ); this.marshalRHS( buf, model, isDSLEnhanced ); this.marshalFooter( buf ); return buf.toString(); }