jLibrary

Open Source Document Management System from your Desktop

  • Developers
  • Help & Support
  • Enterprise
  • Documents & Articles
jLibrary » Development » Node types hierarchy

Information

Created in: 2006-02-18 17:39:00

Author: martin

Size: 24001 bytes

Last updated: 2006-02-18 17:39:00

Categories

Developers

You may be interested in...

jLibrary Developers Guide

Node types hierarchy (for beta4 and final versions)

jLibrary 1.0beta4 hierarchy

The following tree describes jLibrary 1.0 beta4 node type structure. This structure is created in the org.jlibrary.core.jcr.NodeTypeManager class.

  • nt:base
    • jlib:internal
    • jlib:base
      • jlib:node
        • jlib:resource
        • jlib:directory
        • jlib:document
      • jlib:author
      • jlib:category
      • jlib:note
      • jlib:user
      • jlib:group
      • jlib:rol
      • jlib:content
      • jlib:favorite
      • jlib:bookmark

jlib:internal is a residual definition. Those nodes that do not have assigned specific node type will have jlib:internal as node type. The advantage is that jlib:internal does not have any restrictions on the content. The other types, all have several restrictions defined that you can see on the next section.

The following tree describes jLibrary 1.0 beta4 hierarchy. Near each node is a description of its meaning and restrictions:

  • Root node
    • jcr:system: This is the standard JCR system node.
      • jlib:system: All the internal jLibrary system structure will be stored under this node.
        • jlib:security: This node will host all the security hierarchy
          • jlib:users: This node will contain all the users defined in jLibrary.
              • jlib:user[mix:user, jcr:referenceable]: This node will define a jLibrary user. By default, jLibrary creates an admin author with name=admin and password=changeme. This special user will have isAdmin property set to true.
                • jlib:name: User's name.
                • jlib:password: User's password.
                • jlib:firstname: User's first name.
                • jlib:lastname: User's last name.
                • jlib:email: User's email.
                jlib:isAdmin: Tag if an user is an administrator.
                • jlib:sysAdmin: Not used. It will be removed soon.
                • jlib:roles: MULTIVALUED property that contains REFERENCES to all the user roles. By default a new user always will have defined a readers rol.
                • jlib:groups: MULTIVALUED property that contains REFERENCES to all the user groups.
                • jlib:bookmarks: If the user has bookmarks defined, then they will be under this node.
                  • jlib:bookmark[mix:bookmark, jcr:referenceable]: Each bookmark will have its own node definition:
                    • jlib:name: Bookmark's name.
                    • jlib:description: Bookmark's description.
                    • jlib:user: REFERENCE to the user that holds this bookmark.
                    • jlib:url: URL for the bookmark
                    • jlib:typecode: Type of bookmark. It can be a folder, or it can be a real bookmark. Not needed. Could be removed soon..
                    • jlib:repository: Bookmark's repository. Not needed. Could be removed soon.
                    • jlib:bookmark: Each bookmark also can hold several bookmarks. Those bookmarks will be bookmark folders.
                      • ......
            • jlib:groups: This node will contain all the groups defined in jLibrary. By default, jLibrary defines three groups: readers, editors and admins.
              • jlib:group[mix:group, jcr:referenceable]: This node will define a jLibrary group
                • jlib:name: Group's name.
                • jlib:description: Group's description.
                • jlib:users: MULTIVALUED property that contains REFERENCES to all the group users.
                • jlib:roles: MULTIVALUED property that contains REFERENCES to all the group roles.
            • jlib:roles: This node will contain all the roles defined in jLibrary. By default, jLibrary defines three roles: reader, editor and admin.
              • jlib:rol[mix:rol,jcr:referenceable]: This node will define a jLibrary rol.
                • jlib:name: Rol's name
                • jlib:description: Rol's description
                • jlib:members: MULTIVALUED property that contains REFERENCES to all the rol members. Includes references to groups and users.
                • jlib:repository: Rol's repository. Not used. It will be removed.
            • jlib:admin: This REFERENCE property references the admin author. It's a fast link.
          • jlib:categories: This node will contain all the categories defined within jLibrary.
            • jlib:category[mix:category, jcr:referenceable]: Each category will be stored in its own node . By default, when a repository is created, an unknown category also will be created.
              • jlib:id: Category's id. Deprecated. Soon could be removed.
              • jlib:name: Category's name.
              • jlib:description: Category's description.
            jlib:repository: Category's repositoy. Not needed. It will be removed soon.
              • jlib:nodes: MULTIVALUED property. Contains REFERENCES to all the nodes of the category.
              • jlib:favorites: If the category has favorites defined, then they will be under this node.
                • jlib:favorite[mix:favorite, jcr:referenceable]: Each jLibrary favorite will have its own node.
                  • jlib:node: REFERENCE to the document that is favorite for this category
                  • jlib:user: Optional. If this favorite is for an specific user, then this property will have REFERENCE to the user.
          • jlib:authors: This node will contain all the authors defined within jLibrary.
            • jlib:author[mix:author, jcr:referenceable]: jLibrary author information will be stored under an author node. By default, when a repository is created, an unknown author also will be created.
          jlib:name: Author's name
          jlib:bio: Author's biography
          jlib:repository: Author's repository reference. Not needed. It will be removed soon.
              • jlib:user: REFERENCE. If the author is an user then this property will reference to an user node.
        • jlib:unkAuthor: This REFERENCE property references the unknown author. It's a fast link.
        • jlib:unkCategory: This REFERENCE property references the unknown category. It's a fast link.
      • jlib:root[nt:folder,mix:directory]: This is the jLibrary content root node. Under this node there will be the jLibrary documents and directories.
        • nt:folder[mix:directory, jcr:referenceable, jcr:lockable]: Each jLibrary directory (including jlib:root) is tagged with the mix:directory type. This node type has the next properties and nodes defined.
          • jlib:name: Node's name.
          • jlib:description: Node's description.
          • jlib:created: Creation date.
          • jlib:creator: REFERENCE to the user that created the node.
          • jlib:importance: Node importance. It's a numeric value.
          • jlib:typecode: jLibrary internal type discriminator value. It's also numeric.
          • jlib:position: Position on the client.
          • jlib:size: Numeric value. Node's size. In case of a directory it will be 0.
          • jlib:path: Node's path. The jlib:root node will be located at / location.
          • jlib:restrictions: MULTIVALUED property. Contains REFERENCES to all the members that can access to this node. The references can be to users or groups.
          • nt:file[mix:document,jcr:versionable,jcr:referenceable,jcr:lockable]: All jLibrary directories (including jlib:root) can have several childs of type nt:file representing documents and resources. Both, mix:document and mix:directory inherit from jlib:node that defines the previous properties. So all those properties are also here on mix:document:
            • jlib:name: Node's name.
            • jlib:description: Node's description.
            • jlib:created: Creation date.
            • jlib:creator: REFERENCE to the user that created the node.
            • jlib:importance: Node importance. It's a numeric value.
            • jlib:typecode: jLibrary internal type discriminator value. It's also numeric.
            • jlib:position: Position on the client.
            • jlib:size: Numeric value. Node's size. In case of a directory it will be 0.
            • jlib:path: Node's path. The jlib:root node will be located at / location.
            • jlib:restrictions: MULTIVALUED property. Contains REFERENCES to all the members that can access to this node. The references can be to users or groups.

              Documents have also defined several additional properties
            jlib:title: Document's title.
            • jlib:url: Document's URL.
            • jlib:keywords: Keywords defined for the document.
            jlib:language: Document's language.
            • jlib:creationDate: Document's creation date (the date when the real author created the document).
            • jlib:author: Document's author. It's a REFERENCE to an author.
            • jlib:categories: MULTIVALUED property. Contains REFERENCES to all the categories assigned for the document.
            • jlib:relations: MULTIVALUED property. Contains REFERENCES to other documents relationed with this document.
            • jlib:resources: MULTIVALUED property. Contains REFERENCES to resources needed by this document.
            • jcr:content[nt:resource, mix:content]: Document binary content
              • jcr:mimeType: Document's mime type
              • jcr:encoding: Document encoding.
              • jcr:lastModified: Last modification date.
              • jcr:data: BINARY property. It contains document binary content.
            • jcr:lockToken: Inherited from jcr:lockable. Contains a lock token if the document is locked
            • jlib:lockUser: If the resource is locked it will contain a REFERENCE to the user who locked the document.
            • mix:lockToken: Persistence storage for the lock token. It's needed becaue lock tokens aren't persisted between user sessions.
            • jlib:note[mix:note]: Each note will have its own node
              • jlib:id: Note Id. Deprecated. Soon could be removed.
              • jlib:date: Note creation date.
              • jlib:text: Note text.
          • nt:file[mix:resource, jcr:referenceable, jcr:lockable]: All jLibrary directories (including jlib:root) can have several childs of type nt:file representing documents and resources. Both, mix:resource and mix:directory inherit from jlib:node that defines the previous properties. So all those properties are also here on mix:resource:
            • jlib:name: Node's name.
            • jlib:description: Node's description.
            • jlib:created: Creation date.
            • jlib:creator: REFERENCE to the user that created the node.
            • jlib:importance: Node importance. It's a numeric value.
            • jlib:typecode: jLibrary internal type discriminator value. It's also numeric.
            • jlib:position: Position on the client.
            • jlib:size: Numeric value. Node's size. In case of a directory it will be 0.
            • jlib:path: Node's path. The jlib:root node will be located at / location.
            • jlib:restrictions: MULTIVALUED property. Contains REFERENCES to all the members that can access to this node. The references can be to users or groups.

              Resources add only properties for handling binary content that are also present on documents:
            • jcr:content[nt:resource, mix:content]: Document binary content
              • jcr:mimeType: Resource's mime type
              • jcr:encoding: Resource encoding.
              • jcr:lastModified: Last modification date.
              • jcr:data: BINARY property. It contains resource binary content.
            • jcr:lockToken: Inherited from jcr:lockable. Contains a lock token if the resource is locked
            • jlib:lockUser: If the resource is locked it will contain a REFERENCE to the user who locked the resource.
            • mix:lockToken: Persistence storage for the lock token. It's needed becaue lock tokens aren't persisted between user sessions.

    jLibrary 1.0 final hierarchy

    The next section summarizes the most notable changes on the node type hierarchy for the final version. It's on development.

    • jlib:system moves from the jcr:system node to directly under Root node. This is because Jackrabbit has now indexed all the jcr:system content under a unique global index per repository, and so has forced us to move jlib:system to another place to optimize search operations and avoid possible integrity errors. The estructure will be:
      • Root Node
        • jcr:system
          • ....
        • jlib:system
          • ....
        • jlib:root
          • ....
    • jlib:note will have a new property referencing the user who created that note:
      • jlib:note
        • ....
        • jlib:user: REFERENCE to the user that created the note.

    • A new jlib:config node is added under jlib:system node. It looks like:
      • jlib:config: This node will hold repository configuration data.
        • jlib:config-entry: This node will contain a configuration entry
          • jlib:config-key: It will be the config entry key name.
          • jlib:config-value: It will be the config entry value.
        • ....

    • All nodes will have a jlib:active property that will indicate if the node is or not active
 

Copyright © 2004-2006 Martín Pérez Mariñán & others. Created with jLibrary. Design by Andreas Viklund.

Eclipse, Built on Eclipse and Eclipse Ready are trademarks of Eclipse Foundation, Inc.

SourceForge.net Logo Donate to this project
Built on EclipseTM RCP Hosted at sourceforge.net