All repositories arerequired to support methods for the discovery of the following nodetype-related information:
Which node types are supported inthe repository.
The definition of a supportednode type.
The node type of a node.
The definition of an item in thenode type of its parent.
A repository has asingle, global node type registry that holds all node typesavailable in the repository. The registry is represented by aobject acquired through
.
The method
returns theobject representing the specified registered node type.also provides the following related methods for accessing registerednode types:
Theinterface is a subclass of,which provides access methods to the static definitionalcharacteristics of a node type.
adds methods relevant to a “live” node type that is registeredin a repository.
Repositories thatsupportnode type management must implement,which is another subclass of(see §19Node Type Management).
Theinterface provides methods to access the attributes of a node type:
returns the name ofthe node type (see §3.7.1.1Node Type Name).
returns the list ofthe names of declared supertypes in this definition (see §3.7.1.2Supertypes).
In a repository thatsupportsnode type managementobjects not bound to a live node type may be encountered (forexample, in the form of a).In such cases this method may return.
additionally provides the following methods for accessing supertypeand subtype information
returnsif the node type is abstract andotherwise (see §3.7.1.3Abstract).
returnsif the node type is a mixin andif it is a primary type (see §3.7.1.4Mixin).
returnsif the node type is queryable andotherwise (see §3.7.1.5Queryable Node Type).
returnsif the node type supports orderable child nodes and otherwise (see §3.7.1.6Orderable Child Nodes). Support fororderable child nodes is optional (see §23OrderableChild Nodes).
returns the primaryitem of the node type, if any (see §3.7.1.7Primary Item).
The set of propertydefinitions is represented by an array ofobjects, accessed through the following methods:
(see §3.7.1.8Property Definitions)
The set of child nodedefinitions is represented by an array ofobjects, accessed through the following methods:
(see §3.7.1.8Property Definitions)
The attributes commonto both property and child node definitions are accessed through theinterface. Attributes specific to property definitions or child nodedefinitions are accessed through theandinterfaces, respectively. These interfaces are both subclasses of.Theinterface provides methods to access the following attributes:
returns the JCR Name(in qualified form) of the item to which the definition applies or“*”, indicating that the definition is residual (see §3.7.2.1Item Definition Name).
returnsif the item is protected andotherwise (see §3.7.2.2Protected).
returnsif the item is auto-created andotherwise (see §3.7.2.3Auto-Created).
returnsif the item is mandatory andotherwise (see §3.7.2.4Mandatory).
returns theon-parent-version setting of the definition; one of the constants of(see §3.7.2.5On-Parent-Version).
returns theobject that contains this definition (see §8.2NodeType Object).
The attributesspecific to property definitions are accessed through theinterface, which is a subclass of:
returns the propertytype setting of the definition, which must be one of the constantsof theinterface (see §3.7.3.1Property Type).
returns the defaultvalues of the definition (see §3.7.3.2Default Values).
returns an array ofconstants indicating which query operators are supported for thisproperty (see §3.7.3.3Available Query Operators). Theconstants are defined in the classand represent the operators defined in §6.7.16Comparison.
returnsif the property is full-text searchable andotherwise (see §3.7.3.4Full-Text Searchable).
returnsif the property is query-orderable andotherwise (see §3.7.3.5Query-Orderable).
returns the valueconstraints of the definition (see §3.7.3.6Value Constraints),
returnsif the definition defines a multi-value property andif it defines a single value property (see §3.7.3.7Multi-Value).
The attributesspecific to child node definitions are accessed through theinterface, which is a subclass of:
The methods
and
return informationabout the required primary node types of the definition (§3.7.4.1Required Primary Node Types). The latter method returns thenames of the node types while the former method returns the liveobjects representing the types. The former only functions if theis part of a live registered.
The methods
and
return informationabout the default primary node type of the definition (§3.7.4.2Default Primary Node Type). The latter method returns thename of the node type while the former method returns the liveobject representing the type. The former only functions if theis part of a live registered.
returnsif the definition allows same-name sibling nodes andotherwise (see §3.7.4.3Same-Name Siblings).
Given an existing,the methods
and
return, respectively,the primary and mixin node types of the node. The method
returnsif theis of the specified node type, according to theis-of-typerelation (see §3.7.6.3Is-of-Type Relation), andotherwise.
Theandinterfaces offer methods that allow direct access to theorwithin the node type of a parent node that is applicable to aparticular child item:
The definition thatapplies to an item is determined upon creation of that item (see§3.7.7Applicable Item Definition).
The methodcalled on the root node must return a valid, non-,object. The values returned by the methods of this object must be asfollows:
:““, the empty string.
:A validobject (see §8.6.1.3Root Declaring Node Type).
:
:
:
:
:,if versioning is supported and the root node is capable of beingmade versionable,otherwise.
:A valid non-object (see §3.7.8Root Node Type).
:An array containing a singleobject identical with that returned by.
Callingon theof the root node must return a validobject. The values returned by the methods of this object must be asfollows:
returns the name of a node type,whereis implementation-determined.
returnsif an only ifisor a supertype of.
andboth return an array containing the child node definition of theroot node.
All other methods either return(if they return a)or an empty array (if they return an array).