Class OsmSearchDictionary

This class contains the OsmSearch dictionary and methods to perform changes in the dictionary

See DictionaryItem for dictionary items

See theOsmSearchDictionary for the one and only one instance of this class

Source : file core/osmSearch/OsmSearchDictionary.js at line 38

Constructor

new OsmSearchDictionary ( )

The constructor

Source : file core/osmSearch/OsmSearchDictionary.js at line 166

Public getters and setters

readonly get dictionary : DictionaryItem

The dictionary

Source : file core/osmSearch/OsmSearchDictionary.js at line 179

Public methods

collapse ( )

Mark the complete dictionary except the root item as not expanded

Source : file core/osmSearch/OsmSearchDictionary.js at line 239

expand ( )

Mark the complete dictionary as expanded

Source : file core/osmSearch/OsmSearchDictionary.js at line 231

expandItem ( itemObjId )

Mark as expanded an item identified by it's objId

Source : file core/osmSearch/OsmSearchDictionary.js at line 222

Parameters

Name Type Description
itemObjId Number

The objId of the item

parseDictionary ( dictionaryTextContent )

Parse the content of the TravelNotesSearchDictionaryXX.csv and build a tree of DictionaryItem with this content

Source : file core/osmSearch/OsmSearchDictionary.js at line 187

Parameters

Name Type Description
dictionaryTextContent String

The content of the TravelNotesSearchDictionaryXX.csv file

selectItem ( itemObjId, isSelected )

Mark as selected/not selected an item identified by it's objId and all the chidrens of this item

Source : file core/osmSearch/OsmSearchDictionary.js at line 205

Parameters

Name Type Description
itemObjId Number

The objId of the item

isSelected Boolean

The value to set for isSelected

unselectAll ( )

Mark the complete dictionary as not selected

Source : file core/osmSearch/OsmSearchDictionary.js at line 213

Private properties

#currentItem : DictionaryItem

The currentItem treated by the #parseLine method

Source : file core/osmSearch/OsmSearchDictionary.js at line 59

#dictionary : DictionaryItem

The root item of the dictionary

Source : file core/osmSearch/OsmSearchDictionary.js at line 45

#itemsArray : Array of Array of DictionaryItem

Array used to store a reference to the items property of the DictionaryItem Objects and so build the tree.

Source : file core/osmSearch/OsmSearchDictionary.js at line 67

#itemsMap : Map

A map with the all the DictionaryItem created, selectable by their objId

Source : file core/osmSearch/OsmSearchDictionary.js at line 52

Private methods

#collapse ( item )

Mark as not expanded an item and all the childrens

Source : file core/osmSearch/OsmSearchDictionary.js at line 155

Parameters

Name Type Description
item DictionaryItem

The item to mark as not expanded

#expand ( item )

Mark as expanded an item and all the childrens

Source : file core/osmSearch/OsmSearchDictionary.js at line 143

Parameters

Name Type Description
item DictionaryItem

The item to mark as expanded

#parseLine ( line )

Split a line from the csv file into cells and add a DictionaryItem or a filterTag to the dictionary

Source : file core/osmSearch/OsmSearchDictionary.js at line 74

Parameters

Name Type Description
line String

A line of the csv file that will be parsed