Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1.6.3)

E10663-10


oracle.rules.sdk2.decisiontable
Class DimensionNode

java.lang.Object
  extended by oracle.rules.sdk2.dictionary.DictionaryObject
      extended by oracle.rules.sdk2.dictionary.DictionaryComponent
          extended by oracle.rules.sdk2.ruleset.RuleComponent
              extended by oracle.rules.sdk2.ruleset.UnnamedRuleComponent
                  extended by oracle.rules.sdk2.decisiontable.DimensionNode

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, UnnamedComponent

public class DimensionNode
extends UnnamedRuleComponent

A DimensionNode stores the dimension values for a "cell" in the decision table. A DimensionNode references one or more buckets from its Dimension's BucketSet.

A DimensionNode's parent can be either a Dimension or a DTRule. We call these nodes dimDNs and ruleDNs. In effect, Dimension nodes are duplicated, but the number of dimDNs is often less that the number of ruleDNs, because the dimDNs form a tree. A dimDN references its parent (a DimensionNode in the previous Dimension) and references its children using an IDTable<DimensionNode> containing dimDNs in the next Dimension in the dimension tree.

DimensionNodes with multiple buckets can be split into sibling nodes each with a single bucket. In an unordered rulesheet, dimDNs with multiple children can be split into sibling nodes each with a single child.

Sibling nodes can be merged by merging their bucket values and their children. The children are ordered by bucket value and duplicates are recursively merged, down to and including the action nodes. Sibling nodes can also be compacted. Compaction will not merge unequal action nodes. In an unordered rulesheet, nodes in the same dimension and in a contiguous range of rules can be merged by replacement with a single dimension node with merged bucket values and concatenated child lists.

In an ordered rulesheet, Dimension nodes are sorted according the the order of buckets in their bucketset. Don't know (?) sorts low. Don't care (-) sorts high. Single values sort lower than multi-values, e.g. 1 is less than 1,2 is less than 2.

See Also:
Serialized Form

Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
DictionaryComponent.Diff, DictionaryComponent.DiffType

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

Field Summary
static java.lang.String ALL_VALUES_STRING
           
static java.lang.String UNKNOWN_VALUE_STRING
           

 

