Examples of Aggregator


Examples of org.apache.jackrabbit.vault.fs.api.Aggregator

    }

    private boolean needsDir(Aggregate aggregate) throws RepositoryException, PathNotFoundException,
            ValueFormatException {

        Aggregator aggregator = fs.getAggregateManager().getAggregator(aggregate.getNode(), null);
        boolean needsDir = true;
        if (aggregator instanceof FileAggregator) {
            needsDir = false;
            // TODO - copy-pasted from FileAggregator, and really does not belong here...
            Node content = aggregate.getNode();
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.Aggregator

     */
    public void dump(DumpContext ctx, boolean isLast) {
        ctx.println(isLast, "aggregators");
        ctx.indent(isLast);
        for (Iterator<Aggregator> iter = aggregators.iterator(); iter.hasNext();) {
            Aggregator a = iter.next();
            a.dump(ctx, !iter.hasNext());
        }
        ctx.outdent();
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.Aggregator

    private void processAggregate(Element elem) throws ConfigurationException {
        String type = elem.getAttribute("type");
        if (type == null || type.equals("")) {
            type = "generic";
        }
        Aggregator aggregator = Registry.getInstance().createAggregator(type);
        if (aggregator == null) {
            fail("Aggregator of type " + type + " is not registered.", elem);
        }
        if (aggregator instanceof GenericAggregator) {
            GenericAggregator ga = (GenericAggregator) aggregator;
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.Aggregator

            boolean isIncluded = mgr.getWorkspaceFilter().contains(path);
            if (coverSet == null && !isAncestor) {
                continue;
            }
            // check if another aggregator can handle this node
            Aggregator a = mgr.getAggregator(n, path);
            // - if the aggregator is null
            // - or the aggregator is the same as ours or the default
            // - and if we include the content as well
            // - then don't use the matched aggregator
            if ((a == null)
                    || ((a == aggregator || a.isDefault())
                        && (aggregator.includes(getNode(), n, path)))) {
                // if workspace does not include this node, ignore it
                if (!isIncluded && !isAncestor) {
                    continue;
                }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.Aggregator

        workspaceFilter = wspFilter;
        aggregatorProvider = new AggregatorProvider(config.getAggregators());
        artifactHandlers = Collections.unmodifiableList(config.getHandlers());

        // init root node
        Aggregator rootAggregator = rootNode.getDepth() == 0
                ? new RootAggregator()
                : getAggregator(rootNode, null);
        root = new AggregateImpl(this, rootNode.getPath(), rootAggregator);

        // setup node types
View Full Code Here

Examples of org.apache.lucene.facet.old.Aggregator

    OldFacetsAccumulator sfa = new OldFacetsAccumulator(newSearchParams, indexReader, taxonomy) {
      @Override
      protected HashMap<CategoryListIterator, Aggregator> getCategoryListMap(
          FacetArrays facetArrays, int partition) throws IOException {
       
        Aggregator aggregator = new CountingAggregator(counts[partition]);
        HashMap<CategoryListIterator, Aggregator> map = new HashMap<CategoryListIterator, Aggregator>();
        for (CategoryListParams clp: facetIndexingParams.getAllCategoryListParams()) {
          map.put(clp.createCategoryListIterator(partition), aggregator);
        }
        return map;
View Full Code Here

Examples of org.apache.lucene.facet.search.Aggregator

    StandardFacetsAccumulator sfa = new StandardFacetsAccumulator(newSearchParams, indexReader, taxonomy) {
      @Override
      protected HashMap<CategoryListIterator, Aggregator> getCategoryListMap(
          FacetArrays facetArrays, int partition) throws IOException {
       
        Aggregator aggregator = new CountingAggregator(counts[partition]);
        HashMap<CategoryListIterator, Aggregator> map = new HashMap<CategoryListIterator, Aggregator>();
        for (CategoryListParams clp: facetIndexingParams.getAllCategoryListParams()) {
          map.put(clp.createCategoryListIterator(partition), aggregator);
        }
        return map;
View Full Code Here

Examples of org.apache.lucene.facet.search.aggregator.Aggregator

    FacetsAccumulator fe = new StandardFacetsAccumulator(newSearchParams, indexReader, taxonomy) {
      @Override
      protected HashMap<CategoryListIterator, Aggregator> getCategoryListMap(
          FacetArrays facetArrays, int partition) throws IOException {
       
        Aggregator aggregator = new CountingAggregator(counts[partition]);
        HashMap<CategoryListIterator, Aggregator> map = new HashMap<CategoryListIterator, Aggregator>();
        for (CategoryListParams clp: facetIndexingParams.getAllCategoryListParams()) {
          final CategoryListIterator cli = clIteraor(clCache, clp, indexReader, partition);
          map.put(cli, aggregator);
        }
View Full Code Here

Examples of org.apache.lucene.facet.search.aggregator.Aggregator

      CategoryListIterator categoryList = entry.getKey();
      if (!categoryList.init()) {
        continue;
      }

      Aggregator categorator = entry.getValue();
      ScoredDocIDsIterator iterator = docids.iterator();
      while (iterator.next()) {
        int docID = iterator.getDocID();
        if (!categoryList.skipTo(docID)) {
          continue;
        }
        categorator.setNextDoc(docID, iterator.getScore());
        long ordinal;
        while ((ordinal = categoryList.nextCategory()) <= Integer.MAX_VALUE) {
          categorator.aggregate((int) ordinal);
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.lucene.facet.search.aggregator.Aggregator

      int partition) throws IOException {
   
    HashMap<CategoryListIterator, Aggregator> categoryLists = new HashMap<CategoryListIterator, Aggregator>();

    for (FacetRequest facetRequest : searchParams.getFacetRequests()) {
      Aggregator categoryAggregator = facetRequest.createAggregator(
          isUsingComplements, facetArrays, indexReader,  taxonomyReader);

      CategoryListIterator cli =
        facetRequest.createCategoryListIterator(indexReader, taxonomyReader, searchParams, partition);
     
      // get the aggregator
      Aggregator old = categoryLists.put(cli, categoryAggregator);

      if (old != null && !old.equals(categoryAggregator)) {
        // TODO (Facet): create a more meaningful RE class, and throw it.
        throw new RuntimeException(
        "Overriding existing category list with different aggregator. THAT'S A NO NO!");
      }
      // if the aggregator is the same we're covered
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.