Skip to content

Custom node type phpcr:managed

uwej711 edited this page Mar 27, 2011 · 17 revisions

What are NodeTypes

JCR defines node types which can be thought of a kind of schema for the repository's nodes. These types define the properties and children a node can have. JCR defines a set of node types that can be readily use. Some node types like nt:file restrict the set of allowed properties others like nt:unstructured allow any kind of properties and child nodes.

Why a custom node type

The PHPCR ODM stores with every node the alias of the document the node corresponds to. Therefore it adds a property named phpcr:alias to the node. If you use a node type like nt:file that does not allow free properties the node can not be saved when there are additional properties.

mixin ...

How to create that node type

cnd file, load-cnd.jar repository file url, server not running

java -cp load-cnd.jar:jackrabbit-standalone-2.2.5.jar Main file:///path/to/your/jackrabbit/jackrabbit phpcr.cnd
Clone this wiki locally