pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.model.aggregation
Class AbstractTreeElement<T extends AbstractTreeElement<T>>

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.Node
          extended by org.torweg.pulse.component.statistics.model.aggregation.AbstractTreeElement<T>
Type Parameters:
T - the actual implementation of the AbstractTreeElement
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PathTreeElement, RefererTreeElement

@MappedSuperclass
public abstract class AbstractTreeElement<T extends AbstractTreeElement<T>>
extends Node

An abstract base class to derive the nodes the AbstractTreeAggregation operates on from.

Version:
$Revision: 1579 $
Author:
Daniel Dietz
See Also:
Serialized Form

Field Summary
protected static org.slf4j.Logger LOGGER
          The logger.
 
Constructor Summary
AbstractTreeElement()
           
 
Method Summary
 T getChildByPathString(java.lang.String path)
          Returns a child of the Node by given path.
 java.lang.String getPathString()
          Returns the pathString as represented by this AbstractTreeElement .
 StatisticsServer getStatisticsServer()
          returns the statistics server the path element belongs to.
 boolean isRootNode()
          Indicates whether the current AbstractTreeElement is a root- AbstractTreeElement.
protected  void setPathString(StatisticsServer statisticsServer)
          Sets the pathString to empty string.
protected  void setPathString(java.lang.String pString)
          Returns the pathString as represented by this AbstractTreeElement .
protected  void setRooNode(boolean isRootNode)
          Sets the rootNode for the AbstractTreeElement.
protected  void setServer(StatisticsServer s)
          Sets the StatisticsServer.
 java.lang.String toString()
           
 
Methods inherited from class org.torweg.pulse.util.entity.Node
addChild, addChild, getChild, getChildIndex, getChildren, getParent, hasChildren, removeChild, setChildren, toJSON
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
The logger.

Constructor Detail

AbstractTreeElement

public AbstractTreeElement()
Method Detail

setServer

protected void setServer(StatisticsServer s)
Sets the StatisticsServer.

Parameters:
s - the StatisticsServer

getStatisticsServer

public final StatisticsServer getStatisticsServer()
returns the statistics server the path element belongs to.

Returns:
the statistics server the path element belongs to

isRootNode

public final boolean isRootNode()
Indicates whether the current AbstractTreeElement is a root- AbstractTreeElement.

Returns:
the rootNode: true if and only if the current AbstractTreeElement is a root- AbstractTreeElement, false otherwise

setRooNode

protected final void setRooNode(boolean isRootNode)
Sets the rootNode for the AbstractTreeElement.

Parameters:
isRootNode - true to mark the AbstractTreeElement as root node, false otherwise

getPathString

public final java.lang.String getPathString()
Returns the pathString as represented by this AbstractTreeElement .

Returns:
the pathString

setPathString

protected final void setPathString(java.lang.String pString)
Returns the pathString as represented by this AbstractTreeElement .

Parameters:
pString - the pathString to set
Throws:
java.lang.NullPointerException - if the pString is null
java.lang.IllegalArgumentException - if the pString is an empty string or contains whitespace-characters only

setPathString

protected final void setPathString(StatisticsServer statisticsServer)
Sets the pathString to empty string.

Parameters:
statisticsServer - a StatisticsServer
Throws:
java.lang.NullPointerException - if the statisticsServer is null

getChildByPathString

public final T getChildByPathString(java.lang.String path)
Returns a child of the Node by given path.

Parameters:
path - the name of the path element
Returns:
the Node or null if not child for the given path exists

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
string representation of the PathTreeAggregation