org.deduced.text.rule
Class GetMultiLanguageTextRule

java.lang.Object
  extended by org.deduced.rule.DeductionRuleLibrary
      extended by org.deduced.text.rule.GetMultiLanguageTextRule
All Implemented Interfaces:
DeductionRuleAnalyzer<java.lang.Object>

public class GetMultiLanguageTextRule
extends DeductionRuleLibrary

GetMultiLanguageTextRule

Author:
Steve

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deduced.rule.DeductionRuleLibrary
DeductionRuleLibrary.CompareResult
 
Constructor Summary
GetMultiLanguageTextRule()
           
 
Method Summary
 java.lang.Object analyzeRule(java.lang.Object[] inputs, RuleExecutionContext context, PropertyCollection collection, PropertyCollection rule)
          (non-JSDoc)
static java.lang.Object getTextForLanguage(PropertyCollection<?,?> translationList, java.lang.String defaultText, PropertyCollection<?,?> language)
          get Text For Language
 
Methods inherited from class org.deduced.rule.DeductionRuleLibrary
addReferenceToList, and, bigger, biggerOrEqual, clearPropertyCollection, createDateIncrementList, createObject, createObjectsMatchingAllValues, createObjectsMatchingAllValues, createObjectsMatchingAllValuesInOrderedList, createObjectsMatchingAllValuesInOrderedList, createOrReuseListToMatchType, debug, equals, equalTo, fillList, fillListWithSpecifiedTypes, fillOrderedList, fillOrderedListExtractMatchesValues, fillOrderedListWithSpecifiedTypes, filter, filterList, filterList, filterList, findParentOfType, formatDate, formatDate, formatTime, getModelFromCollection, getPropertyCollectionController, instanceOf, maximumCollection, maximumValue, merge, minimumCollection, minimumValue, not, or, property, removeAlreadyMatchedOrderedListValues, same, smaller, smallerOrEqual, sum, sum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetMultiLanguageTextRule

public GetMultiLanguageTextRule()
Method Detail

analyzeRule

public java.lang.Object analyzeRule(java.lang.Object[] inputs,
                                    RuleExecutionContext context,
                                    PropertyCollection collection,
                                    PropertyCollection rule)
                             throws java.lang.Exception
(non-JSDoc)

Parameters:
inputs - the array of inputs
context - the rule execution context
collection - the collection on which the rule is executed
rule - the rule being executed
Returns:
the rule result
Throws:
java.lang.Exception - any exception detected during rule execution
See Also:
DeductionRuleAnalyzer.analyzeRule(java.lang.Object[], org.deduced.RuleExecutionContext, org.deduced.PropertyCollection, org.deduced.PropertyCollection)

getTextForLanguage

public static java.lang.Object getTextForLanguage(PropertyCollection<?,?> translationList,
                                                  java.lang.String defaultText,
                                                  PropertyCollection<?,?> language)
get Text For Language

Parameters:
translationList - the list of text associated with each language
defaultText - the default text value to use
language - the language to use
Returns:
the text associated with the specified language, if none is found, the default text is returned.