Create a new node type

REQ-180

Actors

Name
Administrator

The repository is a tree of nodes.

Each node has a node type. The node type specifies

  • The name and supertypes of the node type
  • The properties of the node type
  • The child nodes of the node type.

To create a new node type, use the Create new objects action and select Virtual >> Node type definition. Create the new node type using the Create node type control:

  • Change the filter on the node types using the View menu. Either only nodes node types will be displayed (default) or all node types. In addition, it is possible to display the node types flat, i.e. without descendants other than the direct children or each as a tree of child node types.
  • Add or remove a new node type to the node types, add or remove a child node or a property to the currently selected node type. This can be done be done using the icons above the node types tree. The Remove icon will delete the currently selected node type, property or child. The Node icon will create a new node type, if dragged into the node types or it will create a child node, if dragged onto the currently selected node type. The Property icon will create a new property, if dragged onto the currently selected node type.
  • Add the attributes of a node type, a child node or a property using the detail panel, that appears, when the appropriate tree node is selected.
  • Finally, press OK to confirm or cancel the modification.

Node type attributes

For a node type, the following attributes can be set:

  • Primary type. Like any name in the repository, this is a qualified name, i.e. it consists of
    • Namespace, represented as a namespace URI, enclosed in curly braces. "{}" means the default namespace, i.e. no namespace.
    • Local name. Here, "*" means any name.
  • Supertype. A node type inherits the property and child node configuration of its supertype (while the JCR supports multiple supertypes, nodes does not), plus the properties and child nodes of all mixing types, see below.
  • An indication, if this is a mixin type. If true, it can be added as a mixin type to any node type (see below) and even to already stored nodes to extend their capabilities.
  • A list of mixin types.

Property attributes

A property can have the following attributes:

  • Name. Again, a qualified name must be used.
  • Mandatory indication. If true, the property must always be present. Set this flag only on rare occasions, because it makes changing of the node type more difficult.
  • Multiple. If true, the property can occur multiple times.
  • Type. A property can have a type from the following:
    • String
    • Name
    • Reference
    • Long
    • Boolean
  • Value constraint. Invoke the Edit button to add a value constraint to the property, this is only possible for property types String and Reference:
    • String. You can set a regular expression, or a set of values for enumerated types. If set, any setting of the property with values conflicting with the constraint will be denied.
    • Reference. You can select a node type from the repository to be referenced. If set, only references to that node type will be allowed.
  • Default. Set this, if the system should assign a default value for the property, when a new node of the particular type will be created.

Child node attributes

A child node may have the following attributes:

  • Name. Again, this is a qualified name.
  • Mandatory indication. If true, there must always be a child of this definition, when the node is saved.
  • Multiple. Can multiple children of this definition be present? If this is true, and the child has a specified name, all children will have the same name. The system will display them as child, child[1], child[2] etc.
  • Primary type. The node type of the child.

Variants

Type Id Name
REQ-181 Modify an existing node type
REQ-191 Observed mixin types