Packagecom.elad.framework.autosuggest
Classpublic class AbstractAutoSuggest
ImplementsIAutoSuggest
SubclassesUIAutoSuggest

Abstraction of the Auto suggest API handle all the data.



Public Properties
 PropertyDefined by
  result : String
AbstractAutoSuggest
Protected Properties
 PropertyDefined by
  keywordsList : Array
AbstractAutoSuggest
  sortedKeywordsList : Array
AbstractAutoSuggest
Public Methods
 MethodDefined by
  
convertXMLToArray(xml:XML):Array
Converts an xml list into an array.
AbstractAutoSuggest
  
Method to get the list of keyword after the list was sorted.
AbstractAutoSuggest
  
setKeywordsList(xml:XML):void
Method to feed the list of keywords.
AbstractAutoSuggest
  
sortList(text:String):Array
method to sort the list of keywords for specific letter/s or word/s.
AbstractAutoSuggest
Protected Methods
 MethodDefined by
  
removePunctuationAndSplitWords(text:String):Array
Remove punctuations and split words.
AbstractAutoSuggest
  
searchForTextInList(list:Array, text:String):Array
Search a list of words for a specific text.
AbstractAutoSuggest
  
stringContainsSubstringCheck(keyword:String, text:String):Boolean
Method to check for a letter/s whithin any part of the keyword.
AbstractAutoSuggest
  
substringBeginsWithString(keyword:String, text:String):Boolean
Method to check for a letter/s whithin the beginning of the keyword.
AbstractAutoSuggest
Property detail
keywordsListproperty
protected var keywordsList:Array
resultproperty 
public var result:String

This property can be used as the source for data binding.

sortedKeywordsListproperty 
protected var sortedKeywordsList:Array
Method detail
convertXMLToArray()method
public function convertXMLToArray(xml:XML):Array

Converts an xml list into an array.

Parameters
xml:XML — XML which will be converted into an array.

Returns
Array — An array with the list of words converted from XML.

See also

getKeywordsList()method 
public function getKeywordsList():Array

Method to get the list of keyword after the list was sorted.

Returns
Array — An array with the list of words.

See also

removePunctuationAndSplitWords()method 
protected function removePunctuationAndSplitWords(text:String):Array

Remove punctuations and split words.

Parameters
text:String — keyword that need to check for punctuation.

Returns
Array — Return the list of words after it removes all the punctuations.
searchForTextInList()method 
protected function searchForTextInList(list:Array, text:String):Array

Search a list of words for a specific text.

Parameters
list:Array — Lists of words.
 
text:String — Text to search for.

Returns
Array — An array of the list of words that the method found.
setKeywordsList()method 
public function setKeywordsList(xml:XML):void

Method to feed the list of keywords.

Parameters
xml:XML — The XML which will be used as original list to sort from.

See also

sortList()method 
public function sortList(text:String):Array

method to sort the list of keywords for specific letter/s or word/s.

Parameters
text:String — the text string that will be used to sort the list.

Returns
Array — An array with the sorted list of words.

See also

stringContainsSubstringCheck()method 
protected function stringContainsSubstringCheck(keyword:String, text:String):Boolean

Method to check for a letter/s whithin any part of the keyword.

Parameters
keyword:String — The keyword that need to be searched.
 
text:String — The text that need to be searched for.

Returns
Boolean — A value of true means the text was found in the keyword. false means that the text was not found in the keyword.
substringBeginsWithString()method 
protected function substringBeginsWithString(keyword:String, text:String):Boolean

Method to check for a letter/s whithin the beginning of the keyword.

Parameters
keyword:String — The keyword that need to be searched.
 
text:String — The text that need to be searched for.

Returns
Boolean