Fields inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
PROP_ACCESS, PROP_ACTION_SELECTED, PROP_ACTION_TABLE, PROP_ACTIVE, PROP_ADVANCED_MODE, PROP_AGGREGATE, PROP_AGGREGATE_TABLE, PROP_ALIAS, PROP_ALLOW_GAPS, PROP_ALWAYS_SELECTED, PROP_ARRAY, PROP_ARRAY_COMPONENT_TYPE, PROP_ARRAY_COMPONENT_TYPE_ID, PROP_ARRAY_FACT_TYPE_TABLE, PROP_AUTO_CONFLICT_RESOLUTION, PROP_AUTO_PATTERN_PROPERTY, PROP_BODY, PROP_BUCKET_ID_TABLE, PROP_BUCKET_SET, PROP_BUCKET_SET_ID, PROP_BUCKET_SET_TABLE, PROP_BUCKET_TABLE, PROP_CALENDAR_FORM, PROP_CHECK_RULE_FLOW, PROP_CHILD_DIMENSION_NODES, PROP_CONFLICT, PROP_CONFLICT_POLICY, PROP_CONNECTIVE, PROP_CONSTANT, PROP_CONSTRUCTOR, PROP_CONSTRUCTOR_TABLE, PROP_CREATION_UPDATE_NUMBER, PROP_CURSOR_POSITION, PROP_CUSTOM_BINDING, PROP_CUSTOMIZABLE, PROP_CUSTOMIZABLE_TEMPLATE, PROP_DATA_MODEL, PROP_DATA_SOURCE, PROP_DECISION_FUNCTION, PROP_DECISION_FUNCTION_INPUT_TABLE, PROP_DECISION_FUNCTION_OUTPUT_TABLE, PROP_DECISION_FUNCTION_RULESET_TABLE, PROP_DECISION_FUNCTION_TABLE, PROP_DESCRIPTION, PROP_DICTIONARY_LINK_TABLE, PROP_DIMENSION_NODE_TABLE, PROP_DIMENSION_TABLE, PROP_DT_ACTION_NODE_TABLE, PROP_DT_ACTION_PARAMETER_NAME, PROP_DTACTION_TABLE, PROP_DTRULE_TABLE, PROP_EFFECTIVE_END_DATE, PROP_EFFECTIVE_START_DATE, PROP_ENUM, PROP_ENUM_BUCKET_SET_ID, PROP_ENUM_TYPE, PROP_EXCEPTION_IDS, PROP_EXCEPTIONS, PROP_EXCLUDED, PROP_EXPRESSION, PROP_EXPRESSION_TABLE, PROP_FACT_PATH, PROP_FACT_PATH_IDS, PROP_FACT_TYPE, PROP_FACT_TYPE_ID, PROP_FACT_TYPE_TABLE, PROP_FIELD_TABLE, PROP_FINAL, PROP_FORM, PROP_FORMAL_PARAMETER_TABLE, PROP_FUNCTION, PROP_FUNCTION_ID, PROP_FUNCTION_SIGNATURE, PROP_FUNCTION_TABLE, PROP_GENERATED_FROM, PROP_ID, PROP_ID_COUNTER, PROP_INCLUDED, PROP_INTERFACE, PROP_INTERFACE_IDS, PROP_INTERFACES, PROP_IS_ABSTRACT, PROP_IS_CONSTANT, PROP_IS_ENUM, PROP_IS_FINAL, PROP_IS_JAXB2, PROP_IS_PRIMARY_KEY, PROP_IS_STATIC, PROP_IS_TOPLEVEL_VIEW_OBJECT, PROP_LEFT, PROP_LIFECYCLE, PROP_LIFECYCLE_DESCRIPTION, PROP_LIST, PROP_LIST_CONTENT_TYPE, PROP_LIST_CONTENT_TYPE_ID, PROP_LOCAL, PROP_LOGICAL, PROP_METHOD_TABLE, PROP_MODIFIERS, PROP_NAME, PROP_NAMESPACE, PROP_NESTED_TABLE, PROP_NO_CONFLICT, PROP_NODE_NAME, PROP_OPERATOR, PROP_OPERATOR_ID, PROP_ORDER_RULES_BY_BUCKET, PROP_OTHERWISE, PROP_OUTPUT_TYPES, PROP_OVERLOADED_PARAMETER_TABLE, PROP_OVERRIDDEN_BY, PROP_OVERRIDE, PROP_PACKAGE, PROP_PARAMETER_ALIAS, PROP_PARAMETER_ID, PROP_PARAMETER_LIST, PROP_PARAMETER_NAME, PROP_PARAMETER_REQUIRED, PROP_PARAMETER_TYPE_IDS, PROP_PARAMETER_TYPES, PROP_PARENT_DIMENSION_NODE, PROP_PATTERN_TABLE, PROP_PREFIX_LINKED_NAMES, PROP_PRIORITY, PROP_PRIVATE_BUCKET_SET, PROP_PROPERTIES, PROP_PROPERTY_TABLE, PROP_READABLE, PROP_REF_ID, PROP_REPORT_BYUSE_NAMES, PROP_REPORT_PATTERNS, PROP_RESOLVED_TARGET, PROP_RESOLVED_VALUE, PROP_RETURN_TYPE, PROP_RIGHT, PROP_RIGHT_SEPARATOR, PROP_RULE_FIRING_LIMIT, PROP_RULE_REPORT_TABLE, PROP_RULE_SET_TABLE, PROP_RULE_SHEET_TABLE, PROP_RULE_TABLE, PROP_RULESET, PROP_RUN_AFTER, PROP_RUN_BEFORE, PROP_SERVICE_CONFIGURATION, PROP_SERVICE_NAME, PROP_SERVICE_NAMESPACE, PROP_SHARED_BUCKET_SET, PROP_SHARED_BUCKET_SET_ID, PROP_SHOW_CONSTANTS, PROP_SHOW_FUNCTIONS, PROP_SHOW_VARIABLES, PROP_SIMPLE_TEST_TABLE, PROP_SOURCE, PROP_STATELESS, PROP_STATIC, PROP_SUPER_CLASS, PROP_SUPER_CLASS_ID, PROP_SUPPORT_XPATH, PROP_SUPPORTS_XPATH_ENABLED, PROP_SYSTEM, PROP_TARGET, PROP_TARGET_PACKAGE, PROP_TEST_FORM, PROP_TIMESTAMP, PROP_TOKEN_UNDER_CURSOR, PROP_TREE, PROP_TREE_MODE, PROP_TYPE, PROP_TYPE_ID, PROP_TYPE_IDS, PROP_TYPES, PROP_UPDATE_NUMBER, PROP_VALIDATION_UPDATE_NUMBER, PROP_VALUE, PROP_VALUES, PROP_VARIABLE, PROP_VARIABLE_TABLE, PROP_VERSION, PROP_VISIBILITY_FILTER, PROP_VISIBILITY_FILTER_ENABLED, PROP_VISIBLE, PROP_WEB_SERVICE, PROP_WRITABLE, PROP_XML_NAME

 

