org.universAAL.ui.dm.userInteraction.mainMenu.file
Class MainMenu

Package class diagram package MainMenu
java.lang.Object
  extended by org.universAAL.ui.dm.userInteraction.mainMenu.file.MainMenu
Direct Known Subclasses:
RDFMainMenu

public class MainMenu
extends Object

A set of main menus. The main menu of the Dialog Manager represents a list of services installed in the system that can be called by the user. Additionally, the Dialog Manager provides methods to search for services and to show pending messages and dialogs.
There is one main menu for every user of the system. The content is determined by a configuration file where each line contains 3 values (separated by '|'):

  1. list of labels starting with '/' (multiple labels for hierarchical menus are separated by '/')
  2. vendor
  3. service class
Examples:
/Light Control|myVendor|LightingURI
/Home Control/Light Control|myVendor|LightingURI

Author:
mtazari, cstockloew, eandgrg, amedrano

Field Summary
protected  MenuNode root
          The root node.
protected  MenuNode selection
          The node that is currently selected.
 
Constructor Summary
protected MainMenu()
           
  MainMenu(InputStream in)
          constructor.
 
Method Summary
protected  void constructMenu(InputStream in)
          Create the menu.
 Iterable<MenuNode> entries()
          Get all the entries for the (sub)menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

protected MenuNode root
The root node.


selection

protected MenuNode selection
The node that is currently selected.

Constructor Detail

MainMenu

protected MainMenu()

MainMenu

public MainMenu(InputStream in)
constructor. Creates the menu.

Parameters:
in - Input stream for the configuration file
Method Detail

constructMenu

protected void constructMenu(InputStream in)
Create the menu. Reads a configuration file with menu entries and creates a tree of menu nodes where leaf nodes have a vendor and service class associated.

Parameters:
in - Input stream for the configuration file

entries

public Iterable<MenuNode> entries()
Get all the entries for the (sub)menu.

Returns:


Copyright © 2014 universAAL Consortium. All Rights Reserved.