|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.spectacle.gee.NavigationTree
public class NavigationTree
Class NavigationTree: the instantiation of a navigation specification.
The virtual navigation space through a set of objects (e.g. travels, books, documents) is
specified by the NavigationSpecification. The paths that are really taken (and 'remembered')
in this virtual navigation space are reified by NavigationTree. It's really all about
performance and memory footprint in this class.
| Field Summary | |
|---|---|
static int |
NAVIGATION_BY_CONTENT
There are only content steps at the current node. |
static int |
NAVIGATION_BY_CONTENT_AND_META
There are only both content and meta steps at the current node. |
static int |
NAVIGATION_BY_META
There are only meta steps at the current node. |
static int |
NAVIGATION_BY_NONE
There are no steps at the current node. |
| Constructor Summary | |
|---|---|
NavigationTree(Collection entities,
NavigationSpecification navigationSpecification,
SectionRenderer renderer)
Construct a tree for a set of entities, a navigation specification and a renderer. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
void |
gc()
Garbage collect the tree. |
Map |
getAlternativeSizes(MetaValueList mvl,
int index)
Return a map of the alternative branches/their sizes (String,Integer) for the index position. |
NavigationTree |
getBranch(String name,
boolean remember)
Get a branch of the current node (or null if non-existent). |
Map |
getBranches()
This is an expensive call, don't use it, unless you really have to. |
Map |
getBranches(boolean remember)
Get the non-null branches of the current node with their names. |
Set |
getBranchNames(String name)
Get the names of all children of the named child. |
Map |
getBranchSizes(Collection names)
Get the sizes of all children of the named children. |
Map |
getBranchSizes(String name)
Get the sizes of all children of the named child. |
Map |
getBranchSizes(String name,
Collection subnames)
Get the sizes of a selected collection of children of the named child. |
Set |
getChildLabels()
The set that is returned can be non-empty only for nodes whose node type is meta. |
Map |
getClusters(Collection allMPVs)
Get all clusters as they occur by viewing the collection of MetaPlusValues. |
List |
getEntities()
|
int |
getEntitiesSize()
|
List |
getIntersection(String label)
|
MetaValueList |
getMetaParts(PathString path)
Split a tree in its Meta + Value(s) parts. |
MetaValueList |
getMetaParts(String path)
|
String |
getName()
|
int |
getNavigationType()
Get the type of navigation at this node, i.e. |
int |
getNodeType()
Get the type of this node, i.e. |
Set |
getOccurringLabels()
Don't use this call anymore, although it's still supported, it's obsoleted. |
Collection |
getPotentialBranches()
Get the names of all potential branches. |
Set |
getSharedLabels()
Note: it is important that the result is a Set. |
List |
getSharedLabelsList()
Note: it is important that the result is a List. |
NavigationTree |
getTree(MetaValueList mvl,
boolean remember)
|
NavigationTree |
getTree(PathString path,
boolean remember)
Get the tree that corresponds to a path or null (for non-existing paths). |
NavigationTree |
getTree(String path,
boolean remember)
|
int |
numberOfPotentialBranches()
Get the potential number of branches. |
void |
removeBranch(String name)
Remove a named branch. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int NAVIGATION_BY_NONE
public static int NAVIGATION_BY_CONTENT
public static int NAVIGATION_BY_META
public static int NAVIGATION_BY_CONTENT_AND_META
| Constructor Detail |
|---|
public NavigationTree(Collection entities,
NavigationSpecification navigationSpecification,
SectionRenderer renderer)
entities - the collection of objectsnavigationSpecification - the navigation specification (the virtual navigation space)renderer - the renderer (passed for its properties only, not for rendering)| Method Detail |
|---|
public String getName()
public Set getSharedLabels()
public List getSharedLabelsList()
public Set getOccurringLabels()
public Set getChildLabels()
MetaNavigationStep.setContentType(int)public List getEntities()
public int getEntitiesSize()
public int getNavigationType()
public int getNodeType()
public final boolean equals(Object other)
equals in class Object
public NavigationTree getBranch(String name,
boolean remember)
name - the name of the branch requestedremember - if true, you must remember the branch for its state,
if false, you may remember the branch for performance
public void removeBranch(String name)
public Map getBranches()
getBranches(boolean)public Map getBranches(boolean remember)
remember - if true, you must remember the branches for its state,
if false, you may remember the branches for performance
getBranchNames(String),
getBranchSizes(String),
getBranchSizes(Collection),
getBranchSizes(String, Collection),
getAlternativeSizes(MetaValueList, int)public int numberOfPotentialBranches()
public NavigationTree getTree(PathString path,
boolean remember)
path - the pathremember - if true the resulting tree should be persistent
(to keep track of state)
public NavigationTree getTree(String path,
boolean remember)
getTree(PathString, boolean)
public NavigationTree getTree(MetaValueList mvl,
boolean remember)
getTree(PathString, boolean)public void gc()
public MetaValueList getMetaParts(String path)
getMetaParts(PathString path)public MetaValueList getMetaParts(PathString path)
path - the path to be split
public Collection getPotentialBranches()
public Map getBranchSizes(String name)
name - a candidate for a branch (the branch may not exist at all, e.g. because it is empty)
getBranchSizes(Collection),
getBranchSizes(String, Collection)
public Map getBranchSizes(String name,
Collection subnames)
name - a candidate for a branch (the branch may not exist at all)subnames - a subset of the names of the candidate's branch potential children
getBranchSizes(String),
getBranchSizes(Collection)public Map getBranchSizes(Collection names)
names - candidates for a branch (the branch may not exist at all)
getBranchSizes(String),
getBranchSizes(String, Collection)public Set getBranchNames(String name)
name - a candidate for a branch (the branch may not exist at all)
public Map getAlternativeSizes(MetaValueList mvl,
int index)
mvl - the meta/value listindex - the position for which alternative sizes are requested
getMetaParts(PathString)public Map getClusters(Collection allMPVs)
allMPVs - a collection of MetaPlusValues
public List getIntersection(String label)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||