org.palo.api
Interface HierarchyFilter


public interface HierarchyFilter

A HierarchyFilter is used to decide which Elements of a base Hierarchy are visible in its associated virtual hierarchy.

Version:
$ID$

Method Summary
 boolean acceptElement(Element element)
          Return true if the given Element passes the filter, otherwise return false.
 void init(Hierarchy hierarchy)
          Inits the filter and passes a reference to the virtual hierarchy owning the filter.
 boolean isFlat()
          Turns this dimension into a flat dimension loosing and hierarchies and consolidations.
 ElementNode[] postprocessRootNodes(ElementNode[] rootNodes)
          If and only if the dimension is flat, this method can be used to post-process the root element nodes.
 

Method Detail

init

void init(Hierarchy hierarchy)
Inits the filter and passes a reference to the virtual hierarchy owning the filter.

Parameters:
hierarchy - the owning virtual dimension of the filter.

acceptElement

boolean acceptElement(Element element)
Return true if the given Element passes the filter, otherwise return false.

Parameters:
element - the Element that is being filtered.
Returns:
true to pass, false to filter out.

isFlat

boolean isFlat()
Turns this dimension into a flat dimension loosing and hierarchies and consolidations.

Returns:
true if the dimension is flat.

postprocessRootNodes

ElementNode[] postprocessRootNodes(ElementNode[] rootNodes)
If and only if the dimension is flat, this method can be used to post-process the root element nodes.

Parameters:
rootNodes - the original root nodes.
Returns:
a new array of root nodes or null if the original root nodes should be used.