public class FacetResult extends Object
Constructor and Description |
---|
FacetResult(FacetRequest facetRequest,
FacetResultNode rootNode,
int numValidDescendants) |
Modifier and Type | Method and Description |
---|---|
FacetRequest |
getFacetRequest()
Request for which this result was obtained.
|
FacetResultNode |
getFacetResultNode()
Facet result node matching the root of the
facet request . |
int |
getNumValidDescendants()
Number of descendants of
root facet result
node , up till the requested depth. |
static List<FacetResult> |
mergeHierarchies(List<FacetResult> results,
TaxonomyReader taxoReader,
Map<String,FacetArrays> dimArrays)
A utility for merging multiple
FacetResult of the same
(hierarchical) dimension into a single FacetResult , to reconstruct
the hierarchy. |
String |
toString() |
String |
toString(String prefix)
String representation of this facet result.
|
public FacetResult(FacetRequest facetRequest, FacetResultNode rootNode, int numValidDescendants)
public static List<FacetResult> mergeHierarchies(List<FacetResult> results, TaxonomyReader taxoReader, Map<String,FacetArrays> dimArrays) throws IOException
FacetResult
of the same
(hierarchical) dimension into a single FacetResult
, to reconstruct
the hierarchy. The results are merged according to the following rules:
CategoryPath
), they are merged.
FacetArrays
).
NOTE: the returned results are not guaranteed to be in the same order of the input ones.
results
- the results to mergetaxoReader
- the TaxonomyReader
to use when creating missing ancestor
nodesdimArrays
- a mapping from a dimension to the respective FacetArrays
from which to pull the nodes valuesIOException
public final FacetResultNode getFacetResultNode()
facet request
.getFacetRequest()
,
FacetRequest.categoryPath
public final int getNumValidDescendants()
root facet result
node
, up till the requested depth.public final FacetRequest getFacetRequest()
public String toString(String prefix)
prefix
- prefix for each result linetoString()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.