Package oracle.rules.sdk2.dictionary
Class ChoiceImpl
java.lang.Object
oracle.rules.sdk2.dictionary.AbstractChoiceImpl
oracle.rules.sdk2.dictionary.ChoiceImpl
- All Implemented Interfaces:
Serializable,Cloneable,Choice
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface oracle.rules.sdk2.dictionary.Choice
Choice.Kind -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd each choice in moreChoices to existingChoices, merging trees if needed.static voidAdd the choice to choices, merging the trees if needed.voidcollapse()static voidvoidexpand()static voidFilter Choices by a string patternstatic List<ChoiceImpl>filter(List<Choice> list, Choice.Kind kind) Filter Choices by Kindfilter(Choice.Kind kind) static List<ChoiceImpl>filterAndFlatten(List<Choice> list, Choice.Kind kind) flatten()static List<ChoiceImpl>static List<ChoiceImpl>flattenTillDepth(List<Choice> list, int depth) Flatten a forest of choices to a specified depth.static ChoicegetChoiceByVerbalValue(List<Choice> choices, String verbalValue) Returns the first choice that has the same translated verbal value as the passed parameterGet flattened list of values from the given choices.static String[]Get flattened array of values from the given choices.getVerbalValue(boolean translate) Get the (optionally translated) 'Verbal' value of the choicestatic ChoicenewChoice(Constructor c, Choice containingType) static ChoicenewChoice(DecisionFunctionFact dff, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(DecisionFunction df, boolean target, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(FactType ft, String alias, String translatedAlias, boolean selectable, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(Field f, Choice containingType, RuleDictionary dic) static ChoicenewChoice(Function f, boolean target, List<Choice> results, RuleDictionary dic) static Choicestatic ChoicenewChoice(Parameter p, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(Property p, List<Choice> results, RuleDictionary dic) static Choicestatic ChoicenewChoice(Variable v, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(Bucket b, List<Choice> results, String value, String translatedValue, String literalValue) static Choicestatic ChoicenewChoice(BucketSet bs, boolean selectable, List<Choice> results, RuleDictionary dic) static ChoicenewChoice(Choice.Kind kind, String value, String translatedValue, DOID typeID, List<Choice> results, RuleDictionary dic) static voidnewChoice(oracle.rules.sdk2.dmn.DRGElement element, List<Choice> choices, RuleDictionary rd) static Choicestatic ChoicenewChoice(ScopedVariable v, List<Choice> results, String literalValue, RuleDictionary dic) static ChoicenewChoice(ScopedVariable v, List<Choice> results, RuleDictionary dic) static ChoicenewSubChoice(Choice.Kind kind, Choice containingResult, boolean statik, boolean assignable, boolean qualified, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId) static ChoicenewTopLevelChoice(Choice.Kind kind, List<Choice> results, boolean selectable, boolean statik, boolean assignable, boolean qualified, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId, RuleDictionary dic) static ChoicenewTopLevelChoice(Choice.Kind kind, List<Choice> results, boolean selectable, boolean statik, boolean assignable, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId, RuleDictionary dic) static ChoicenewTwoLevelChoice(List<Choice> results, String folder, String choice) static voidremoveVoidResults(List<Choice> results) voidstatic voidsortGlobals(List<Choice> exprs) Methods inherited from class oracle.rules.sdk2.dictionary.AbstractChoiceImpl
equals, getAltValue, getChildren, getDefinition, getDescription, getDescription, getDictionary, getID, getKind, getListContentType, getListContentType, getListContentTypeID, getLiteralValue, getName, getName, getParent, getTranslatedName, getTranslatedName, getTranslatedValue, getTranslatedValue, getType, getType, getTypeID, getValue, getValue, getVerbalValue, isAssignable, isAssignablePrefix, isExpanded, isGlobal, isQualified, isSelectable, isStatic, isTestable, setDefinition, setName, setSelectable, toString
-
Constructor Details
-
ChoiceImpl
public ChoiceImpl()
-
-
Method Details
-
getVerbalValue
Get the (optionally translated) 'Verbal' value of the choice- Specified by:
getVerbalValuein interfaceChoice- Overrides:
getVerbalValuein classAbstractChoiceImpl- Parameters:
translate- flag to optionally translate the value- Returns:
- 'Verbal' value of this Choice if any, "" Otherwise
-
setValue
-
flattenTillDepth
Flatten a forest of choices to a specified depth. To flatten entire structure, useflatten(java.util.List)A positive value flattens till depth or entire structure, whichever is lower. A value of 0 returns a copy of list. Behavior for a negative value is undefined- Parameters:
list- List of Choices to flattendepth- depth till which the choices need to be flattened- Returns:
- Flattened list of choices
-
flatten
-
flatten
-
filter
Filter Choices by Kind- Parameters:
list- List of Choiceskind- Kind of Choices to filter- Returns:
- List of filtered, flattened, selectable Choices
-
filter
-
filterAndFlatten
-
filter
Filter Choices by a string pattern- Parameters:
list- List of Choices to be filteredpattern- pattern to filter the choices bytranslate- should the translated value of the choice be used for filtering- Returns:
- List of filtered, flattened, selectable choices
-
getChoiceByVerbalValue
Returns the first choice that has the same translated verbal value as the passed parameter- Returns:
- Choice
-
normalize
-
newChoice
public static void newChoice(oracle.rules.sdk2.dmn.DRGElement element, List<Choice> choices, RuleDictionary rd) -
expand
public void expand() -
collapse
public void collapse() -
expand
-
collapse
-
newTopLevelChoice
public static Choice newTopLevelChoice(Choice.Kind kind, List<Choice> results, boolean selectable, boolean statik, boolean assignable, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId, RuleDictionary dic) -
newTopLevelChoice
public static Choice newTopLevelChoice(Choice.Kind kind, List<Choice> results, boolean selectable, boolean statik, boolean assignable, boolean qualified, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId, RuleDictionary dic) -
newSubChoice
public static Choice newSubChoice(Choice.Kind kind, Choice containingResult, boolean statik, boolean assignable, boolean qualified, String value, String translatedValue, String literalValue, DictionaryComponent dc, DOID typeId, DOID listContentTypeId) -
newTwoLevelChoice
-
newChoice
public static Choice newChoice(BucketSet bs, boolean selectable, List<Choice> results, RuleDictionary dic) -
newChoice
-
newChoice
-
newChoice
-
newChoice
-
newChoice
-
newChoice
-
newChoice
-
newChoice
public static Choice newChoice(DecisionFunction df, boolean target, List<Choice> results, RuleDictionary dic) -
newChoice
-
newChoice
-
newChoice
public static Choice newChoice(Function f, boolean target, List<Choice> results, RuleDictionary dic) -
newChoice
-
newChoice
public static Choice newChoice(ScopedVariable v, List<Choice> results, String literalValue, RuleDictionary dic) -
newChoice
-
newChoice
-
newChoice
-
newChoice
public static Choice newChoice(Choice.Kind kind, String value, String translatedValue, DOID typeID, List<Choice> results, RuleDictionary dic) -
removeVoidResults
-
getValues
Get flattened list of values from the given choices. If choices==null, returns empty list.- Parameters:
choices-- Returns:
- flattened list of values
-
getValues
Get flattened array of values from the given choices.- Parameters:
choices-firstEntry-translate-- Returns:
- flattened array of values
-
add
Add the choice to choices, merging the trees if needed.- Parameters:
choices-choice-
-
add
Add each choice in moreChoices to existingChoices, merging trees if needed.- Parameters:
existingChoices-moreChoices-
-
sortGlobals
-
deepCopy
-
deepCopy
-