jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astra123 <sandhya.jayachand...@tcs.com>
Subject Re: Using JackRabbit API have created nodes.if i want to see the nodes in woekspace.where should i see
Date Fri, 24 Apr 2009 08:58:26 GMT

Jukka Zitting wrote:
> Hi,
> On Fri, Apr 24, 2009 at 9:49 AM, astra123 <sandhya.jayachandran@tcs.com>
> wrote:
>> using JackRabbit API i have created nodes in JCR wiki.
>> I need to see the directory structure of the nodes.
>> where should i see that structure. Im not able to findout the JCR wiki
>> location.
> I'm not sure I understand. Which JCR wiki are you talking about?
> BR,
> Jukka Zitting


im following the link below link for creating nodes:

i have pasted the code :

//obtaining the repository workspace and root node
            Repository r = new TransientRepository();
            Session session = r.login(new SimpleCredentials("userid",
            Workspace ws = session.getWorkspace();
            Node rn = session.getRootNode();         
            //JCR wiki content falls under wiki
                         ("wiki", "http://www.barik.net/wiki/1.0");

            //adding contents
            Node encyclopedia = rn.addNode("wiki:encyclopedia");
            Node p = encyclopedia.addNode("wiki:entry");
            p.setProperty("wiki:title", new StringValue("rose"));
            p.setProperty("wiki:content", new  StringValue("A rose is a
flowering shrub."));
            p.setProperty("wiki:category",new Value[]{
                        new StringValue("flower"),
                         new StringValue("plant"),
                            new StringValue("rose")});

            Node n = encyclopedia.addNode("wiki:entry");
            n.setProperty("wiki:title", new StringValue("Shakespeare"));
            n.setProperty("wiki:content", new
                     StringValue("A famous poet who likes roses."));
            n.setProperty("wiki:category", new StringValue("poet"));


my doubt is where these added nodes and properties are getting stored.
Where should i go to view them.

View this message in context: http://www.nabble.com/Using-JackRabbit-API-have-created-nodes.if-i-want-to-see-the-nodes-in-woekspace.where-should-i-see-tp23211573p23212521.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message