com.hp.hpl.swade.portal
Interface FacetState

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
AlphaRangeFacetStateImpl, BaseFacetStateImpl, FlatFacetStateImpl, HierarchicalFacetStateImpl, QueryFacetStateImpl

public interface FacetState
extends java.lang.Comparable

A FacetState represents one dimension of a multidimensional browse state. It references a Facet (which defines the constraint dimension) and the data source being browsed.

Version:
$Revision: 1.1.1.1 $ on $Date: 2004/06/15 07:27:03 $
Author:
Dave Reynolds

Nested Class Summary
static class FacetState.Refinement
          Data structure used to represent a refinement of the state with an associated occurance count.
 
Method Summary
 void addToFilter(FilterQuery filter)
          Extend an existing filter query to add the constraint represented by this facet state.
 void countRefinements(RefinementCounter counter)
          Update the counts for how many times the legal refinements of this state occur in the context of this refinement counter.
 java.lang.String getDisplayName()
          Return the displayable name of this facet state.
 java.lang.String getEncoding(DataSource context)
          Return an encoding of this facet state as a string that can be stored in an HTTP request parameter.
 Facet getFacet()
          Return the facet definition.
 FacetState getParent()
          Return the parent facet state if available otherwise return null.
 java.util.List getParents()
          Return the entire parent chain of FacetStates for this state as a collection.
 java.util.List getRefinements(FilterState context)
          Return an ordered list of the possible refinements of of this facet state - may be empty.
 com.hp.hpl.jena.rdf.model.RDFNode getValue()
          Return the RDFNode which represents the selected value for this state.
 boolean isRoot()
          Return true if this the root (unconstrainted) facet state,
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getDisplayName

public java.lang.String getDisplayName()
Return the displayable name of this facet state.


getFacet

public Facet getFacet()
Return the facet definition.


isRoot

public boolean isRoot()
Return true if this the root (unconstrainted) facet state,


getEncoding

public java.lang.String getEncoding(DataSource context)
Return an encoding of this facet state as a string that can be stored in an HTTP request parameter. For the base facet this will return null which need not be explicitly storted in the request.


getRefinements

public java.util.List getRefinements(FilterState context)
Return an ordered list of the possible refinements of of this facet state - may be empty.


countRefinements

public void countRefinements(RefinementCounter counter)
Update the counts for how many times the legal refinements of this state occur in the context of this refinement counter. The counter both supplies the FilterState context in which the values occur and acts as a state object in which to accumulate the count values.


getParent

public FacetState getParent()
Return the parent facet state if available otherwise return null. Only useful for taxanomic facets.


getParents

public java.util.List getParents()
Return the entire parent chain of FacetStates for this state as a collection. In order from the most general to the most refined.


addToFilter

public void addToFilter(FilterQuery filter)
Extend an existing filter query to add the constraint represented by this facet state. Side-effectful design, sorry.


getValue

public com.hp.hpl.jena.rdf.model.RDFNode getValue()
Return the RDFNode which represents the selected value for this state. This may be too specific a representation but go with it for now, it gives us a way of indexing from RDF data to FacetStates which is needed in refinement counting.



Copyright © 2004 Hewlett-Packard. All Rights Reserved.