org.eclipse.rdf4j.common.webapp.navigation

## Class NavigationModel

- java.lang.Object
- - org.eclipse.rdf4j.common.webapp.navigation.AbstractNavigationNode
  - - org.eclipse.rdf4j.common.webapp.navigation.Group
    - - org.eclipse.rdf4j.common.webapp.navigation.NavigationModel

- All Implemented Interfaces:
    Cloneable, NavigationNode

      public class NavigationModel
      extends Group

  NavigationModel represents the navigation structure of a web application. A model consists of groups and views.
  Author:
    Herko ter Horst

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_I18N_PREFIX`
    `static String` | `DEFAULT_I18N_SEPARATOR`
    `static String` | `DEFAULT_I18N_SUFFIX`
    `static String` | `DEFAULT_ICON_PREFIX`
    `static String` | `DEFAULT_ICON_SEPARATOR`
    `static String` | `DEFAULT_ICON_SUFFIX`
    `static String` | `DEFAULT_PATH_PREFIX`
    `static String` | `DEFAULT_PATH_SEPARATOR`
    `static String` | `DEFAULT_VIEW_SUFFIX`
    `static String` | `NAVIGATION_MODEL_KEY`

    - ### Fields inherited from class org.eclipse.rdf4j.common.webapp.navigation.Group

      `groups, viewNames, views`

    - ### Fields inherited from class org.eclipse.rdf4j.common.webapp.navigation.AbstractNavigationNode

      `i18n, icon, path, viewSuffix`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NavigationModel()` Construct a new, anonymous, empty NavigationModel
    `NavigationModel(String id)` Construct a new emtpy NavigationModel with the specified ID.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addModel(NavigationModel other)` Add another NavigationModel to this one.
    `Object` | `clone()`
    `View` | `findView(String viewName)` Find the view with the specified name in the NavigationModel.
    `String` | `getI18nPrefix()`
    `String` | `getI18nSeparator()`
    `String` | `getI18nSuffix()`
    `String` | `getIconPrefix()`
    `String` | `getIconSeparator()`
    `String` | `getIconSuffix()`
    `String` | `getId()` Get the ID of the node.
    `String` | `getPathPrefix()`
    `String` | `getPathSeparator()`
    `String` | `getViewSuffix()`
    `void` | `setI18nPrefix(String i18nPrefix)`
    `void` | `setI18nSeparator(String i18nSeparator)`
    `void` | `setI18nSuffix(String i18nSuffix)`
    `void` | `setIconPrefix(String iconPrefix)`
    `void` | `setIconSeparator(String iconSeparator)`
    `void` | `setIconSuffix(String iconSuffix)`
    `void` | `setNavigationModels(List<String> navigationModelLocations)` Set the locations of the navigation model resources to be used in the construction of this model.
    `void` | `setPathPrefix(String pathPrefix)`
    `void` | `setPathSeparator(String pathSeparator)`

    - ### Methods inherited from class org.eclipse.rdf4j.common.webapp.navigation.Group

      `addGroup, addView, copyGroupsAndViews, findViewInternal, getGroup, getGroups, getView, getViewByName, getViews`

    - ### Methods inherited from class org.eclipse.rdf4j.common.webapp.navigation.AbstractNavigationNode

      `copyCommonAttributes, equals, getDepth, getI18n, getIcon, getParent, getPath, hashCode, isEnabled, isHidden, isParent, setEnabled, setHidden, setI18n, setIcon, setParent, setPath, setViewSuffix`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAVIGATION_MODEL_KEY

          public static final String NAVIGATION_MODEL_KEY

      See Also:
        Constant Field Values

    - #### DEFAULT_PATH_PREFIX

          public static final String DEFAULT_PATH_PREFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_PATH_SEPARATOR

          public static final String DEFAULT_PATH_SEPARATOR

      See Also:
        Constant Field Values

    - #### DEFAULT_VIEW_SUFFIX

          public static final String DEFAULT_VIEW_SUFFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_ICON_PREFIX

          public static final String DEFAULT_ICON_PREFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_ICON_SEPARATOR

          public static final String DEFAULT_ICON_SEPARATOR

      See Also:
        Constant Field Values

    - #### DEFAULT_ICON_SUFFIX

          public static final String DEFAULT_ICON_SUFFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_I18N_PREFIX

          public static final String DEFAULT_I18N_PREFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_I18N_SEPARATOR

          public static final String DEFAULT_I18N_SEPARATOR

      See Also:
        Constant Field Values

    - #### DEFAULT_I18N_SUFFIX

          public static final String DEFAULT_I18N_SUFFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NavigationModel

          public NavigationModel()

      Construct a new, anonymous, empty NavigationModel

    - #### NavigationModel

          public NavigationModel(String id)

      Construct a new emtpy NavigationModel with the specified ID.
      Parameters:
        `id` - the ID of the NavigationModel

  - ### Method Detail

    - #### getId

          public String getId()

      Description copied from interface: `NavigationNode`
      Get the ID of the node.
      Specified by:
        `getId` in interface `NavigationNode`
      Overrides:
        `getId` in class `AbstractNavigationNode`
      Returns:
        the ID of the node

    - #### getPathPrefix

          public String getPathPrefix()

      Specified by:
        `getPathPrefix` in interface `NavigationNode`
      Overrides:
        `getPathPrefix` in class `AbstractNavigationNode`

    - #### setPathPrefix

          public void setPathPrefix(String pathPrefix)

    - #### getPathSeparator

          public String getPathSeparator()

      Specified by:
        `getPathSeparator` in interface `NavigationNode`
      Overrides:
        `getPathSeparator` in class `AbstractNavigationNode`

    - #### setPathSeparator

          public void setPathSeparator(String pathSeparator)

    - #### getIconPrefix

          public String getIconPrefix()

      Specified by:
        `getIconPrefix` in interface `NavigationNode`
      Overrides:
        `getIconPrefix` in class `AbstractNavigationNode`

    - #### setIconPrefix

          public void setIconPrefix(String iconPrefix)

    - #### getIconSeparator

          public String getIconSeparator()

      Specified by:
        `getIconSeparator` in interface `NavigationNode`
      Overrides:
        `getIconSeparator` in class `AbstractNavigationNode`

    - #### setIconSeparator

          public void setIconSeparator(String iconSeparator)

    - #### getIconSuffix

          public String getIconSuffix()

      Specified by:
        `getIconSuffix` in interface `NavigationNode`
      Overrides:
        `getIconSuffix` in class `AbstractNavigationNode`

    - #### setIconSuffix

          public void setIconSuffix(String iconSuffix)

    - #### getI18nPrefix

          public String getI18nPrefix()

      Specified by:
        `getI18nPrefix` in interface `NavigationNode`
      Overrides:
        `getI18nPrefix` in class `AbstractNavigationNode`

    - #### setI18nPrefix

          public void setI18nPrefix(String i18nPrefix)

    - #### getI18nSeparator

          public String getI18nSeparator()

      Specified by:
        `getI18nSeparator` in interface `NavigationNode`
      Overrides:
        `getI18nSeparator` in class `AbstractNavigationNode`

    - #### setI18nSeparator

          public void setI18nSeparator(String i18nSeparator)

    - #### getI18nSuffix

          public String getI18nSuffix()

      Specified by:
        `getI18nSuffix` in interface `NavigationNode`
      Overrides:
        `getI18nSuffix` in class `AbstractNavigationNode`

    - #### setI18nSuffix

          public void setI18nSuffix(String i18nSuffix)

    - #### getViewSuffix

          public String getViewSuffix()

      Specified by:
        `getViewSuffix` in interface `NavigationNode`
      Overrides:
        `getViewSuffix` in class `AbstractNavigationNode`

    - #### findView

          public View findView(String viewName)

      Find the view with the specified name in the NavigationModel.
      Parameters:
        `viewName` - the name of the view, specified as a /-separated hierarchy of groups, where the part after the last / is interpreted as the name of the view itself.
      Returns:
        the view, or null if no view matching the specified name could be found

    - #### addModel

          public void addModel(NavigationModel other)

      Add another NavigationModel to this one. This is done by adding all groups and view from the other model to this one.
      Parameters:
        `other` - the model to add to this one.

    - #### setNavigationModels

          public void setNavigationModels(List<String> navigationModelLocations)

      Set the locations of the navigation model resources to be used in the construction of this model. Calling this method will cause this NavigationModel to be initialized.
      Parameters:
        `navigationModelLocations` - a list of resource names

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Group`

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.