Package org.apache.jackrabbit.vault.fs

Examples of org.apache.jackrabbit.vault.fs.DirectoryArtifact


                    ArtifactType.PRIMARY,
                    archive.getInputSource(contentXml),
                    SerializationType.XML_DOCVIEW
            ));
        }
        root.artifacts.add(new DirectoryArtifact(Text.getName(parentPath)));

        prepare(jcrRoot, root, resolver);

        // go over the filter roots and create intermediates for the parents if needed (bug #25370)
        for (PathFilterSet sets: filter.getFilterSets()) {
View Full Code Here


                    repoName = repoName.substring(0, repoName.length() - 4);
                    repoPath = parentInfo.path + "/" + repoName;
                }
                TxInfo info = parentInfo.addChild(new TxInfo(parentInfo, repoPath));
                log.debug("Creating directory artifact for {}", repoName);
                Artifact parent = new DirectoryArtifact(repoName);
                info.artifacts.add(parent);

                Archive.Entry contentXml = file.getChild(Constants.DOT_CONTENT_XML);
                if (contentXml != null) {
                    if (contentXml.isDirectory()) {
View Full Code Here

        ArtifactType type = ArtifactType.PRIMARY;
        String name = aggregate.getName();
        String ext = ".xml";
        Artifact parent = null;
        if (!hasFullCoverage()) {
            parent = new DirectoryArtifact(name);
            artifacts.add(parent);
            name = "";
            ext = Constants.DOT_CONTENT_XML;
            // special optimization if only nt:folder
            if (aggregate.getNode().getPrimaryNodeType().getName().equals("nt:folder")
                    && aggregate.getNode().getMixinNodeTypes().length == 0) {
                return artifacts;
            }
        }

        // add extra
        Serializer ser = new DocViewSerializer(aggregate);
        artifacts.add(parent, name, ext, type, ser, 0);

        // add binaries
        Collection<Property> bins = aggregate.getBinaries();
        if (bins != null && !bins.isEmpty()) {
            if (hasFullCoverage()) {
                assert parent == null;
                parent = new DirectoryArtifact(aggregate.getName());
                artifacts.add(parent);
            }
            int pathLen = aggregate.getPath().length();
            if (pathLen > 1) {
                pathLen++;
View Full Code Here

                content.getProperty(JcrConstants.JCR_DATA), lastModified);

        // create .dir artifact
        if (needsDir) {
            // in this case, we create a directory artifact
            Artifact parent = new DirectoryArtifact(name, ".dir");
            artifacts.add(parent);
            // and extra
            Serializer ser = new DocViewSerializer(aggregate);
            // hack: do better
            artifacts.add(parent, "", Constants.DOT_CONTENT_XML, ArtifactType.PRIMARY, ser, 0);
View Full Code Here

                    ArtifactType.PRIMARY,
                    archive.getInputSource(contentXml),
                    SerializationType.XML_DOCVIEW
            ));
        }
        root.artifacts.add(new DirectoryArtifact(Text.getName(parentPath)));

        prepare(jcrRoot, root, resolver);

        // go over the filter roots and create intermediates for the parents if needed (bug #25370)
        for (PathFilterSet sets: filter.getFilterSets()) {
View Full Code Here

                    repoName = repoName.substring(0, repoName.length() - 4);
                    repoPath = parentInfo.path + "/" + repoName;
                }
                TxInfo info = parentInfo.addChild(new TxInfo(parentInfo, repoPath));
                log.debug("Creating directory artifact for {}", repoName);
                Artifact parent = new DirectoryArtifact(repoName);
                info.artifacts.add(parent);

                Archive.Entry contentXml = file.getChild(Constants.DOT_CONTENT_XML);
                if (contentXml != null) {
                    if (contentXml.isDirectory()) {
View Full Code Here

                        }
                    }
                }, fs.getAggregateManager().getSession(), repoParentPath, input);
            // create artifact
            String parentExt = parentPath.endsWith(".dir") ? ".dir" : "";
            Artifact parent = new DirectoryArtifact(Text.getName(repoParentPath), parentExt);
            InputSourceArtifact isa = new InputSourceArtifact(
                    parent,
                    Constants.DOT_CONTENT_XML,
                    "",
                    ArtifactType.PRIMARY, input,
View Full Code Here

                if (txInfo == null) {
                    txInfo = new TxInfo(repoPath, ((AggregateImpl) parent.getAggregate()).create(repoName));
                    txInfo.setParentFile(parent);
                    modified.put(repoPath, txInfo);
                }
                txInfo.out.addArtifact(new DirectoryArtifact(repoName));
                if (verbose) {
                    log.info("...scheduling MKD {}/{}", parent.getPath(), repoName);
                }
            } break;
            case DELETED: {
View Full Code Here

                    ArtifactType.PRIMARY,
                    archive.getInputSource(contentXml),
                    SerializationType.XML_DOCVIEW
            ));
        }
        root.artifacts.add(new DirectoryArtifact(Text.getName(parentPath)));

        prepare(jcrRoot, root, resolver);

        // go over the filter roots and create intermediates for the parents if needed (bug #25370)
        for (PathFilterSet sets: filter.getFilterSets()) {
View Full Code Here

                    repoName = repoName.substring(0, repoName.length() - 4);
                    repoPath = parentInfo.path + "/" + repoName;
                }
                TxInfo info = parentInfo.addChild(new TxInfo(parentInfo, repoPath));
                log.debug("Creating directory artifact for {}", repoName);
                Artifact parent = new DirectoryArtifact(repoName);
                info.artifacts.add(parent);

                Archive.Entry contentXml = file.getChild(Constants.DOT_CONTENT_XML);
                if (contentXml != null) {
                    if (contentXml.isDirectory()) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.fs.DirectoryArtifact

Copyright © 2018 www.massapicom. 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.