|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.spectacle.gee.NavigationSpecification
public class NavigationSpecification
Class NavigationSpecification implements a way to specify a hierarchical
navigation structure based on a list of sets of content-criteria (labels)
or meta-criteria.
Note that the cartesian product (!) of the steps in the levels is
the potential navigation. However, a lot of the resulting paths will be empty and
those paths will be discarded. As a result, the cartesian product may
automatically be pruned to a intuitive tree.
An example will clearify the point. Suppose your objects are "cities"
and they are classified by continent and country.
Supppose also that your NavigationSpecification reads:
[ [ North-America South-America Europe Asia Africa Australia ] [ ... US ... Netherlands ... ] ]
There is no city that is classified by both North-America and Netherlands.
Therefore, the navigation path "North-America > Netherlands", even though is could
have existed according to the navigation specification, will not exist in
the navigation tree.
An alternative way to phrase this: the navigation tree is the instantiation of the
navigation specification, based on the classifications of a set of entities.
Or: the navigation specification contains the schema of the navigation tree.
| Field Summary | |
|---|---|
protected List |
_navigationSteps
The sets of NavigationSteps to apply at each level in the navigation tree. |
| Constructor Summary | |
|---|---|
NavigationSpecification()
Construct a new empty NavigationSpecification. |
|
| Method Summary | |
|---|---|
void |
add(Set navigationSteps)
Add a set of NavigationSteps, specifying a new level in the tree. |
void |
addLabelSet(EntityContext context,
Set labels)
Add a label set and use the default 0.0 minimum step selection. |
void |
addLabelSet(EntityContext context,
Set labels,
double minimumSelection)
Add a set of labels, specifying a new level in the tree. |
void |
allowContentSteps(Map allowed)
Set, for a set of labels, the labels that may follow it anywhere in the navigation tree. |
static NavigationSpecification |
concat(NavigationSpecification first,
NavigationSpecification second)
Concatenate two NavigationSpecifications. |
void |
denyContentSteps(Map denied)
Set, for a set of labels, the labels that may not follow it anywhere in the navigation tree. |
boolean |
equals(Object other)
Compare the specified object with this navigation specification for equality. |
Set |
get(int level)
Get the set of navigation steps at the specified level. |
Map |
getAllowContentSteps()
|
NavigationStep[] |
getArray(int level)
Get the basic type array of navigation steps at the specified level. |
int |
getBreadth(int level)
Get the number of navigation steps at the specified level (of the specification). |
Set |
getChildLabels()
Get the labels used by the most direct children. |
Map |
getDenyContentSteps()
|
Map |
getLabelMap(int level)
To be used within the Spectacle Server only, when "this" is completely stable! Note: due to master/slave classifier situations, the Map may NOT be complete, therefore whenever you really find what you mean in the map use it, otherwise, search all values returned by e.g. |
Map |
getMap(int level)
To be used within the Spectacle Server only, when "this" is completely stable! Note: due to master/slave classifier situations, the Map may NOT be complete, therefore whenever you really find what you mean in the map use it, otherwise, search all values returned by e.g. |
List |
getNavigationSteps()
|
int |
hashCode()
|
static Map |
mergeSetMaps(Map first,
Map second)
Merge two maps of key/set pairs. |
int |
size()
Get the number of specification levels, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List _navigationSteps
| Constructor Detail |
|---|
public NavigationSpecification()
| Method Detail |
|---|
public void allowContentSteps(Map allowed)
allowed - label/set-of-labels pairspublic Map getAllowContentSteps()
allowContentSteps(Map)public void denyContentSteps(Map denied)
denied - label/set-of-labels pairspublic Map getDenyContentSteps()
denyContentSteps(Map)public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getBreadth(int level)
level - the level (0 based)
public int size()
public Set get(int level)
level - the level (0 based)
public NavigationStep[] getArray(int level)
level - the level (0 based)
public Map getMap(int level)
level - the level (0 based)
public Map getLabelMap(int level)
public void addLabelSet(EntityContext context,
Set labels)
addLabelSet(EntityContext, Set, double)
public void addLabelSet(EntityContext context,
Set labels,
double minimumSelection)
context - the entity context, which is used to determine the symbolic value of each labellabels - the set of labels to addminimumSelection - the minimum step selection rate to apply for each labelEntityContext,
ContentNavigationSteppublic void add(Set navigationSteps)
navigationSteps - the set of NavigationSteps.ContentNavigationStep,
MetaNavigationSteppublic Set getChildLabels()
public static NavigationSpecification concat(NavigationSpecification first,
NavigationSpecification second)
first - a NavigationSpecificationsecond - a NavigationSpecification
public static Map mergeSetMaps(Map first,
Map second)
first - map of key/set pairs or nullsecond - map of key/set pairs or null
public List getNavigationSteps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||