Method Summary
 boolean canMerge(DimensionNode sibling)
          Test whether this node can be merged with its sibling.
 boolean canSpan(DimensionNode sibling)
          Test if this node and its sibling can be spanned.
 boolean canSplit()
          Test whether this node can be split
 boolean canUnspan()
          Test whether this node can be unspanned.
 void compact()
          Merge all child DimensionNodes but do not merge non-identical actions.
 void forceSync()
           
 IDTable<Bucket> getBuckets()
          Get DimensionNode Buckets.
 BucketSet getBucketSet()
          Get BucketSet.
 IDTableProperty<Bucket> getBucketsProperty()
           
 DTActionNode getChildActionNode()
          Deprecated. the returned DTActionNode is in the deprecated DTActionNodeTable of the first DTAction
 IDTable<DimensionNode> getChildDimensionNodes()
          Get DimensionNode IDTable of child dimension nodes below this Dimension Node in the next Dimension.
 DimensionNode getDimDN()
           
 Dimension getDimension()
          Get Dimension to whom this DimensionNode belongs.
 DimensionNode getParentDimensionNode()
          Get parent DimensionNode, i.e., the node above this DimensionNode from the previous Dimension
 int[] getSelected()
           
 java.lang.String[] getValueOptions()
           
 java.lang.String[] getValues()
          Get dimension values of DimensionNode.
 java.lang.String getValuesAsString(java.lang.String[] values)
          Get possibly multiple values as a comma separated String
 java.lang.String[] getValuesFromString(java.lang.String values)
          Parse possibly multiple values from comma separated string
 void getValuesFromString(java.lang.String values, java.util.List<java.lang.String> existingValues, java.util.List<java.lang.String> newValues)
          Parse possibly multiple values from comma separated string
 int maxRuleIndex()
          return maximum rule index of rules including this node.
 void merge()
          Merge all child DimensionNodes and actions.
 void merge(boolean deep)
          Deprecated. use DimensionNode.merge(), DimensionNode.compact(), or DimensionNode.span()
 void merge(DimensionNode sibling)
          Merge with sibling DimensionNode.
 int minRuleIndex()
          return minimum rule index of rules including this node.
 boolean removeActionlessRules()
          Remove rules that include this dimension node with no actions selected
 boolean sameBuckets(DimensionNode dn)
          Does this node have the same buckets as the given node?
 void setParentDimensionNode(DimensionNode parent)
          set parent DimensionNode
 void setValues(java.lang.String... values)
          Set dimension values of DimensionNode.
 void span()
          Span all child DimensionNodes (must have sameBucket).
 void span(DimensionNode next)
          Span DimensionNodes.
 void split()
          split this DimensionNode into siblings such that this node and new siblings each have a single bucket value.
 void unspan()
          split this DimensionNode into siblings such that each has one child.

 

Methods inherited from class oracle.rules.sdk2.ruleset.UnnamedRuleComponent
init, isAliasDistinct, isNameDistinct

 

Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent
get, getParent, getParentTable, parentAction, parentActionContext, parentFunction, parentPattern, parentRule, parentRuleCommon, parentRuleSheet, parentVariable, RHSRuleVariables

 

Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
clear, containsKey, containsValue, entrySet, get, getAlias, getAlias, getAliasProperty, getAllReferences, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getIndex, getIndex, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, isEmpty, isFullyQualifiedName, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, validate, values

 

Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject
equals, exists, getAEReferences, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validate

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.rules.sdk2.dictionary.UnnamedComponent
getAlias, getName, getPropertyNames, setAlias, setName

 

Methods inherited from interface java.util.Map
equals, hashCode

 

Field Detail

ALL_VALUES_STRING

public static final java.lang.String ALL_VALUES_STRING
See Also:
Constant Field Values

UNKNOWN_VALUE_STRING

public static final java.lang.String UNKNOWN_VALUE_STRING
See Also:
Constant Field Values

Method Detail

getDimDN

public DimensionNode getDimDN()

getBucketSet

public BucketSet getBucketSet()
Get BucketSet. DimensionNode always shows the Dimension BucketSet in its picklist
Returns:
BucketSet of this DimensionNode's Dimension

getBucketsProperty

public IDTableProperty<Bucket> getBucketsProperty()

getBuckets

public IDTable<Bucket> getBuckets()
Get DimensionNode Buckets. An empty table denotes ALL buckets (i.e. "don't care", denoted "-")
Returns:
IDTable<Bucket> table of buckets denoted by this DimensionNode

getValues

public java.lang.String[] getValues()
Get dimension values of DimensionNode. values are names of buckets.
Returns:
dimension values

getValueOptions

public java.lang.String[] getValueOptions()

getValuesFromString

public java.lang.String[] getValuesFromString(java.lang.String values)
Parse possibly multiple values from comma separated string
Parameters:
values -
Returns:
String[] of existing bucket aliases

