jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandana Mihindukulasooriya" <nandana....@gmail.com>
Subject Re: How to start thinking in JCR
Date Mon, 09 Apr 2007 04:54:02 GMT
Hi,


> Also, there's a chance to drop the explicit blog:library and
> blog:blogSpace child node definitions if you make blog:user extend
> nt:folder. Then you could simply have "library" and "blog" subfolders
> within the user node, or even avoid those subfolders entirely and rely
> on node types to detect which child nodes are blog entries and which
> are other resources.


Does it mean a structure like,

 /blogRoot/user/ <yyyy>/<mm> /blogEntry [blog:blogEntry]
 /blogRoot/user/<avatar.gif> [nt:file]

 Or a structure like,

 /blogRoot/user/blogEntry [blog:blogEntry]
 /blogRoot/user/<avatar.gif> [nt:file]

 In the latter one, are we using the jcr:created property of  nt:hierarchyNode
if we want to list the blog entries according to date or month.



> It's a tradeoff between flexibility and more
> completely specifying the content structure.
>
> I would actually suggest we take this opportunity for extra
> flexibility since it gives some very nice late binding benefits when
> we later start defining the URL mapping for the application.
>
By flexibility, does it mean the flexibility we have to change the structure
as we want in the future ? How does this help to get the late binding
benefits ?



----------------------------------   Node Structure
---------------------------------

 /blogRoot [nt:folder]
/blogRoot/user [blog:user]
/blogRoot/user/ blogEntry [blog:blogEntry]
/blogRoot/user/ blogEntry /comment [blog:Comment]
/blogRoot/user/avatar [nt:file]
/<libray> [nt:folder]


------------------------------   CND Notation for custom types
------------------------

<blog = 'http://jackrabbit.apache.org/jackrabbit-jcr-demo/1.0'>
<mix = 'http://www.jcp.org/jcr/mix/1.0'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

[blog:user] >  nt:hierarchyNode, mix:referenceable
- blog:nickname  (string) mandatory
- blog:email  (string) mandatory
- blog:password (string) mandatory

[blog:blogEntry] > nt:hierarchyNode, mix:referenceable
- blog:title (string) mandarory primary
- blog:content (string) mandatory
- blog:rate (long)
+ blog:attachments (nt:folder) =nt:folder mandatory autocreated

 [blog:comment]
- blog:content (string) mandatory primary
- blog:commenter (reference ) mandatory  < blog:user

BR,

Nandana

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message