|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Encapsulates the available navigation options as well as the current result set of Resources. A Selection is similar to a category that resources fit into -- except that, because it's a permutation of multiple Headings, it's not generally predefined as a category. An implementation of Selection should contain the logic to generate such "categories" on the fly.
The source data for a Selection are simply Headings, one along each Facet dimension. The resultant data -- selected Resources, forward navigation, and backward navigation -- can be determined from the Headings in the Selection.
| Method Summary | |
boolean |
containsAnyResources()
|
void |
decodeRef(java.lang.String refCode)
Sets the Headings of this Selection according to the given ref. |
java.util.Enumeration |
getBackwardSelections(int index)
An Enumeration of the Selections that represent "backtracking" in navigation along the given dimension of facetspace. |
int |
getContainedResourceCount()
|
Resource[] |
getContainedResources()
A Resource may have a Heading that is contained by a Heading in this Selection. |
int |
getDimensionCount()
|
java.util.Enumeration |
getForwardSelections(int index)
An Enumeration of the Selections that are the possible "next steps" in navigation along the given dimension of facetspace. |
Heading |
getHeading(int index)
Returns the Heading along the given dimension of facetspace. |
Map |
getMap()
|
int |
getMatchedResourceCount()
|
Resource[] |
getMatchedResources()
If each of a Resource's Headings match this Selection's Headings, then that Resource is included in the returned array. |
java.lang.String |
getRef()
Returns a String ID (known as a reference or "ref") that uniquely identifies this Selection. |
boolean |
isMasterRoot()
Returns true if each of this Selection's Headings is the Root of its Facet. |
boolean |
matchesAnyResources()
|
void |
setHeading(Heading heading)
Sets the given Heading as a Heading of this Selection. |
| Method Detail |
public Map getMap()
public int getDimensionCount()
public boolean isMasterRoot()
Facet.getRootHeading()public java.lang.String getRef()
public void decodeRef(java.lang.String refCode)
throws UnknownReferenceException
UnknownReferenceException
public Heading getHeading(int index)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void setHeading(Heading heading)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public boolean containsAnyResources()
throws InternalException
InternalException
public boolean matchesAnyResources()
throws InternalException
InternalException
public int getMatchedResourceCount()
throws InternalException
InternalException
public int getContainedResourceCount()
throws InternalException
InternalException
public Resource[] getMatchedResources()
throws InternalException
InternalException
public Resource[] getContainedResources()
throws InternalException
InternalException
public java.util.Enumeration getForwardSelections(int index)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
If autoSelectOnlyChild is set true on this Selection's Map, then this method may not return exactly one Selection (an "only child"). If it would ordinarily return an only child, it must return the forward selections of that child (and act recursively until the size of the result set is not one).
If showEmptySelections is set true on this Selection's Map, this method will return all possible forward Selections, even those that contain no resources (as defined by getContainedResources). Otherwise, Selections with no contained resources must not appear in the result.
InternalException
java.lang.ArrayIndexOutOfBoundsExceptionMap.setAutoSelectOnlyChild(boolean),
Map.setShowEmptySelections(boolean)
public java.util.Enumeration getBackwardSelections(int index)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
InternalException
java.lang.ArrayIndexOutOfBoundsExceptionFacet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||