4.8 Node Types

Every node must have one and only one primary node type. The primary node type defines the names, types and other characteristics of the properties and child nodes that a node is allowed (or required) to have. Every node has a special property called jcr:primaryType that records the name of its primary node type.

In addition to its primary node type, a node may also have one or more mixin types. These are node type definitions that can mandate extra characteristics (i.e., more child nodes, properties and their respective names and types) for a particular node in addition to those enforced by its primary node type. When a node is assigned a mixin node type, it acquires a special multi-value property called jcr:mixinTypes that records its mixin node types.

Level 1 of the specification provides methods for discovering the node types of existing nodes, and for discovering and reading the definitions of node types available in the repository.

Level 2 of the specification provides methods for assigning primary and mixin node types to nodes.

The specification does not attempt to provide methods for defining, creating or managing primary or mixin node types.

This specification also provides a set of predefined primary and mixin node types; some required and some optional. See 6.7 Node Types.