Class PredefinedBucketsFacetExtractor

    • Constructor Detail

      • PredefinedBucketsFacetExtractor

        public PredefinedBucketsFacetExtractor​(java.lang.String propertyRelPath)
      • PredefinedBucketsFacetExtractor

        public PredefinedBucketsFacetExtractor​(java.lang.String propertyRelPath,
                                               java.util.Collection<? extends PredefinedBucket> buckets)
    • Method Detail

      • addPredefinedBucket

        public void addPredefinedBucket​(PredefinedBucket bucket)
        Adds a predefined bucket to this extractor.
        Parameters:
        definition - the bucket definition to add.
      • getFacet

        public Facet getFacet()
        Description copied from interface: FacetExtractor
        Called after the result set was scanned (and FacetExtractor.handleNode(Node) was called for each node in the result) to retrieve the final Facet object. Please note that this might be called without FacetExtractor.handleNode(Node) ever being called, if the result was empty.

        Implementations can use the simple FacetImpl implementation of the Facet interface.

        Returns:
        an implementation of the Facet interface with all buckets found in the result or null if nothing was found in the result
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object