A memo about JCR’s types and type management

JCR-Types
JCR, the Java Content Repository, uses typisation for its repository items. This article describes the basic concepts of JCRs typisations, the relationships between nodes and properties and the administration and shapings of those types.

All node types and namespaces, known to your repository, are stored under the absolute path “/jcr:system/jcr:nodeTypes” as shown in the screenshot of the JCR-Browser Eclipse plugin. You are able to add your own namespaces and node types here.

The default namespaces

In JCR 1.0, there are initially five namespaces in default.

  • jcr – This namespace is reserved for internal use
  • nt – This namespace stands for internal node types
  • mix – This namespace is reserved for internal (built-in) so called mixin node types
  • xml – This is a compatibility namspace for XML
  • “” – (empty) This empty namespace is the default-namespace

Node types

Node types do always have excalty one primary node type (jcr:primaryType). A primary node type defines names, types, properties and child nodes, a node is allowed or required to have. In addition to that, a node type can have multiple mixin types (jcr:mixinTypes). Those mixin types additionally add extra names, types, properties and child nodes, a node is allowed or required to have.

Property types

A property itself can consist of multiple values. In this case, it is called a multi-value property. The following property types exist.

  • PropertyType.STRING
  • PropertyType.BINARY
  • PropertyType.DATE
  • PropertyType.LONG
  • PropertyType.DOUBLE
  • PropertyType.BOOLEAN
  • PropertyType.NAME
  • PropertyType.PATH
  • PropertyType.REFERENCE

NAME, PATH and REFERENCE have special semantics.
NAME is intended to be used to store fully qualified (namespace-aware) names of repository items as strings (e.g. the name of the node type “nt:file“).
PATH stores the relative or absolute path to an item within a workspace.
REFERENCE stores a direct reference to a node as a UUID.


Due to JCR’s concepts, it is not possible to create own property types. Own types can just be created for nodes. In this case, you want to create an own node type.

References and resources

Leave a Reply


+ five = 10