info.aduna.gee.spectacle.gee
Class MetaNavigationStep

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.NavigationStep
      extended by info.aduna.gee.spectacle.gee.MetaNavigationStep
All Implemented Interfaces:
Comparable

public class MetaNavigationStep
extends NavigationStep
implements Comparable

A MetaNavigationStep corresponds to an option for a user to select the next type of classification restriction to the current set.

For example, in a set of travel destinations the next type of classification that could be selected is e.g. the number of rooms, the country or the means of transport.

In the literature, the term "facet" is often used for a MetaNavigationStep.

Note: in most Spectacle applications, the user never encounters the "facet" selection as a real step. That is because e.g. he selects "Belgium" in the "Country" menu. But in fact he is taking two steps at a time: he indicates he wants to use the "Country" facet and he indicates the value for the facet just selected.


Field Summary
static int CONTENTS_OF_CHILDREN
          The contents of the metastep is the union of the contents of all children of the metastep.
static int CONTENTS_OF_PARENT
          The contents of the metastep is the contents of the parent of the metastep.
 
Fields inherited from class info.aduna.gee.spectacle.gee.NavigationStep
_minimumStepSelection, _name
 
Constructor Summary
MetaNavigationStep()
          For serialization only.
MetaNavigationStep(Object name, NavigationSpecification navSpec)
          Use the default for all parameters not provided.
MetaNavigationStep(Object name, NavigationSpecification navSpec, double minimumStepSelection)
          Use the default for all parameters not provided.
MetaNavigationStep(Object name, NavigationSpecification navSpec, double minimumStepSelection, Object internalName)
          Use the default for all parameters not provided.
MetaNavigationStep(Object name, NavigationSpecification navSpec, double minimumStepSelection, Object internalName, int contentType)
           
MetaNavigationStep(Object name, NavigationSpecification navSpec, Object internalName)
          Use the default for all parameters not provided.
 
Method Summary
 Object clone()
           
 int compareTo(Object other)
           
 MetaNavigationStep concat(NavigationSpecification navSpec)
          Note the current MetaNavigationStep doesn't change!
 boolean equals(Object other)
          Compares the specified object with this meta navigation step for equality.
 int getContentType()
           
 String getInternalName()
          Get the internal identification of the MetaNavigation.
 NavigationSpecification getNavigationSpecification()
           
 int hashCode()
           
static NavigationSpecification permutations(Collection metaNavigationSteps)
          Deprecated. use NavigationRules
static NavigationSpecification permutations(Collection metaNavigationSteps, int maxDepth)
          Deprecated. use NavigationRules
static NavigationSpecification permutations(Collection metaNavigationSteps, NavigationRules rules)
           
 void setContentType(int contentType)
          Don't use CONTENTS_OF_CHILDREN unless absolutely required.
 void setNavigationSpecification(NavigationSpecification navSpec)
          Set the complete navigation specificiation.
 
Methods inherited from class info.aduna.gee.spectacle.gee.NavigationStep
getMinimumStepSelection, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENTS_OF_PARENT

public static final int CONTENTS_OF_PARENT
The contents of the metastep is the contents of the parent of the metastep.

See Also:
Constant Field Values

CONTENTS_OF_CHILDREN

public static final int CONTENTS_OF_CHILDREN
The contents of the metastep is the union of the contents of all children of the metastep.

See Also:
Constant Field Values
Constructor Detail

MetaNavigationStep

public MetaNavigationStep()
For serialization only.


MetaNavigationStep

public MetaNavigationStep(Object name,
                          NavigationSpecification navSpec)
Use the default for all parameters not provided.

See Also:
MetaNavigationStep(Object, NavigationSpecification, double, Object, int)

MetaNavigationStep

public MetaNavigationStep(Object name,
                          NavigationSpecification navSpec,
                          double minimumStepSelection)
Use the default for all parameters not provided.

See Also:
MetaNavigationStep(Object, NavigationSpecification, double, Object, int)

