|
Oracle Business Rules Java API Reference 10g (10.1.3.1.0) B28966-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.util.AbstractMap
java.util.HashMap
oracle.rules.sdk.editor.ruleset.RuleComponent
oracle.rules.sdk.editor.ruleset.Pattern
A Pattern contains the alias of a FactType and tests which select instances of the FactType.
Tests can be expressed either as a table of SimpleTest
s or as a String containing an AdvancedExpression
.
A VariableName is used to refer to a fact instance in a pattern test or an action. Its use is optional unless the PatternTable has two FactPatterns of the same FactType. The VariableName defaults to the alias of the FactType.
By default, the Pattern Operator is set to OPERATOR_FORALL, meaning that the Pattern will select all matching fact instances. The Operator property can also be set to OPERATOR_IFANY, OPERATOR_NOTANY, which stop as soon as the Pattern is matched once.
Multiple Patterns can be combined in a PatternTable
by setting conjunctions which follow each Pattern, for example pattern.setConjunction (Pattern.CONJUNCTION_OR). By default, the Patterns are ANDed.
By default, the Patterns in a PatternTable are AND'ed.
Patterns can be grouped by setting the Form attribute to FORM_NESTED_TABLE. As in RL, groups may have their own operators. For example, the RL pattern expression "A and exists (B and C)" would be represented in the Rule PatternTable with two rows, the first of FORM_FACT_TYPE for A, and the second of FORM_NESTED_TABLE. The nested table would have two rows, one for B and one for C. The exists would be represented by placing OPERATOR_IF_ANY on the nested pattern table, since it applies to the table.
When FORM_NESTED_TABLE is used, FACT_TYPE, VARIABLE, and TEST_FORM properties are ignored, and will not be persisted.
The Operator property will be applied to the entire nested table. The Conjunction property controls the conjunction generated after the nested table.
For example Assume three pattern entries, and one nested table.
PatternTable 1: row 0 Form: FactType FactType: A Conjunction: && row 1 Form: Nested Table Operator: If there is no Conjunction: && NestedPatternTable 1: row 0 Form: FactType FactType: C Conjunction: || row 1 Form: FactType FactType: D row 2 Form: FactType FactType: B would result in a Condition of the form: A && !(C || D) && B
Field Summary | |
static java.lang.String |
CONJUNCTION_AND Use with Conjunction properties. |
static java.lang.String |
CONJUNCTION_OR |
static java.lang.String[] |
CONJUNCTIONS |
static java.lang.String |
FORM_FACT_TYPE Use with Pattern Form. |
static java.lang.String |
FORM_NESTED_TABLE |
static java.lang.String[] |
FORMS |
static java.lang.String |
OPERATOR_FORALL Use with Pattern Operator. |
static java.lang.String |
OPERATOR_IFANY |
static java.lang.String |
OPERATOR_NOTANY |
static java.lang.String[] |
OPERATORS |
static java.lang.String |
PROP_ADVANCED_EXPRESSION |
static java.lang.String |
PROP_CONJUNCTION |
static java.lang.String |
PROP_FACT_TYPE |
static java.lang.String |
PROP_FORM |
static java.lang.String |
PROP_NESTED_TABLE |
static java.lang.String |
PROP_OPERATOR |
static java.lang.String |
PROP_SIMPLE_TEST_TABLE |
static java.lang.String |
PROP_TEST_FORM |
static java.lang.String |
PROP_VARIABLE |
static java.lang.String |
TEST_FORM_ADVANCED |
static java.lang.String |
TEST_FORM_NOTEST Specifies test form. |
static java.lang.String |
TEST_FORM_SIMPLE |
Method Summary | |
java.lang.Object |
get(java.lang.Object key) Generic property getter inheirited from RuleComponent . |
AdvancedExpression |
getAdvancedExpression() Get AdvancedExpression for checking syntax and creating option lists |
java.lang.String |
getConjunction() Get conjunction which combines this Pattern with the following Pattern, if any. |
java.lang.String |
getConjunctionConstraint() |
java.lang.String[] |
getConjunctionOptions() |
int |
getConjunctionSelected() |
java.lang.String |
getFactType() Get the alias of the fact type. |
java.lang.String |
getFactTypeConstraint() |
java.lang.String[] |
getFactTypeOptions() |
int |
getFactTypeSelected() |
java.lang.String |
getForm() Get Form describing whether this Pattern simple fact type or a subtable of fact types. |
java.lang.String |
getFormConstraint() |
java.lang.String[] |
getFormOptions() |
int |
getFormSelected() |
PatternTable |
getNestedTable() Get the the Pattern subtable when Form is FORM_NESTED_TABLE. |
java.lang.String |
getOperator() Get Pattern operator. |
java.lang.String |
getOperatorConstraint() |
java.lang.String[] |
getOperatorOptions() |
int |
getOperatorSelected() |
java.lang.String[] |
getPropertyNames() |
Expression |
getSimpleTestLeft(int i) Shorthand for getSimpleTestTable.getSimpleTest(i).getLeft() |
java.lang.String |
getSimpleTestOperator(int i) Shorthand for getSimpleTestTable.getSimpleTest(i).getOperator() |
Expression |
getSimpleTestRight(int i) Shorthand for getSimpleTestTable.getSimpleTest(i).getRight() |
SimpleTestTable |
getSimpleTestTable() Get the table of tests for this Pattern. |
java.lang.String |
getTestForm() |
java.lang.String |
getTestFormConstraint() |
java.lang.String[] |
getTestFormOptions() |
int |
getTestFormSelected() |
java.lang.String |
getVariable() |
java.lang.String |
getVariableConstraint() |
java.lang.String[] |
getVariableOptions() |
int |
getVariableSelected() |
java.lang.Object |
put(java.lang.Object key, java.lang.Object value) Generic property setter. |
void |
setConjunction(java.lang.String conjunction) Set conjunction which combines this Pattern with the following Pattern, if any. |
void |
setConjunctionConstraint(java.lang.String conjunctionConstraint) |
void |
setConjunctionOptions(java.lang.String[] conjunctionOptions) |
void |
setFactType(java.lang.String factType) Set the alias of the fact type. |
void |
setFactTypeConstraint(java.lang.String factTypeConstraint) |
void |
setFactTypeOptions(java.lang.String[] factTypeOptions) |
void |
setForm(java.lang.String form) Set Form describing whether this Pattern simple fact type or a subtable of fact types. |
void |
setFormConstraint(java.lang.String formConstraint) |
void |
setFormOptions(java.lang.String[] formOptions) |
void |
setOperator(java.lang.String operator) Set Pattern operator. |
void |
setOperatorConstraint(java.lang.String operatorConstraint) |
void |
setOperatorOptions(java.lang.String[] operatorOptions) |
void |
setTestForm(java.lang.String testForm) |
void |
setTestFormConstraint(java.lang.String testFormConstraint) |
void |
setTestFormOptions(java.lang.String[] testFormOptions) |
void |
setVariable(java.lang.String variable) |
void |
setVariableConstraint(java.lang.String variableConstraint) |
void |
setVariableOptions(java.lang.String[] variableOptions) |
void |
validate() Validates the correctness of the RuleComponent and all RuleComponents below it. |
Methods inherited from class oracle.rules.sdk.editor.ruleset.RuleComponent |
clear, discardCopy, get, getConstraint, getConstraintList, getCustom, getDescription, getID, getOptions, getParent, getParentTable, getRange, getRuleDictionary, getSelected, remove, restoreCopy, saveCopy, setCustom, setDescription, setRuleDictionary, toString |
Methods inherited from class java.util.HashMap |
clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Field Detail |
public static final java.lang.String FORM_FACT_TYPE
public static final java.lang.String FORM_NESTED_TABLE
public static final java.lang.String[] FORMS
public static final java.lang.String OPERATOR_FORALL
OPERATOR_FORALL corresponds to RL no pattern operator OPERATOR_IFANY corresponds to RL exists pattern operator OPERATOR_NOTANY corresponds to RL not pattern operator
public static final java.lang.String OPERATOR_IFANY
public static final java.lang.String OPERATOR_NOTANY
public static final java.lang.String[] OPERATORS
public static final java.lang.String CONJUNCTION_AND
public static final java.lang.String CONJUNCTION_OR
public static final java.lang.String[] CONJUNCTIONS
public static final java.lang.String TEST_FORM_NOTEST
public static final java.lang.String TEST_FORM_SIMPLE
public static final java.lang.String TEST_FORM_ADVANCED
public static final java.lang.String PROP_FORM
public static final java.lang.String PROP_FACT_TYPE
public static final java.lang.String PROP_TEST_FORM
public static final java.lang.String PROP_SIMPLE_TEST_TABLE
public static final java.lang.String PROP_ADVANCED_EXPRESSION
public static final java.lang.String PROP_VARIABLE
public static final java.lang.String PROP_OPERATOR
public static final java.lang.String PROP_CONJUNCTION
public static final java.lang.String PROP_NESTED_TABLE
Method Detail |
public java.lang.Object get(java.lang.Object key)
RuleComponent
RuleComponent
.
Please see the specific bean class for a list of properties.
get
in interface java.util.Map
get
in class RuleComponent
key
- a String containing the property name to be fetched.public java.lang.Object put(java.lang.Object key, java.lang.Object value)
RuleComponent
A put() with either null key or null value throws a NullPointerException.
A put() with a key that is not a String throws a ClassCastException
A put() of a value that is not of the correct type for the key throws a ClassCastException.
Bean properties which have no set() method are read only, and cannot be modified using the put(). Attempting to do so throws a runtime IllegalArgumentException. PROP_ID, and PROP_*_SELECTED are always read only.
put
in interface java.util.Map
put
in class RuleComponent
key
- the key of the property to setvalue
- the value of the named property to setpublic Expression getSimpleTestLeft(int i)
i
- ordinal of SimpleTest to retrieve from SimpleTestTablejava.lang.IndexOutOfBoundsException
public Expression getSimpleTestRight(int i)
i
- ordinal of SimpleTest to retrieve from SimpleTestTablejava.lang.IndexOutOfBoundsException
public java.lang.String getSimpleTestOperator(int i)
i
- ordinal of SimpleTest to retrieve from SimpleTestTablejava.lang.IndexOutOfBoundsException
public void validate() throws RuleEditorException, RuleEditorSDKException
RuleComponent
validate
in class RuleComponent
RuleEditorSDKException
- incorrect SDK usageRuleEditorException
- for user input errorspublic java.lang.String[] getPropertyNames()
getPropertyNames
in class RuleComponent
public java.lang.String getForm()
FORM_FACT_TYPE
public void setForm(java.lang.String form)
FORM_FACT_TYPE
public java.lang.String getFormConstraint()
public void setFormConstraint(java.lang.String formConstraint)
public java.lang.String[] getFormOptions()
public void setFormOptions(java.lang.String[] formOptions)
public int getFormSelected()
public java.lang.String getFactType()
public void setFactType(java.lang.String factType)
public java.lang.String getFactTypeConstraint()
public void setFactTypeConstraint(java.lang.String factTypeConstraint)
public java.lang.String[] getFactTypeOptions()
public void setFactTypeOptions(java.lang.String[] factTypeOptions)
public int getFactTypeSelected()
public java.lang.String getTestForm()
public void setTestForm(java.lang.String testForm)
public java.lang.String getTestFormConstraint()
public void setTestFormConstraint(java.lang.String testFormConstraint)
public java.lang.String[] getTestFormOptions()
public void setTestFormOptions(java.lang.String[] testFormOptions)
public int getTestFormSelected()
public SimpleTestTable getSimpleTestTable()
SimpleTest
public AdvancedExpression getAdvancedExpression()
public java.lang.String getVariable()
public void setVariable(java.lang.String variable)
public java.lang.String getVariableConstraint()
public void setVariableConstraint(java.lang.String variableConstraint)
public java.lang.String[] getVariableOptions()
public void setVariableOptions(java.lang.String[] variableOptions)
public int getVariableSelected()
public java.lang.String getOperator()
OPERATOR_FORALL
. Defaults to OPERATOR_FORALLpublic void setOperator(java.lang.String operator)
OPERATOR_FORALL
. Defaults to OPERATOR_FORALLpublic java.lang.String getOperatorConstraint()
public void setOperatorConstraint(java.lang.String operatorConstraint)
public java.lang.String[] getOperatorOptions()
public void setOperatorOptions(java.lang.String[] operatorOptions)
public int getOperatorSelected()
public java.lang.String getConjunction()
Util.CONJUNCTION_AND
. Defaults to CONJUNCTION_AND.public void setConjunction(java.lang.String conjunction)
Util.CONJUNCTION_AND
. Defaults to CONJUNCTION_AND.public java.lang.String getConjunctionConstraint()
public void setConjunctionConstraint(java.lang.String conjunctionConstraint)
public java.lang.String[] getConjunctionOptions()
public void setConjunctionOptions(java.lang.String[] conjunctionOptions)
public int getConjunctionSelected()
public PatternTable getNestedTable()
|
Oracle Business Rules Java API Reference 10g (10.1.3.1.0) B28966-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |