Class DimensionNode
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> UnnamedComponent,VariableScope
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:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
DictionaryComponent.Diff<T extends DictionaryComponent>, DictionaryComponent.DiffSummary, DictionaryComponent.DiffTypeNested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object> Nested classes/interfaces inherited from interface oracle.rules.sdk2.ruleset.VariableScope
VariableScope.ExprLocation -
Field Summary
FieldsFields inherited from class oracle.rules.sdk2.ruleset.RuleComponent
BUILTINFields inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
PROP_ACCESS, PROP_ACTION_SELECTED, PROP_ACTION_TABLE, PROP_ACTIVE, PROP_ACTUAL_TEST_OUTPUT_TABLE, PROP_ADHOC_TEST_VALIDATION, 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_AUTO_SYNC, 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_DATA_MODEL, PROP_DATA_SOURCE, PROP_DECISION_FUNCTION, PROP_DECISION_FUNCTION_ID, PROP_DECISION_FUNCTION_INPUT_TABLE, PROP_DECISION_FUNCTION_OUTPUT_TABLE, PROP_DECISION_FUNCTION_RULESET_TABLE, PROP_DECISION_FUNCTION_TABLE, PROP_DECISION_MODEL, PROP_DESCRIPTION, PROP_DF_FACT, PROP_DF_FACT_ID, PROP_DICT_LOADING_EXTENSION, PROP_DICTIONARY_LINK_TABLE, PROP_DIMENSION_NODE_TABLE, PROP_DIMENSION_TABLE, PROP_DISALLOW_ERROR_SUPPRESSION, PROP_DRAFT, PROP_DSL_ID, PROP_DSL_PARAMETER_TABLE, PROP_DSL_TABLE, PROP_DSL_VALUE, 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, PROP_ENUM_BUCKET_SET_ID, PROP_ENUM_TYPE, PROP_EXCEPTION_IDS, PROP_EXCEPTIONS, PROP_EXCLUDED, PROP_EXPECTED_TEST_OUTPUT_TABLE, PROP_EXPRESSION, PROP_EXPRESSION_TABLE, PROP_FACT_PATH, PROP_FACT_PATH_IDS, PROP_FACT_TABLE, PROP_FACT_TYPE, PROP_FACT_TYPE_ID, PROP_FACT_TYPE_IDS, PROP_FACT_TYPE_TABLE, PROP_FACT_TYPES, 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_GLOBAL_ALIAS, PROP_ID, PROP_INCLUDE_CHAINED_EXPR, 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_LINK_PATH, 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_NO_RULE_FIRED_IS_ERROR, 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_PARAM, PROP_PARAM_EXPRESSION, 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_PHRASE_SUGGESTION_FORM, PROP_PREFERENCES, PROP_PREFIX_LINKED_NAMES, PROP_PRIORITY, PROP_PRIVATE_BUCKET_SET, PROP_PROPERTIES, PROP_PROPERTY, PROP_PROPERTY_ID, PROP_PROPERTY_TABLE, PROP_PROPERTY_VALUE_TABLE, PROP_QUALIFIER_PATTERN, PROP_READABLE, PROP_REF_ID, PROP_REPORT_BYUSE_NAMES, PROP_REPORT_PATTERNS, PROP_RESOLVED_TARGET, PROP_RESOLVED_VALUE, PROP_RESOURCE_BUNDLE, PROP_RESTRICT_AUTO_SUGGESTIONS, PROP_RETURN_TYPE, PROP_RIGHT, PROP_RIGHT_SEPARATOR, PROP_RULE_EXEC_ALGORITHM, PROP_RULE_FIRING_LIMIT, PROP_RULE_FIRING_LIMIT_ERROR, 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_SYNC_MARK, PROP_SYSTEM, PROP_TARGET, PROP_TARGET_PACKAGE, PROP_TEST_CASE_TABLE, PROP_TEST_FORM, PROP_TEST_INPUT_TABLE, PROP_TEST_MODEL, PROP_TEST_RESULT_TABLE, PROP_TEST_SUITE_TABLE, PROP_TEST_TEMPLATE_TABLE, PROP_TIMESTAMP, PROP_TOKEN_UNDER_CURSOR, PROP_TRANSLATED_ALIAS, PROP_TRANSLATED_DESCRIPTION, PROP_TRANSLATED_GLOBAL_ALIAS, PROP_TRANSLATED_PARAMETER_LIST, PROP_TRANSLATED_QUALIFIER_PATTERN, PROP_TRANSLATED_VALUE, PROP_TRANSLATED_VARIABLE, PROP_TREE, PROP_TREE_MODE, PROP_TYPE, PROP_TYPE_ID, PROP_TYPE_IDS, PROP_TYPES, PROP_UNIQUE_RULESETS, PROP_UNSAVED_TRANSLATED_ALIAS, PROP_UNSAVED_TRANSLATED_DESCRIPTION, PROP_UNSAVED_TRANSLATED_GLOBAL_ALIAS, PROP_UNSAVED_TRANSLATED_QUALIFIER_PATTERN, PROP_UNSAVED_TRANSLATED_VALUE, PROP_UPDATE_NUMBER, PROP_UPDATE_TIME, PROP_VALIDATION, PROP_VALIDATION_UPDATE_NUMBER, PROP_VALUE, PROP_VALUES, PROP_VARIABLE, PROP_VARIABLE_TABLE, PROP_VERBAL_RULE_TABLE, PROP_VERSION, PROP_VERTICAL_ORIENTATION, PROP_VISIBILITY_FILTER, PROP_VISIBILITY_FILTER_ENABLED, PROP_VISIBLE, PROP_WEB_SERVICE, PROP_WRITABLE, PROP_XML_NAME -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMerge(DimensionNode sibling) Test whether this node can be merged with its sibling.booleancanSpan(DimensionNode sibling) Test if this node and its sibling can be spanned.booleancanSplit()Test whether this node can be splitbooleanTest whether this node can be unspanned.voidcompact()Merge all child DimensionNodes but do not merge non-identical actions.voidGeneric property getter.Get DimensionNode Buckets.Get BucketSet.Deprecated.the returned DTActionNode is in the deprecated DTActionNodeTable of the first DTActionGet DimensionNode IDTable of child dimension nodes below this Dimension Node in the next Dimension.getDimDN()Get Dimension to which this DimensionNode belongs.getDimension(boolean diff) Get Dimension to which this DimensionNode belongs.Get parent DimensionNode, i.e., the node above this DimensionNode from the previous DimensionString[]int[]String[]String[]String[]Get dimension values of DimensionNode.getValuesAsString(String[] values) Get possibly multiple values as a comma separated StringString[]getValuesFromString(String values) Parse possibly multiple values from comma separated stringString[]getValuesFromString(String values, boolean translate) Parse possibly multiple values from comma separated stringvoidParse possibly multiple values from comma separated stringvoidgetValuesFromString(String values, List<String> existingValues, List<String> newValues, boolean translate) Parse possibly multiple values from comma separated string.Get Values PropertyinScopeVariables(boolean includeAggregates, VariableScope.ExprLocation loc) By default, pass the request to the containerfinal intreturn maximum rule index of rules including this node.voidmerge()Merge all child DimensionNodes and actions.voidmerge(boolean deep) voidmerge(DimensionNode sibling) Merge with sibling DimensionNode.final intreturn minimum rule index of rules including this node.Generic property setter.booleanRemove rules that include this dimension node with no actions selectedbooleanDoes this node have the same buckets as the given node?voidsetParentDimensionNode(DimensionNode parent) set parent DimensionNodevoidSet dimension values of DimensionNode.voidspan()Span all child DimensionNodes (must have sameBucket).voidspan(DimensionNode next) Span DimensionNodes.voidsplit()split this DimensionNode into siblings such that this node and new siblings each have a single bucket value.voidunspan()split this DimensionNode into siblings such that each has one child.voidvalidate(List<SDKException> errors, List<SDKWarning> warnings) Validate dimension node.Methods inherited from class oracle.rules.sdk2.ruleset.UnnamedRuleComponent
getDiffMatchValue, init, isAliasDistinct, isNameDistinctMethods inherited from class oracle.rules.sdk2.ruleset.RuleComponent
get, getParent, getParentTable, getParentVariableScope, inScopeVariables, parentAction, parentActionContext, parentAutoBindingContext, parentFunction, parentPattern, parentRule, parentRuleBase, parentRuleCommon, parentRuleSheet, parentTest, parentVariable, parentVerbalRule, RHSRuleVariables, toString, toStringMethods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
_get, _put, clear, containsKey, containsValue, entrySet, getAEReferences, getAlias, getAlias, getAlias, getAlias, getAliasProperty, getAllReferences, getContainedDiffs, getCustom, getDependents, getDescription, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getExprParserReferences, getFullyQualifiedAlias, getFullyQualifiedName, getIndex, getIndex, getName, getNameProperty, getNext, getNext, getObjectPath, getOptions, getPrevious, getPrevious, getProperties, getProperty, getReferences, getSelected, getTranslatedAlias, getTranslatedAlias, getTranslatedDescription, hasConflict, hasDiff, init, isEmpty, isFullyQualifiedName, isModifiable, isSystemProperty, isUnsavedTranslatedAlias, isUnsavedTranslatedDescription, keySet, putAll, remove, removeDiff, setAlias, setAlias, setCustom, setDescription, setDescription, setName, setTranslatedAlias, setTranslatedDescription, size, validate, valuesMethods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject
_clearID, equals, exists, getAEReferenceCount, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getRuleSet, getState, getWarnings, hashCode, isModified, setID, validate, validateMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface oracle.rules.sdk2.dictionary.UnnamedComponent
getAlias, getName, setAlias, setName
-
Field Details
-
ALL_VALUES_STRING
- See Also:
-
UNKNOWN_VALUE_STRING
- See Also:
-
-
Method Details
-
getDimDN
-
getBucketSet
Get BucketSet. DimensionNode always shows the Dimension BucketSet in its picklist- Returns:
- BucketSet of this DimensionNode's Dimension
-
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
-
getValuesProperty
Get Values Property- Returns:
- ValuesProperty
-
getValues
Get dimension values of DimensionNode. values are names of buckets.- Returns:
- dimension values
-
getValueOptions
-
getValuesFromString
Parse possibly multiple values from comma separated string- Parameters:
values-- Returns:
- String[] of existing bucket aliases
-
getValuesFromString
Parse possibly multiple values from comma separated string- Parameters:
values-- Returns:
- String[] of existing bucket aliases
-
getValuesFromString
Parse possibly multiple values from comma separated string- Parameters:
values-existingValues- returned existing bucket aliasesnewValues- returned new bucket aliases
-
getValuesFromString
public void getValuesFromString(String values, List<String> existingValues, List<String> newValues, boolean translate) Parse possibly multiple values from comma separated string. The values can have combined ranges. ExistingValues do not.- Parameters:
values-existingValues- return existing bucket aliasesnewValues- return new bucket aliasestranslate- use translated values
-
getValuesAsString
Get possibly multiple values as a comma separated String- Parameters:
values-- Returns:
- String
-
setValues
Set dimension values of DimensionNode.- Parameters:
values- names of buckets
-
getSelected
public int[] getSelected() -
getDimension
Get Dimension to which this DimensionNode belongs.- Returns:
- dimension
-
getDimension
Get Dimension to which this DimensionNode belongs.- Parameters:
diff- whether this DimensionNode is in the diff value- Returns:
- dimension
-
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
set parent DimensionNode- Parameters:
parent- TODO: validate correct Dimension
-
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.the returned DTActionNode is in the deprecated DTActionNodeTable of the first DTActionGet 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
Merge all child DimensionNodes, with or without merging actions.- Throws:
SDKException
-
merge
public void merge()Merge all child DimensionNodes and actions. -
compact
public void compact()Merge all child DimensionNodes but do not merge non-identical actions. -
span
public void span()Span all child DimensionNodes (must have sameBucket). -
merge
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:
-
span
Span DimensionNodes. Next must be next in its DimensionNodeTable and have sameBuckets- Parameters:
next- the DimensionNode to span with this- Throws:
IllegalArgumentException- if DT is ordered
-
canMerge
Test whether this node can be merged with its sibling. True iff the argument is a sibling of this node.- Parameters:
sibling-
-
canSpan
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:
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:
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceUnnamedComponent- Overrides:
getPropertyNamesin classUnnamedRuleComponent<DimensionNode>- Returns:
- Array of property names available.
-
getStoredPropertyNames
- Overrides:
getStoredPropertyNamesin classUnnamedRuleComponent<DimensionNode>- Returns:
- Array of property names which are persisted in the order in which they appear in the schema.
-
get
Description copied from class:DictionaryComponentGeneric property getter.Please see the specific bean class for a list of properties.
- Specified by:
getin interfaceMap<String,Object> - Overrides:
getin classUnnamedRuleComponent<DimensionNode>- Parameters:
key- a String containing the property name to be fetched.- Returns:
- the value corresponding to the key: a String, String[], DictionaryComponent, DictionaryComponentTable, etc.
-
put
Description copied from class:DictionaryComponentGeneric property setter. Throws runtime exceptions for incorrect arguments. Please see the specific bean class for a list of properties, their types, and permissible values.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.
- Specified by:
putin interfaceMap<String,Object> - Overrides:
putin classUnnamedRuleComponent<DimensionNode>- Parameters:
key- the key of the property to setvalue- the value of the named property to set- Returns:
- the previous value of the property
-
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
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
-
validate
Validate dimension node. Buckets must be contained in bucketset.- Overrides:
validatein classDictionaryComponent<DimensionNode>- Parameters:
errors-warnings-- See Also:
-
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:
forceSyncin classDictionaryComponent<DimensionNode>
-
inScopeVariables
public List<ScopedVariable> inScopeVariables(boolean includeAggregates, VariableScope.ExprLocation loc) Description copied from class:RuleComponentBy default, pass the request to the container- Specified by:
inScopeVariablesin interfaceVariableScope- Overrides:
inScopeVariablesin classRuleComponent<DimensionNode>
-