You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Dominique Pfister (Commented) (JIRA)" <ji...@apache.org> on 2012/03/08 17:43:57 UTC

[jira] [Commented] (OAK-5) JCR bindings for Oak

    [ https://issues.apache.org/jira/browse/OAK-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225293#comment-13225293 ] 

Dominique Pfister commented on OAK-5:
-------------------------------------

> I think we should either put it all under o.a.j.oak.jcr in oak-core,
> or create a separate oak-jcr component for the JCR binding.

I'm in favor of a separate component, because oak-core already contains quite some packages
and classes (and this separation would also underline the different layers), but I wouldn't mind a separate package either.
                
> JCR bindings for Oak
> --------------------
>
>                 Key: OAK-5
>                 URL: https://issues.apache.org/jira/browse/OAK-5
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>            Reporter: Jukka Zitting
>              Labels: jcr
>             Fix For: 0.1
>
>
> One of the proposed goals for the 0.1 release is at least a basic JCR binding for Oak. Most of that already exists in /jackrabbit/sandbox, we just need to decide where and how to place it in Oak. I think we should either put it all under o.a.j.oak.jcr in oak-core, or create a separate oak-jcr component for the JCR binding.
> As for functionality, it would be nice if the JCR binding was able to do at least the following:
> {code}
> Repository repository = JcrUtils.getRepository(...);
> Session session = repository.login(...);
> try {
>     // Create
>     session.getRootNode().addNode("hello")
>         .setProperty("world",  "hello world");
>     session.save();
>     // Read
>     assertEquals(
>         "hello world",
>         session.getProperty("/hello/world").getString());
>     // Update
>     session.getNode("/hello").setProperty("world", "Hello, World!");
>     session.save();
>     assertEquals(
>         "Hello, World!",
>         session.getProperty("/hello/world").getString());
>     // Delete
>     session.getNode("/hello").delete();
>     session.save();
>     assertTrue(!session.propertyExists("/hello/world"));
> } finally {
>     create.logout();
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (OAK-5) JCR bindings for Oak

Posted by Thomas Mueller <mu...@adobe.com>.
Hi,

I would like to keep both in the same project currently. Of course we need
to use separate packages.

As an example for the query/index component, a part of the code (the
QOM/AST) is currently useful for both the core and the JCR binding. At
some point it will have to be separated, but I think it would simplify
development a lot if we could keep it together for now.

Regards,
Thomas


On 3/8/12 5:43 PM, "Dominique Pfister (Commented) (JIRA)"
<ji...@apache.org> wrote:

>
>    [ 
>https://issues.apache.org/jira/browse/OAK-5?page=com.atlassian.jira.plugin
>.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225293#comment-
>13225293 ] 
>
>Dominique Pfister commented on OAK-5:
>-------------------------------------
>
>> I think we should either put it all under o.a.j.oak.jcr in oak-core,
>> or create a separate oak-jcr component for the JCR binding.
>
>I'm in favor of a separate component, because oak-core already contains
>quite some packages
>and classes (and this separation would also underline the different
>layers), but I wouldn't mind a separate package either.
>                
>> JCR bindings for Oak
>> --------------------
>>
>>                 Key: OAK-5
>>                 URL: https://issues.apache.org/jira/browse/OAK-5
>>             Project: Jackrabbit Oak
>>          Issue Type: New Feature
>>            Reporter: Jukka Zitting
>>              Labels: jcr
>>             Fix For: 0.1
>>
>>
>> One of the proposed goals for the 0.1 release is at least a basic JCR
>>binding for Oak. Most of that already exists in /jackrabbit/sandbox, we
>>just need to decide where and how to place it in Oak. I think we should
>>either put it all under o.a.j.oak.jcr in oak-core, or create a separate
>>oak-jcr component for the JCR binding.
>> As for functionality, it would be nice if the JCR binding was able to
>>do at least the following:
>> {code}
>> Repository repository = JcrUtils.getRepository(...);
>> Session session = repository.login(...);
>> try {
>>     // Create
>>     session.getRootNode().addNode("hello")
>>         .setProperty("world",  "hello world");
>>     session.save();
>>     // Read
>>     assertEquals(
>>         "hello world",
>>         session.getProperty("/hello/world").getString());
>>     // Update
>>     session.getNode("/hello").setProperty("world", "Hello, World!");
>>     session.save();
>>     assertEquals(
>>         "Hello, World!",
>>         session.getProperty("/hello/world").getString());
>>     // Delete
>>     session.getNode("/hello").delete();
>>     session.save();
>>     assertTrue(!session.propertyExists("/hello/world"));
>> } finally {
>>     create.logout();
>> }
>> {code}
>
>--
>This message is automatically generated by JIRA.
>If you think it was sent incorrectly, please contact your JIRA
>administrators: 
>https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>