Examples of Aggregate


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

            if (chain == null) {
              return null;
            }

            Aggregate aggregate = chain.get(chain.size() - 1);

            String fileOrFolderPathHint = calculateFileOrFolderPathHint(chain);

            String nameHint = PlatformNameFormat.getPlatformName(aggregate.getName());

            SerializationKind serializationKind = getSerializationKind(aggregate);

            if (resource.getPath().equals("/") || serializationKind == SerializationKind.METADATA_PARTIAL
                    || serializationKind == SerializationKind.FILE || serializationKind == SerializationKind.FOLDER) {
View Full Code Here

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

    private String calculateFileOrFolderPathHint(List<Aggregate> chain) throws RepositoryException {

        ListIterator<Aggregate> aggs = chain.listIterator();
        StringBuilder out = new StringBuilder();
        while (aggs.hasNext()) {
            Aggregate cur = aggs.next();
            if (aggs.previousIndex() == 0) {
                out.append(PlatformNameFormat.getPlatformPath(cur.getPath()));
            } else {
                out.append("/");
                out.append(PlatformNameFormat.getPlatformPath(cur.getRelPath()));
            }

            if (needsDir(cur)) {
                SerializationKind serializationKind = getSerializationKind(cur);
View Full Code Here

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

            String parentPath = Text.getRelativeParent(resource.getPath(), 1);
            while (!parentPath.equals("/")) {
                VaultFile parentFile = fs.getFile(PlatformNameFormat.getPlatformPath(parentPath));

                if (parentFile != null) {
                    Aggregate parentAggregate = parentFile.getAggregate();
                    ArrayList<Aggregate> parents = new ArrayList<Aggregate>();
                    parents.add(parentAggregate);
                    List<Aggregate> chain = lookForAggregateInLeaves(resource, parentAggregate, parents);
                    if (chain != null) {
                        return chain;
View Full Code Here

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

    }

    public ConsoleFile getFile(String path, boolean mustExist)
            throws IOException {
        try {
            Aggregate node = aggregate.getManager().getRoot();
            if (!path.equals("/")) {
                node = this.aggregate.getAggregate(path);
                if (node == null) {
                    throw new FileNotFoundException(path);
                }
View Full Code Here

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


    protected void formatFile(ConsoleFile file, Table.Row row, int flags) {
        try {
            boolean isDir = false;
            Aggregate f = (Aggregate) file.unwrap();
            if (f.allowsChildren()) {
                isDir = true;
            }
            if ((flags & F_FLAG_TYPE) > 0) {
                if (f.getArtifacts().isEmpty()) {
                    row.addCol("???");
                } else {
                    Artifact primary = f.getArtifacts().getPrimaryData();
                    if (primary == null) {
                        row.addCol("");
                    } else {
                        row.addCol(primary.getSerializationType().toString());
                    }
                }
            }
            row.addCol(f.getRelPath() + (isDir ? "/" : ""));
        } catch (RepositoryException e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

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

                if (verbose) {
                    log.info("...scheduling MKD {}/{}", parent.getPath(), repoName);
                }
            } break;
            case DELETED: {
                Aggregate an = change.file.getAggregate();
                if (an == null) {
                    // intermediate directory
                    // can't handle here
                    assertInFilter(change.repoPath);
                    TxInfo txInfo = new TxInfo(change.repoPath, null);
                    txInfo.original.put(change.file.getPath(), change.file);
                    modified.put(txInfo.artifactsPath, txInfo);
                } else {
                    assertInFilter(an.getPath());
                    TxInfo txInfo = modified.get(an.getPath());
                    if (txInfo == null) {
                        txInfo = new TxInfo(an);
                        VaultFile dir = null;
                        for (VaultFile rel : change.file.getRelated()) {
                            txInfo.original.put(rel.getPath(), rel);
                            if (rel.isDirectory()) {
                                dir = rel;
                            }
                        }
                        modified.put(txInfo.artifactsPath, txInfo);
                        // set parent file
                        if (dir == null) {
                            txInfo.parentFile = change.file.getParent();
                        } else {
                            txInfo.parentFile = dir.getParent();
                        }
                    }
                    txInfo.out.getArtifacts().remove(change.file.getArtifact());
                    if (verbose) {
                        log.info("...scheduling DEL {}", an.getPath());
                    }
                }
            } break;
            case MODIFIED: {
                Aggregate an = change.file.getAggregate();
                TxInfo txInfo = modified.get(an.getPath());
                if (txInfo == null) {
                    txInfo = new TxInfo(an);
                    VaultFile dir = null;
                    for (VaultFile rel: change.file.getRelated()) {
                        txInfo.original.put(rel.getPath(), rel);
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Aggregate

     *
     * @param imageProvider the image provider to use
     */
    public static void addFigureIcons(ImageProvider imageProvider) {
        imageProvider.addIconsForClass(new Endpoint());
        imageProvider.addIconsForClass(new Aggregate());
        imageProvider.addIconsForClass(new AOP());
        imageProvider.addIconsForClass(new Bean());
        imageProvider.addIconsForClass(new Catch());
        imageProvider.addIconsForClass(new Choice());
        imageProvider.addIconsForClass(new ConvertBody());
View Full Code Here

Examples of org.h2.expression.Aggregate

        }
        currentSelect.setGroupQuery();
        Expression r;
        if (aggregateType == Aggregate.COUNT) {
            if (readIf("*")) {
                r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
            } else {
                boolean distinct = readIf("DISTINCT");
                Expression on = readExpression();
                if (on instanceof Wildcard && !distinct) {
                    // PostgreSQL compatibility: count(t.*)
                    r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
                } else {
                    r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct);
                }
            }
        } else if (aggregateType == Aggregate.GROUP_CONCAT) {
            boolean distinct = readIf("DISTINCT");
            Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct);
            if (readIf("ORDER")) {
                read("BY");
                agg.setOrder(parseSimpleOrderList());
            }
            if (readIf("SEPARATOR")) {
                agg.setSeparator(readExpression());
            }
            r = agg;
        } else {
            boolean distinct = readIf("DISTINCT");
            r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);
        }
        read(")");
        return r;
    }
View Full Code Here

Examples of org.h2.expression.Aggregate

        }
        currentSelect.setGroupQuery();
        Expression r;
        if (aggregateType == Aggregate.COUNT) {
            if (readIf("*")) {
                r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
            } else {
                boolean distinct = readIf("DISTINCT");
                Expression on = readExpression();
                if (on instanceof Wildcard && !distinct) {
                    // PostgreSQL compatibility: count(t.*)
                    r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
                } else {
                    r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct);
                }
            }
        } else if (aggregateType == Aggregate.GROUP_CONCAT) {
            boolean distinct = readIf("DISTINCT");
            Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct);
            if (readIf("ORDER")) {
                read("BY");
                agg.setOrder(parseSimpleOrderList());
            }
            if (readIf("SEPARATOR")) {
                agg.setSeparator(readExpression());
            }
            r = agg;
        } else {
            boolean distinct = readIf("DISTINCT");
            r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);
        }
        read(")");
        return r;
    }
View Full Code Here

Examples of org.h2.expression.Aggregate

        }
        currentSelect.setGroupQuery();
        Expression r;
        if (aggregateType == Aggregate.COUNT) {
            if (readIf("*")) {
                r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
            } else {
                boolean distinct = readIf("DISTINCT");
                Expression on = readExpression();
                if (on instanceof Wildcard && !distinct) {
                    // PostgreSQL compatibility: count(t.*)
                    r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
                } else {
                    r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct);
                }
            }
        } else if (aggregateType == Aggregate.GROUP_CONCAT) {
            boolean distinct = readIf("DISTINCT");
            Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct);
            if (readIf("ORDER")) {
                read("BY");
                agg.setOrder(parseSimpleOrderList());
            }
            if (readIf("SEPARATOR")) {
                agg.setSeparator(readExpression());
            }
            r = agg;
        } else {
            boolean distinct = readIf("DISTINCT");
            r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);
        }
        read(")");
        return r;
    }
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.