Package org.modeshape.jcr.spi.federation

Examples of org.modeshape.jcr.spi.federation.DocumentWriter.addChild()


                Document doc2 = newDocument(id1).setPrimaryType("nt:unstructured").setParent(parentId).document();
                documentsById.put(id2, doc2);
                documentsByLocation.put(pathStr + "/generated-out", doc2);

                DocumentWriter parentWriter = writeDocument(entry.getValue());
                parentWriter.addChild(id1, "generate");
                parentWriter.addChild(id2, "generated-out");
                Document parent = parentWriter.document();
                documentsById.put(readDocument(parent).getDocumentId(), parent);
                documentsByLocation.put(pathStr, parent);
            }
View Full Code Here


                documentsById.put(id2, doc2);
                documentsByLocation.put(pathStr + "/generated-out", doc2);

                DocumentWriter parentWriter = writeDocument(entry.getValue());
                parentWriter.addChild(id1, "generate");
                parentWriter.addChild(id2, "generated-out");
                Document parent = parentWriter.document();
                documentsById.put(readDocument(parent).getDocumentId(), parent);
                documentsByLocation.put(pathStr, parent);
            }
        }
View Full Code Here

            writer.setPrimaryType(NT_FILE);

            writer.addProperty(JCR_CREATED, createdTimeFor(file));
            writer.addProperty(JCR_CREATED_BY, ownerFor(file));
            String childId = contentChildId(id, isRoot);
            writer.addChild(childId, JCR_CONTENT);
            if (!isQueryable()) writer.setNotQueryable();
        } else {
            writer = newFolderWriter(id, file, 0);
        }
View Full Code Here

                // only add a child if it's in the current page
                if (i >= offset && i < offset + pageSize) {
                    // We use identifiers that contain the file/directory name ...
                    String childName = child.getName();
                    String childId = root ? DELIMITER + childName : id + DELIMITER + childName;
                    writer.addChild(childId, childName);
                    nextOffset = i + 1;
                }
            }
        }
        // if there are still accessible children add the next page
View Full Code Here

        cmisProperties(folder, writer);
        cmisChildren(folder, writer);

        // append repository information to the root node
        if (folder.isRootFolder()) {
            writer.addChild(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, ""), REPOSITORY_INFO_NODE_NAME);
        }
        return writer.document();
    }

    /**
 
View Full Code Here

        writer.setParents(parentIds);
        writer.addMixinType(NodeType.MIX_REFERENCEABLE);

        // document specific property conversation
        cmisProperties(doc, writer);
        writer.addChild(ObjectId.toString(ObjectId.Type.CONTENT, doc.getId()), JcrConstants.JCR_CONTENT);

        return writer.document();
    }

    /**
 
View Full Code Here

    public GitRoot( GitConnector connector ) {
        super(NAME, connector);
        DocumentWriter writer = connector.newDocumentWriter(ID);
        writer.setPrimaryType(GitLexicon.ROOT);
        writer.addChild(GitBranches.ID, GitBranches.NAME);
        writer.addChild(GitTags.ID, GitTags.NAME);
        writer.addChild(GitHistory.ID, GitHistory.NAME);
        writer.addChild(GitCommitDetails.ID, GitCommitDetails.NAME);
        writer.addChild(GitTree.ID, GitTree.NAME);
        root = writer.document();
View Full Code Here

    public GitRoot( GitConnector connector ) {
        super(NAME, connector);
        DocumentWriter writer = connector.newDocumentWriter(ID);
        writer.setPrimaryType(GitLexicon.ROOT);
        writer.addChild(GitBranches.ID, GitBranches.NAME);
        writer.addChild(GitTags.ID, GitTags.NAME);
        writer.addChild(GitHistory.ID, GitHistory.NAME);
        writer.addChild(GitCommitDetails.ID, GitCommitDetails.NAME);
        writer.addChild(GitTree.ID, GitTree.NAME);
        root = writer.document();
    }
View Full Code Here

        super(NAME, connector);
        DocumentWriter writer = connector.newDocumentWriter(ID);
        writer.setPrimaryType(GitLexicon.ROOT);
        writer.addChild(GitBranches.ID, GitBranches.NAME);
        writer.addChild(GitTags.ID, GitTags.NAME);
        writer.addChild(GitHistory.ID, GitHistory.NAME);
        writer.addChild(GitCommitDetails.ID, GitCommitDetails.NAME);
        writer.addChild(GitTree.ID, GitTree.NAME);
        root = writer.document();
    }
View Full Code Here

        DocumentWriter writer = connector.newDocumentWriter(ID);
        writer.setPrimaryType(GitLexicon.ROOT);
        writer.addChild(GitBranches.ID, GitBranches.NAME);
        writer.addChild(GitTags.ID, GitTags.NAME);
        writer.addChild(GitHistory.ID, GitHistory.NAME);
        writer.addChild(GitCommitDetails.ID, GitCommitDetails.NAME);
        writer.addChild(GitTree.ID, GitTree.NAME);
        root = writer.document();
    }

    @Override
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.