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 Tue, 10 Apr 2007 02:19:15 GMT

> The URLs are "clean" and map one-to-one to nodes in the repository.
> And the best part is that you don't need to put any custom "a URL like
> this should be processed like this" rules in your application, as you
> can just use the primary node type of the target node to select the
> appropriate view component for displaying the node contents.

Thanks, now I understand the advantage of having a simplified title as the
node name
of blogEntry node type as we discussed in an earlier mail. so the
requirements of the simplification algorithm would be,

1. It should remove white spaces and other special characters which doesn't
fit in to urls
2. It should make the nodename unique with respect to it's siblings so the
one-to-one mapped urls are unique too.
(Blog entries can have same title and it's algorithms responsibility to make
them unique )
3. It should preserve the readability of the title as much as possible.

You might also want to consider custom created/published/updated
> timestamp properties, as the standard jcr:created is somewhat
> inflexible (once created it can't be modified).

Does the property type DATE behaves as the same way most of the
RDBMS behave. If we make it autocreated and don't give it a default
value, does it take the current timestamp.

Add "> nt:hierarchyNode" to allow comments to be stored as normal
> child elements of the nt:folder blog entry node.

That will also give us the jcr:created property which will be useful in
date-based listing of comments.

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

/blogRoot [nt:folder]
/blogRoot/user [blog:user]
/blogRoot/user/<yyyy> [nt:folder]
/blogRoot/user/<yyyy>/<mm> [nt:folder]
/blogRoot/user/<yyyy>/<mm>/blogEntry [blog:blogEntry]
/blogRoot/user/<yyyy>/<mm>/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:folder, mix:referenceable
- blog:nickname  (string) mandatory
- blog:email  (string) mandatory
- blog:password (string) mandatory

[blog:blogEntry] > nt:folder, mix:referenceable
- blog:title (string) mandarory primary
- blog:content (string) mandatory
- blog:rate (long)
- blog:created (date) autocreated
- blog:published (date)
- blog:updated (date)

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


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