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 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 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 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
-
-
-
-
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 interfaceNavigationNode
- Overrides:
getId
in classAbstractNavigationNode
- Returns:
- the ID of the node
-
getPathPrefix
public String getPathPrefix()
- Specified by:
getPathPrefix
in interfaceNavigationNode
- Overrides:
getPathPrefix
in classAbstractNavigationNode
-
setPathPrefix
public void setPathPrefix(String pathPrefix)
-
getPathSeparator
public String getPathSeparator()
- Specified by:
getPathSeparator
in interfaceNavigationNode
- Overrides:
getPathSeparator
in classAbstractNavigationNode
-
setPathSeparator
public void setPathSeparator(String pathSeparator)
-
getIconPrefix
public String getIconPrefix()
- Specified by:
getIconPrefix
in interfaceNavigationNode
- Overrides:
getIconPrefix
in classAbstractNavigationNode
-
setIconPrefix
public void setIconPrefix(String iconPrefix)
-
getIconSeparator
public String getIconSeparator()
- Specified by:
getIconSeparator
in interfaceNavigationNode
- Overrides:
getIconSeparator
in classAbstractNavigationNode
-
setIconSeparator
public void setIconSeparator(String iconSeparator)
-
getIconSuffix
public String getIconSuffix()
- Specified by:
getIconSuffix
in interfaceNavigationNode
- Overrides:
getIconSuffix
in classAbstractNavigationNode
-
setIconSuffix
public void setIconSuffix(String iconSuffix)
-
getI18nPrefix
public String getI18nPrefix()
- Specified by:
getI18nPrefix
in interfaceNavigationNode
- Overrides:
getI18nPrefix
in classAbstractNavigationNode
-
setI18nPrefix
public void setI18nPrefix(String i18nPrefix)
-
getI18nSeparator
public String getI18nSeparator()
- Specified by:
getI18nSeparator
in interfaceNavigationNode
- Overrides:
getI18nSeparator
in classAbstractNavigationNode
-
setI18nSeparator
public void setI18nSeparator(String i18nSeparator)
-
getI18nSuffix
public String getI18nSuffix()
- Specified by:
getI18nSuffix
in interfaceNavigationNode
- Overrides:
getI18nSuffix
in classAbstractNavigationNode
-
setI18nSuffix
public void setI18nSuffix(String i18nSuffix)
-
getViewSuffix
public String getViewSuffix()
- Specified by:
getViewSuffix
in interfaceNavigationNode
- Overrides:
getViewSuffix
in 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
-
-