|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.hp.hpl.swade.portal.FilterState
Representation for the current state of a multi-dimensional filter. Instances of this will comprise a number of FacetStates each representing one dimension of the filter.
| Field Summary | |
protected DataSource |
datasource
The data source underlying this facet set |
protected java.util.Map |
refinementMap
Map from facets to cached refinement count states |
protected java.util.ArrayList |
states
The set of FacetStates in this filter set |
protected java.util.List |
wrappedResults
An optional cached set of results of running this filter |
| Constructor Summary | |
FilterState(DataSource datasource)
Constructor. |
|
| Method Summary | |
void |
addFacetState(FacetState facetState)
Add a new FacetState to filter set. |
DataSource |
getDataSource()
Return the data source being filtered by this set. |
java.lang.String |
getEncoding()
Return the set of facet states as a URLencoded string that could be embedded in an HTML tag to allow linking to this state. |
FacetState |
getFacetState(Facet facet)
Return the facet state corresponding to the given facet. |
java.util.List |
getFacetStates()
Return an iterator over all the FacetStates which make up this set. |
NodeWrapper |
getMatch(int i)
Return the resource at position i in the match list. |
java.util.Iterator |
getMatches()
Return an unordered iterator over those RDF root resources which match this filter state. |
int |
getMatchIndex(ResourceWrapper resource)
Return the index of the given resource in the match list (-1 if not there). |
java.util.List |
getMatchList()
Return a set of wrapper resource objects which match this filter state. |
java.util.List |
getMatchList(int start,
int length)
Return length limited subset of the wrapper resource objects which match this filter state. |
int |
getRefinementCount(FacetState facetState)
Return how many times the given FacetState refinement occurs in the context of this filter state. |
java.util.List |
getRefinements(Facet facet)
Return a list of all of the refinements (child facet states) for the given facet available within the context of the current filter. |
int |
getSize()
Return the number of matches in the list. |
boolean |
isRoot()
Return true if this is the empty filter state (all facetstates are root). |
boolean |
matchesReady()
Return true if there is already a cached copy of the list of RDF resources matching this filter. |
FilterState |
refine(FacetState facetState)
Refine the filter by using the supplied facetstate instead of the current state for the corresponding facet. |
FilterState |
removeFacet(Facet facet)
Return a new filter state which is a clone of this one except with the given facet removed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.ArrayList states
protected java.util.Map refinementMap
protected DataSource datasource
protected java.util.List wrappedResults
| Constructor Detail |
public FilterState(DataSource datasource)
| Method Detail |
public boolean matchesReady()
public java.util.Iterator getMatches()
public java.util.List getMatchList()
public java.util.List getMatchList(int start,
int length)
public int getMatchIndex(ResourceWrapper resource)
public NodeWrapper getMatch(int i)
public int getSize()
public boolean isRoot()
public DataSource getDataSource()
public java.util.List getFacetStates()
public FacetState getFacetState(Facet facet)
public FilterState removeFacet(Facet facet)
public void addFacetState(FacetState facetState)
public java.util.List getRefinements(Facet facet)
public int getRefinementCount(FacetState facetState)
public FilterState refine(FacetState facetState)
public java.lang.String getEncoding()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||