MetaNavigationStep

public MetaNavigationStep(Object name,
                          NavigationSpecification navSpec,
                          Object internalName)
Use the default for all parameters not provided.

See Also:
MetaNavigationStep(Object, NavigationSpecification, double, Object, int)

MetaNavigationStep

public MetaNavigationStep(Object name,
                          NavigationSpecification navSpec,
                          double minimumStepSelection,
                          Object internalName)
Use the default for all parameters not provided.

See Also:
MetaNavigationStep(Object, NavigationSpecification, double, Object, int)

MetaNavigationStep

public MetaNavigationStep(Object name,
                          NavigationSpecification navSpec,
                          double minimumStepSelection,
                          Object internalName,
                          int contentType)
Parameters:
name - the name of this meta navigation step, which should support toString()
navSpec - the navigation specification 'following' (or 'represented by', see the introduction of this class) this meta navigation step
minimumStepSelection - don't generate this step if none of the substeps removes at least this fraction of the entities (default value: 0.0)
internalName - the internal identification for this navigation step (which should support toString()) or null. A unique, non-null value is required when different meta steps have identical names. (default value: null)
contentType - one of CONTENTS_OF_PARENT, CONTENTS_OF_CHILDREN (default value: CONTENTS_OF_PARENT)
Method Detail

getInternalName

public String getInternalName()
Get the internal identification of the MetaNavigation.


equals

public boolean equals(Object other)
Compares the specified object with this meta navigation step for equality.

Specified by:
equals in class NavigationStep

hashCode

public int hashCode()
Specified by:
hashCode in class NavigationStep

getNavigationSpecification

public NavigationSpecification getNavigationSpecification()
Returns:
the navigation specification 'following' this meta step

setNavigationSpecification

public void setNavigationSpecification(NavigationSpecification navSpec)
Set the complete navigation specificiation.

Parameters:
navSpec - the navigation specificiation

permutations

public static NavigationSpecification permutations(Collection metaNavigationSteps)
Deprecated. use NavigationRules

Note that for a lot of applications the usage of Set's of MetaNavigationSteps is the most natural thing to do. However, you might have a need for recurring MetaNavigationSteps, e.g. when you can select 2 or more features from a list. Set's wouldn't allow you to do that, but you can use any Collection type such as e.g. a List to contain the meta navigation steps. And then you'll be able to use recurring MetaNavigationSteps.


permutations

public static NavigationSpecification permutations(Collection metaNavigationSteps,
                                                   int maxDepth)
Deprecated. use NavigationRules

Generate all permutations of a Collection of MetaNavigationSteps, but limit the maximum depth (in meta steps only!) of each result.


permutations

public static NavigationSpecification permutations(Collection metaNavigationSteps,
                                                   NavigationRules rules)
Parameters:
metaNavigationSteps - the collection of metasteps to be permuted
rules - the rules that control the navigation specification

getContentType

public int getContentType()
Returns:
one of CONTENTS_OF_PARENT, CONTENTS_OF_CHILDREN
See Also:
CONTENTS_OF_PARENT, CONTENTS_OF_CHILDREN

setContentType

public void setContentType(int contentType)
Don't use CONTENTS_OF_CHILDREN unless absolutely required. It's less efficient to calculate.

Parameters:
contentType - one of CONTENTS_OF_PARENT, CONTENTS_OF_CHILDREN
See Also:
CONTENTS_OF_PARENT, CONTENTS_OF_CHILDREN

concat

public MetaNavigationStep concat(NavigationSpecification navSpec)
Note the current MetaNavigationStep doesn't change!

Returns:
a MetaNavigationStep which is the result of concatenating a NavigationSpecification with the current.

clone

public Object clone()
Overrides:
clone in class Object

compareTo

public int compareTo(Object other)
Specified by:
compareTo in interface Comparable


Copyright © 1997-2008 Aduna. All Rights Reserved.