Examples of DocumentWriter


Examples of org.modeshape.jcr.spi.federation.DocumentWriter

     *
     * @return node document.
     */
    private Document cmisRepository() {
        RepositoryInfo info = session.getRepositoryInfo();
        DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, ""));

        writer.setPrimaryType(CmisLexicon.REPOSITORY);
        writer.setId(REPOSITORY_INFO_ID);

        // product name/vendor/version
        writer.addProperty(CmisLexicon.VENDOR_NAME, info.getVendorName());
        writer.addProperty(CmisLexicon.PRODUCT_NAME, info.getProductName());
        writer.addProperty(CmisLexicon.PRODUCT_VERSION, info.getProductVersion());

        return writer.document();
    }
View Full Code Here

Examples of org.modeshape.jcr.spi.federation.DocumentWriter

        CallSpecification callSpec = new CallSpecification(id);
        GitFunction function = functions.get(callSpec.getFunctionName());
        if (function == null) return null;
        try {
            // Set up the document writer ...
            DocumentWriter writer = newDocument(id);
            String parentId = callSpec.getParentId();
            assert parentId != null;
            writer.setParent(parentId);
            // check if the document should be indexed or not, based on the global connector setting and the specific function
            if (!this.isQueryable() || !function.isQueryable(callSpec)) {
                writer.setNotQueryable();
            }
            // Now call the function ...
            Document doc = function.execute(repository, git, callSpec, writer, values);
            // Log the result ...
            getLogger().trace("ID={0},result={1}", id, doc);
View Full Code Here

Examples of org.modeshape.jcr.spi.federation.DocumentWriter

        }
    }

    @Override
    public Document getDocumentById( String id ) {
        DocumentWriter writer = newDocument(id);
        for (AbstractMetadataRetriever retriever : metadataRetrievers) {
            if (retriever.canHandle(id)) {
                Connection connection = null;
                try {
                    connection = dataSource.getConnection();
View Full Code Here

Examples of org.modeshape.jcr.spi.federation.DocumentWriter

    private final Document root;

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