protected String marshalRule( final RuleModel model ) {
boolean isDSLEnhanced = model.hasDSLSentences();
bindingsPatterns = new HashMap<String, IFactPattern>();
bindingsFields = new HashMap<String, FieldConstraint>();
StringBuilder buf = new StringBuilder();
this.marshalPackageHeader( model,
buf );
this.marshalRuleHeader( 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();
}