Class AbstractNavigationNode
- java.lang.Object
-
- org.eclipse.rdf4j.common.webapp.navigation.AbstractNavigationNode
-
- All Implemented Interfaces:
Cloneable
,NavigationNode
- Direct Known Subclasses:
Group
,NavigationNodeBase
,View
public abstract class AbstractNavigationNode extends Object implements NavigationNode
Base implementation of the NavigationNode interface.- Author:
- Herko ter Horst
-
-
Constructor Summary
Constructors Constructor Description AbstractNavigationNode(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyCommonAttributes(NavigationNode node)
boolean
equals(Object other)
int
getDepth()
Get the depth of this node in the hierarchy.String
getI18n()
String
getI18nPrefix()
String
getI18nSeparator()
String
getI18nSuffix()
String
getIcon()
String
getIconPrefix()
String
getIconSeparator()
String
getIconSuffix()
String
getId()
Get the ID of the node.NavigationNode
getParent()
Get the parent node of this node.String
getPath()
String
getPathPrefix()
String
getPathSeparator()
String
getViewSuffix()
int
hashCode()
boolean
isEnabled()
Is the node enabled/active?boolean
isHidden()
Is the node hidden?boolean
isParent(NavigationNode node)
Is this node a parent of the specified node?void
setEnabled(boolean enabled)
Set the enabled status of the node.void
setHidden(boolean hidden)
Set the hidden status of the node.void
setI18n(String i18n)
void
setIcon(String icon)
void
setParent(NavigationNode parent)
Set the parent of this node.void
setPath(String path)
void
setViewSuffix(String viewSuffix)
-
-
-
Constructor Detail
-
AbstractNavigationNode
public AbstractNavigationNode(String id)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:NavigationNode
Get the ID of the node.- Specified by:
getId
in interfaceNavigationNode
- Returns:
- the ID of the node
-
isHidden
public boolean isHidden()
Description copied from interface:NavigationNode
Is the node hidden?- Specified by:
isHidden
in interfaceNavigationNode
- Returns:
- true if the node is hidden, false otherwise
-
setHidden
public void setHidden(boolean hidden)
Description copied from interface:NavigationNode
Set the hidden status of the node.- Specified by:
setHidden
in interfaceNavigationNode
- Parameters:
hidden
- the new hidden status of the node
-
isEnabled
public boolean isEnabled()
Description copied from interface:NavigationNode
Is the node enabled/active?- Specified by:
isEnabled
in interfaceNavigationNode
- Returns:
- true if the node is enabled, false otherwise
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:NavigationNode
Set the enabled status of the node.- Specified by:
setEnabled
in interfaceNavigationNode
- Parameters:
enabled
- the new enabled status of the node
-
getParent
public NavigationNode getParent()
Description copied from interface:NavigationNode
Get the parent node of this node.- Specified by:
getParent
in interfaceNavigationNode
- Returns:
- the parent node of this node, or null if this node is the root NavigationModel
-
setParent
public void setParent(NavigationNode parent)
Description copied from interface:NavigationNode
Set the parent of this node.- Specified by:
setParent
in interfaceNavigationNode
- Parameters:
parent
- the new parent of this node
-
isParent
public boolean isParent(NavigationNode node)
Description copied from interface:NavigationNode
Is this node a parent of the specified node?- Specified by:
isParent
in interfaceNavigationNode
- Parameters:
node
- the node to check- Returns:
- true if this node is a direct or indirect parent of the specified node, false otherwise
-
getPathPrefix
public String getPathPrefix()
- Specified by:
getPathPrefix
in interfaceNavigationNode
-
getPathSeparator
public String getPathSeparator()
- Specified by:
getPathSeparator
in interfaceNavigationNode
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceNavigationNode
-
setPath
public void setPath(String path)
- Specified by:
setPath
in interfaceNavigationNode
-
getIconPrefix
public String getIconPrefix()
- Specified by:
getIconPrefix
in interfaceNavigationNode
-
getIconSeparator
public String getIconSeparator()
- Specified by:
getIconSeparator
in interfaceNavigationNode
-
getIconSuffix
public String getIconSuffix()
- Specified by:
getIconSuffix
in interfaceNavigationNode
-
getIcon
public String getIcon()
- Specified by:
getIcon
in interfaceNavigationNode
-
setIcon
public void setIcon(String icon)
- Specified by:
setIcon
in interfaceNavigationNode
-
getI18nPrefix
public String getI18nPrefix()
- Specified by:
getI18nPrefix
in interfaceNavigationNode
-
getI18nSeparator
public String getI18nSeparator()
- Specified by:
getI18nSeparator
in interfaceNavigationNode
-
getI18nSuffix
public String getI18nSuffix()
- Specified by:
getI18nSuffix
in interfaceNavigationNode
-
getI18n
public String getI18n()
- Specified by:
getI18n
in interfaceNavigationNode
-
setI18n
public void setI18n(String i18n)
- Specified by:
setI18n
in interfaceNavigationNode
-
getViewSuffix
public String getViewSuffix()
- Specified by:
getViewSuffix
in interfaceNavigationNode
-
setViewSuffix
public void setViewSuffix(String viewSuffix)
- Specified by:
setViewSuffix
in interfaceNavigationNode
-
getDepth
public int getDepth()
Description copied from interface:NavigationNode
Get the depth of this node in the hierarchy. The root NavigationModel has depth 0, all other nodes have a depth equal to the depth of their parent + 1.- Specified by:
getDepth
in interfaceNavigationNode
- Returns:
- the depth of the node in the hierarhcy
-
copyCommonAttributes
protected void copyCommonAttributes(NavigationNode node)
-
-