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 Description static StringDEFAULT_I18N_PREFIXstatic StringDEFAULT_I18N_SEPARATORstatic StringDEFAULT_I18N_SUFFIXstatic StringDEFAULT_ICON_PREFIXstatic StringDEFAULT_ICON_SEPARATORstatic StringDEFAULT_ICON_SUFFIXstatic StringDEFAULT_PATH_PREFIXstatic StringDEFAULT_PATH_SEPARATORstatic StringDEFAULT_VIEW_SUFFIXstatic StringNAVIGATION_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 Description NavigationModel()Construct a new, anonymous, empty NavigationModelNavigationModel(String id)Construct a new emtpy NavigationModel with the specified ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModel(NavigationModel other)Add another NavigationModel to this one.Objectclone()ViewfindView(String viewName)Find the view with the specified name in the NavigationModel.StringgetI18nPrefix()StringgetI18nSeparator()StringgetI18nSuffix()StringgetIconPrefix()StringgetIconSeparator()StringgetIconSuffix()StringgetId()Get the ID of the node.StringgetPathPrefix()StringgetPathSeparator()StringgetViewSuffix()voidsetI18nPrefix(String i18nPrefix)voidsetI18nSeparator(String i18nSeparator)voidsetI18nSuffix(String i18nSuffix)voidsetIconPrefix(String iconPrefix)voidsetIconSeparator(String iconSeparator)voidsetIconSuffix(String iconSuffix)voidsetNavigationModels(List<String> navigationModelLocations)Set the locations of the navigation model resources to be used in the construction of this model.voidsetPathPrefix(String pathPrefix)voidsetPathSeparator(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
-
-
-
-
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:NavigationNodeGet the ID of the node.- Specified by:
getIdin interfaceNavigationNode- Overrides:
getIdin classAbstractNavigationNode- Returns:
- the ID of the node
-
getPathPrefix
public String getPathPrefix()
- Specified by:
getPathPrefixin interfaceNavigationNode- Overrides:
getPathPrefixin classAbstractNavigationNode
-
setPathPrefix
public void setPathPrefix(String pathPrefix)
-
getPathSeparator
public String getPathSeparator()
- Specified by:
getPathSeparatorin interfaceNavigationNode- Overrides:
getPathSeparatorin classAbstractNavigationNode
-
setPathSeparator
public void setPathSeparator(String pathSeparator)
-
getIconPrefix
public String getIconPrefix()
- Specified by:
getIconPrefixin interfaceNavigationNode- Overrides:
getIconPrefixin classAbstractNavigationNode
-
setIconPrefix
public void setIconPrefix(String iconPrefix)
-
getIconSeparator
public String getIconSeparator()
- Specified by:
getIconSeparatorin interfaceNavigationNode- Overrides:
getIconSeparatorin classAbstractNavigationNode
-
setIconSeparator
public void setIconSeparator(String iconSeparator)
-
getIconSuffix
public String getIconSuffix()
- Specified by:
getIconSuffixin interfaceNavigationNode- Overrides:
getIconSuffixin classAbstractNavigationNode
-
setIconSuffix
public void setIconSuffix(String iconSuffix)
-
getI18nPrefix
public String getI18nPrefix()
- Specified by:
getI18nPrefixin interfaceNavigationNode- Overrides:
getI18nPrefixin classAbstractNavigationNode
-
setI18nPrefix
public void setI18nPrefix(String i18nPrefix)
-
getI18nSeparator
public String getI18nSeparator()
- Specified by:
getI18nSeparatorin interfaceNavigationNode- Overrides:
getI18nSeparatorin classAbstractNavigationNode
-
setI18nSeparator
public void setI18nSeparator(String i18nSeparator)
-
getI18nSuffix
public String getI18nSuffix()
- Specified by:
getI18nSuffixin interfaceNavigationNode- Overrides:
getI18nSuffixin classAbstractNavigationNode
-
setI18nSuffix
public void setI18nSuffix(String i18nSuffix)
-
getViewSuffix
public String getViewSuffix()
- Specified by:
getViewSuffixin interfaceNavigationNode- Overrides:
getViewSuffixin classAbstractNavigationNode
-
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
-
-