|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.facetmap.sql.SqlSelection
public class SqlSelection
| Nested Class Summary | |
|---|---|
protected static class |
SqlSelection.IdIterator
|
static class |
SqlSelection.SubselectionResourceCount
|
| Field Summary | |
|---|---|
protected java.util.List[] |
backwardSelections
|
protected java.util.List |
compoundHeadingsUsed
|
protected int |
facetCount
|
protected SqlFacetmap |
facetmap
|
protected java.util.List[] |
forwardSelections
|
protected java.util.Map |
headingMap
|
protected java.util.Set[] |
headingSets
|
protected java.util.Properties |
props
|
protected RefCodec |
refCodec
|
protected int |
resultCount
|
protected java.util.List |
results
|
protected boolean |
tagSelection
|
| Constructor Summary | |
|---|---|
SqlSelection(SelectionData selectionData)
|
|
SqlSelection(SqlFacetmap facetmap)
|
|
SqlSelection(SqlFacetmap facetmap,
java.util.Properties props,
Heading[] headings)
|
|
| Method Summary | |
|---|---|
protected java.util.List |
findResults()
|
java.util.Iterator |
getBackwardSelections(Facet facet)
An Enumeration of the Selections that represent "backtracking" in navigation along the given dimension of facetspace. |
java.util.Iterator |
getBackwardSelections(int index)
An array-oriented version of Selection.getHeadings(Facet) . |
int |
getFacetCount()
|
Facetmap |
getFacetmap()
|
java.util.Iterator |
getForwardSelections(Facet facet)
An Enumeration of the Selections that are the possible "next steps" in navigation along the given dimension of facetspace. |
java.util.Iterator |
getForwardSelections(int index)
An array-oriented version of Selection.getHeadings(Facet) . |
Heading[] |
getHeadings()
|
Heading[] |
getHeadings(Facet facet)
Returns the Heading(s) of this selection in a specified facet. |
Heading[] |
getHeadings(int index)
An array-oriented version of Selection.getHeadings(Facet) . |
java.util.Properties |
getProperties()
The properties that were used in the creation of this Selection. |
java.lang.String |
getRef()
Returns a String ID (known as a reference or "ref") that uniquely identifies the Headings used to construct this Selection. |
int |
getResourceCount()
The number of Resources specified by the Headings in this Selection (regardless of any maximum specified by property com.facetmap.Selection.resultLimit). |
SelectedResourceIterator |
getResources()
Presumes that there's enough memory to hold one Integer per record in the result set (capped by com.facetmap.Selection.resultLimit). |
java.util.List |
getSubsetResourceCount(int facetid)
Returns a list of SubselectionResourceCount. |
boolean |
hasTagSelection()
|
boolean |
isMasterRoot()
Returns true if each of this Selection's Headings is the root Heading of its Facet. |
protected void |
setHeadings(Heading[] headings)
|
protected void |
setOtherSelections()
|
protected java.lang.String |
sqlFilterClause()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SqlFacetmap facetmap
protected java.util.Properties props
protected int facetCount
protected java.util.Set[] headingSets
protected java.util.Map headingMap
protected RefCodec refCodec
protected boolean tagSelection
protected java.util.List compoundHeadingsUsed
protected java.util.List[] forwardSelections
protected java.util.List[] backwardSelections
protected int resultCount
protected java.util.List results
| Constructor Detail |
|---|
public SqlSelection(SqlFacetmap facetmap)
throws UnknownReferenceException
UnknownReferenceException
public SqlSelection(SqlFacetmap facetmap,
java.util.Properties props,
Heading[] headings)
public SqlSelection(SelectionData selectionData)
| Method Detail |
|---|
protected void setHeadings(Heading[] headings)
protected void setOtherSelections()
throws InternalException
InternalException
protected java.util.List findResults()
throws InternalException
InternalExceptionpublic boolean hasTagSelection()
public int getResourceCount()
throws InternalException
SelectionThis could be regarded as just a special case of getResourceWeight() , but of course it's by far the most common and we want a method that returns an int.
getResourceCount in interface SelectionInternalExceptionpublic java.util.List getSubsetResourceCount(int facetid)
protected java.lang.String sqlFilterClause()
public java.util.Iterator getBackwardSelections(Facet facet)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
Selection
getBackwardSelections in interface SelectionInternalException
java.lang.ArrayIndexOutOfBoundsExceptionFacet
public java.util.Iterator getBackwardSelections(int index)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
SelectionSelection.getHeadings(Facet) . Provide
the ordinal index number of the Facet within the FacetSpace, instead
of the Facet itself.
getBackwardSelections in interface SelectionInternalException
java.lang.ArrayIndexOutOfBoundsException
public java.util.Iterator getForwardSelections(Facet facet)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
SelectionIf property com.facetmap.Selection.autoSelectOnlyChild is set true, 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 property com.facetmap.Selection.showEmptySelections is set true, this method will return all possible forward Selections in the Facet, even those that contain no resources (as defined by getContainedResources). Otherwise, Selections with no contained resources must not appear in the result.
getForwardSelections in interface SelectionInternalException
java.lang.ArrayIndexOutOfBoundsException
public java.util.Iterator getForwardSelections(int index)
throws InternalException,
java.lang.ArrayIndexOutOfBoundsException
SelectionSelection.getHeadings(Facet) . Provide
the ordinal index number of the Facet within the FacetSpace, instead
of the Facet itself.
getForwardSelections in interface SelectionInternalException
java.lang.ArrayIndexOutOfBoundsException
public SelectedResourceIterator getResources()
throws InternalException
getResources in interface SelectionInternalException
public Heading[] getHeadings(int index)
throws java.lang.ArrayIndexOutOfBoundsException
SelectionSelection.getHeadings(Facet) . Provide
the ordinal index number of the Facet within the FacetSpace, instead
of the Facet itself.
getHeadings in interface Selectionjava.lang.ArrayIndexOutOfBoundsException
public Heading[] getHeadings(Facet facet)
throws java.lang.ArrayIndexOutOfBoundsException
SelectionNote that the return value, because it is an array, can be modified. However, modifying it does not change the state of this underlying Selection. Implementors of Selection should take care that this rule is enforced.
getHeadings in interface Selectionjava.lang.ArrayIndexOutOfBoundsExceptionpublic Heading[] getHeadings()
public int getFacetCount()
getFacetCount in interface Selectionpublic Facetmap getFacetmap()
getFacetmap in interface Selectionpublic java.util.Properties getProperties()
Selection
getProperties in interface SelectionFacetmap.getSelection(Heading[], Properties)public java.lang.String getRef()
SelectionThe reference does not contain information about the Properties used in this selection. If desired, those must be serialized separately.
getRef in interface Selectionpublic boolean isMasterRoot()
Selection
isMasterRoot in interface SelectionFacet.getRootHeading()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||