org.drools.workbench.models.commons.backend.rule
Class BRDRLPersistence
java.lang.Object
org.drools.workbench.models.commons.backend.rule.BRDRLPersistence
- All Implemented Interfaces:
- BRLPersistence
public class BRDRLPersistence
- extends Object
- implements BRLPersistence
This class persists the rule model to DRL and back
|
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 |
marshalAttributes(StringBuilder buf,
RuleModel model)
Marshal model attributes |
protected void |
marshalFooter(StringBuilder buf)
|
protected void |
marshalLHS(StringBuilder buf,
RuleModel model,
boolean isDSLEnhanced)
Marshal LHS patterns |
protected void |
marshalMetadata(StringBuilder buf,
RuleModel model)
Marshal model metadata |
protected void |
marshalPackageHeader(RuleModel model,
StringBuilder buf)
|
protected void |
marshalRHS(StringBuilder buf,
RuleModel model,
boolean isDSLEnhanced)
|
protected String |
marshalRule(RuleModel model)
|
protected void |
marshalRuleHeader(RuleModel model,
StringBuilder buf)
|
protected String |
marshalRuleName(RuleModel model)
|
RuleModel |
unmarshal(String str)
|
RuleModel |
unmarshalUsingDSL(String str,
List<String> globals,
String... dsls)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
BRDRLPersistence
protected BRDRLPersistence()
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)
marshalPackageHeader
protected void marshalPackageHeader(RuleModel model,
StringBuilder buf)
marshalRuleHeader
protected void marshalRuleHeader(RuleModel model,
StringBuilder buf)
marshalRuleName
protected String marshalRuleName(RuleModel model)
marshalAttributes
protected void marshalAttributes(StringBuilder buf,
RuleModel model)
- Marshal model attributes
- Parameters:
buf - model -
marshalMetadata
protected void marshalMetadata(StringBuilder buf,
RuleModel model)
- Marshal model metadata
- Parameters:
buf - model -
marshalLHS
protected void marshalLHS(StringBuilder buf,
RuleModel model,
boolean isDSLEnhanced)
- Marshal LHS patterns
- Parameters:
buf - model -
getLHSPatternVisitor
protected BRDRLPersistence.LHSPatternVisitor getLHSPatternVisitor(boolean isDSLEnhanced,
StringBuilder buf,
String nestedIndentation,
boolean isNegated)
marshalRHS
protected void marshalRHS(StringBuilder buf,
RuleModel model,
boolean isDSLEnhanced)
getRHSActionVisitor
protected BRDRLPersistence.RHSActionVisitor getRHSActionVisitor(boolean isDSLEnhanced,
StringBuilder buf,
String indentation)
unmarshal
public RuleModel unmarshal(String str)
- Specified by:
unmarshal in interface BRLPersistence
- See Also:
BRLPersistence.unmarshal(String)
unmarshalUsingDSL
public RuleModel unmarshalUsingDSL(String str,
List<String> globals,
String... dsls)
- Specified by:
unmarshalUsingDSL in interface BRLPersistence
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.