jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Gilbart <fgilb...@capsiel.fr>
Subject RE: Oak Node and Blog storages Repository samples
Date Fri, 19 Jun 2015 15:02:47 GMT
Thank you Thomas,

I read those pages once again after your response and found what I missed: the DataStoreBlobStore
wrapper...from Jackrabbit DataStore interfaces to Oak BlobStore.


                S3DataStore s3ds = new S3DataStore();
                DocumentNodeStore store = new DocumentMK.Builder()
                                .setBlobStore(new DataStoreBlobStore(s3ds)).getNodeStore();
                Repository repository = new Jcr(new Oak(store)).with(
                                new OpenSecurityProvider()).createRepository();

Best regards,
Fred

-----Message d'origine-----
De : Thomas Mueller [mailto:mueller@adobe.com]
Envoyé : vendredi 19 juin 2015 16:17
À : users@jackrabbit.apache.org
Objet : Re: Oak Node and Blog storages Repository samples

Hi,

In theory, this should already be documented, some links (I guess you read those already):

http://jackrabbit.apache.org/oak/docs/use_getting_started.html

http://jackrabbit.apache.org/oak/docs/construct.html
http://jackrabbit.apache.org/oak/docs/nodestore/segmentmk.html

To use a blob store with the DocumentNodeStore, use:

    DocumentNodeStore ns = new
DocumentMK.Builder()....setBlobStore(..)...getNodeStore();


Regards,
Thomas



On 19/06/15 15:38, "Frederic Gilbart" <fgilbart@capsiel.fr> wrote:

>Hi all,
>
>I'm trying Oak 1.2 after years on Jackrabbit, and I'm not sure to fully
>understand some of new concepts.
>
>So I work on jUnit test to check all implementations: Segment and
>Document + BlogStore.
>Should be easy but...I miss some points. I'm not using OSGi nor Mongodb.
>
>Tests try to get a javax.jcr.Repository object for each combination,
>then, to be short:
>. Login/logout
>. Register CND/namespace
>. Add a node hierarchy
>. Add a File with properties
>. Query with available languages (Jack had many (XPATH, SQL2..,) not
>yet on this step for Oak)
>
>
>If I well-read documentation I have first to choose a NodeStore
>implementation either Segment or Document, then optionally a BlogStore,
>depending of first choice, lot of possibilities, but can't really find
>how to create each of them.
>
>From http://jackrabbit.apache.org/oak/docs/plugins/blobstore.html,
>could someone help providing some information how with java code:
>. Create a DocumentNodeStore using FileDataStore and FileBlobStore .
>Create a DocumentNodeStore using S3DataStore
>
>I got this for SegmentNodeStore, but can't find a way for
>DocumentNodeStore :
>
>        @Test
>        public void testSegmentNodeStoreWithFileBlobStore()
>                        throws RepositoryException, IOException {
>                File directory = new File("./target/SegmentStore");
>                SegmentStore store = FileStore.newFileStore(directory)
>                                .withBlobStore(new
>FileBlobStore("./target/FileBlobStore"))
>                                .create();
>                Repository repository = new Jcr(new Oak(new
>SegmentNodeStore(store)))
>                                .createRepository();
>                checkLogin(repository);
>        }
>
>Any information welcomed too.
>
>Regards,
>Fred
>


Mime
View raw message