NodeTypeName
nt:file
Supertypes
nt:hierarchyNode
IsMixin
false
HasOrderableChildNodes
false
PrimaryItemName
jcr:content
ChildNodeDefinition
Name jcr:content
RequiredPrimaryTypes [nt:base]
DefaultPrimaryType null
AutoCreated false
Mandatory true
OnParentVersion COPY
Protected false
SameNameSiblings false
This node type is optional.
Nodes of this node type may be used to represent files. This node type inherits the child nodes and properties of nt:hierarchyNode and requires a single child node called jcr:content. The jcr:content node is used to hold the actual content of the file. This child node is mandatory, but not auto-created. Its node type will be application-dependent and therefore it must be added by the client. A common approach is to make the jcr:content a node of type nt:resource.
The strategy in separating the nt:file node from its jcr:content child node is to divide hierarchy from content. The idea is to provide a common indicator that indicates a cut off point below which the nodes and properties have a different semantic interpretation than they do above. This type of division is common to many hierarchical information structures, such as file systems.
The jcr:content child node is also designated as the primary child item of its parent.