Hi, On 3/24/07, Brian Thompson <[EMAIL PROTECTED]> wrote:
Comments interleaved below: Oh, one other thing: In your model, do you ever expect the same image to be attached to multiple BlogEntries?
Nope, Same image will not be attached to multiple Blog Entires. But if it is the case, as I understood I should use property of reference type in the blog entry which references to a image attachment. Is that the way to handle it ?
I went through the Node Type sections of the Jackrabbit site and also 6.7Node Types of the JSR 170 specification. As I understood,
A node type defines the Child nodes and properties it may ( or must ) have. Primary node type must be subtype of either primary or a mixin type and mixin type may have a super type and it is not a must. I have few questions and some of them may be obsolete. But I listed them down as it is always better have a discussion and get things clarified. 1.) In naming node types and properties, do we follow the naming conventions used in Java ? Eg. myFristType 2.) What is purpose mixin node type ? Purpose of primary node is to define the structure of the node as I understood. What is the advantage of adding some properties or child nodes via mixin types to a node ? 3.) What is the purpose of primary item of a node type? 4.) In a property definition, in Required Type, what does NAME, PATH types mean ? 5.) Is int supported as a property type ? It is not listed under the property_type in the grammer. 6.) How to we constraint a property of a node to be unique ( like a primary key in RDBMS ) ? As you proposed, if we change the hierarchy like this, - Users - Year - Month - Date - Blog Entry - Comment - Rate - Image Attachment In CND notation, <blog = 'http://jackrabbit.apache.org/jackrabbit-jcr-demo/1.0'> <mix = 'http://www.jcp.org/jcr/mix/1.0'> [blog:user] > mix:referenceable - blog:userID (long) mandatory - blog:nickName (string) mandatory - blog:email (string) mandatory - blog:password (string) mandatory + blog:year [blog:year] multiple [blog:year] - blog:year (long) mandatory + blog:month [blog:month] multiple [blog:date] - blog:date (date) + blog:blogEntry [blog:blogEntry] multiple [blog:blogEntry] - blog:blogEntryID (long) mandatory - blog:content (string) mandatory - blog:image (binay) multiple - blog:rate (long) - blog:dateCreated (date) mandatory + blog:comment [blog:comment] multiple [blog:comment] - blog:commentID (long) mandatory - commenterID (reference) mandatory < blog:user - blog:content (string) mandatory - blog:dateCreated (date) mandatory