org.drools.ide.common.server.util
Class BRDRLPersistence

java.lang.Object
  extended by org.drools.ide.common.server.util.BRDRLPersistence
All Implemented Interfaces:
BRLPersistence
Direct Known Subclasses:
GuidedDTBRDRLPersistence

public class BRDRLPersistence
extends Object
implements BRLPersistence

This class persists the rule model to DRL and back


Nested Class Summary
static class BRDRLPersistence.LHSPatternVisitor
           
static class BRDRLPersistence.RHSActionVisitor
           
static class BRDRLPersistence.RHSClassDependencyVisitor
           
 
Field Summary
protected  Map<String,FieldConstraint> bindingsFields
           
protected  Map<String,IFactPattern> bindingsPatterns
           
protected  DRLConstraintValueBuilder constraintValueBuilder
           
static String DEFAULT_DIALECT
           
 
Constructor Summary
protected BRDRLPersistence()
           
 
Method Summary
static BRLPersistence getInstance()
           
protected  BRDRLPersistence.LHSPatternVisitor getLHSPatternVisitor(boolean isDSLEnhanced, StringBuilder buf, String nestedIndentation, boolean isNegated)
           
protected  BRDRLPersistence.RHSActionVisitor getRHSActionVisitor(boolean isDSLEnhanced, StringBuilder buf, String indentation)
           
 String marshal(RuleModel model)
           
protected  void marshalFooter(StringBuilder buf)
           
protected  void marshalHeader(RuleModel model, StringBuilder buf)
           
protected  String marshalRule(RuleModel model)
           
protected  String marshalRuleName(RuleModel model)
           
 RuleModel unmarshal(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DIALECT

public static final String DEFAULT_DIALECT
See Also:
Constant Field Values

constraintValueBuilder

protected DRLConstraintValueBuilder constraintValueBuilder

bindingsPatterns

protected Map<String,IFactPattern> bindingsPatterns

bindingsFields

protected Map<String,FieldConstraint> bindingsFields
Constructor Detail

BRDRLPersistence

protected BRDRLPersistence()
Method Detail

getInstance

public static BRLPersistence getInstance()

marshal

public String marshal(RuleModel model)
Specified by:
marshal in interface BRLPersistence

marshalRule

protected String marshalRule(RuleModel model)

marshalFooter

protected void marshalFooter(StringBuilder buf)

marshalHeader

protected void marshalHeader(RuleModel model,
                             StringBuilder buf)

marshalRuleName

protected String marshalRuleName(RuleModel model)

unmarshal

public RuleModel unmarshal(String str)
Specified by:
unmarshal in interface BRLPersistence
See Also:
BRLPersistence.unmarshal(java.lang.String)

getLHSPatternVisitor

protected BRDRLPersistence.LHSPatternVisitor getLHSPatternVisitor(boolean isDSLEnhanced,
                                                                  StringBuilder buf,
                                                                  String nestedIndentation,
                                                                  boolean isNegated)

getRHSActionVisitor

protected BRDRLPersistence.RHSActionVisitor getRHSActionVisitor(boolean isDSLEnhanced,
                                                                StringBuilder buf,
                                                                String indentation)


Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.