getValuesFromString

public void getValuesFromString(java.lang.String values,
                                java.util.List<java.lang.String> existingValues,
                                java.util.List<java.lang.String> newValues)
Parse possibly multiple values from comma separated string
Parameters:
values -
existingValues - returned existing bucket aliases
newValues - returned new bucket aliases

getValuesAsString

public java.lang.String getValuesAsString(java.lang.String[] values)
Get possibly multiple values as a comma separated String
Parameters:
values -
Returns:
String

setValues

public void setValues(java.lang.String... values)
Set dimension values of DimensionNode.
Parameters:
values - names of buckets

getSelected

public int[] getSelected()

getDimension

public Dimension getDimension()
Get Dimension to whom this DimensionNode belongs.
Returns:
dimension

getParentDimensionNode

public DimensionNode getParentDimensionNode()
Get parent DimensionNode, i.e., the node above this DimensionNode from the previous Dimension
Returns:
DimensionNode or null if first dimension or this is a node from the dimension node table of a rule

setParentDimensionNode

public void setParentDimensionNode(DimensionNode parent)
set parent DimensionNode
Parameters:
parent - TODO: validate correct Dimension

getChildDimensionNodes

public IDTable<DimensionNode> getChildDimensionNodes()
Get DimensionNode IDTable of child dimension nodes below this Dimension Node in the next Dimension. Last Dimension does not have child dimension nodes.
Returns:
DimensionNodeTable, empty if last Dimension or this is a node from the dimension node table of a rule

getChildActionNode

@Deprecated
public DTActionNode getChildActionNode()
Deprecated. the returned DTActionNode is in the deprecated DTActionNodeTable of the first DTAction
Get the child DTActionNode below this DimensionNode. This node must be in the last Dimension to have a child action node.
Returns:
DTActionNode or null if not last dimension or no actions

merge

@Deprecated
public void merge(boolean deep)
           throws SDKException
Deprecated. use DimensionNode.merge(), DimensionNode.compact(), or DimensionNode.span()
Merge all child DimensionNodes, with or without merging actions.
Throws:
SDKException
See Also:
RuleSheet.merge(List, boolean).

merge

public void merge()
Merge all child DimensionNodes and actions.
See Also:
RuleSheet.merge(List).

compact

public void compact()
Merge all child DimensionNodes but do not merge non-identical actions.
See Also:
RuleSheet.compact(List).

span

public void span()
Span all child DimensionNodes (must have sameBucket).
See Also:
RuleSheet.span(List).

merge

public void merge(DimensionNode sibling)
Merge with sibling DimensionNode. Siblings are merged by combining the dimension values from the sibling into this node, and coalescing combined children. If unordered, span the nodes -- nodes must be contiguous and have same buckets
Parameters:
sibling - the DimensionNode to merge with this
See Also:
for more merge options.

span

public void span(DimensionNode next)
Span DimensionNodes. Next must be next in its DimensionNodeTable and have sameBuckets
Parameters:
next - the DimensionNode to span with this
Throws:
java.lang.IllegalArgumentException - if DT is ordered

canMerge

public boolean canMerge(DimensionNode sibling)
Test whether this node can be merged with its sibling. True iff the argument is a sibling of this node.
Parameters:
sibling -

canSpan

public boolean canSpan(DimensionNode sibling)
Test if this node and its sibling can be spanned. True iff the DT is not ordered, the argument is a sibling, the nodes are not in the last dimension, the nodes have the same buckets, and the nodes are adjacent.
Parameters:
sibling -

split

public void split()
split this DimensionNode into siblings such that this node and new siblings each have a single bucket value. All siblings have identical child nodes.

unspan

public void unspan()
split this DimensionNode into siblings such that each has one child. All siblings have identical buckets.
Throws:
java.lang.IllegalArgumentException - if DT is ordered

canSplit

public boolean canSplit()
Test whether this node can be split

canUnspan

public boolean canUnspan()
Test whether this node can be unspanned. True iff it has more than one child DN and the DT is not ordered.
Returns:

minRuleIndex

public final int minRuleIndex()
return minimum rule index of rules including this node.
Returns:
index

maxRuleIndex

public final int maxRuleIndex()
return maximum rule index of rules including this node.
Returns:
index

sameBuckets

public boolean sameBuckets(DimensionNode dn)
Does this node have the same buckets as the given node? If buckets are undefined, must also have same values.
Parameters:
dn - a dimension node
Returns:
boolean

removeActionlessRules

public boolean removeActionlessRules()
Remove rules that include this dimension node with no actions selected
Returns:
whether rules were removed

forceSync

public void forceSync()
Overrides:
forceSync in class DictionaryComponent

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1.6.3)

E10663-10


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.