Movatterモバイル変換


[0]ホーム

URL:


8 Node Type Discovery

All repositories arerequired to support methods for the discovery of the following nodetype-related information:

8.1 NodeTypeManager Object

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:

8.2 NodeType Object

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:

8.2.1 Name

returns the name ofthe node type (see §3.7.1.1Node Type Name).

8.2.2 Supertypes and Subtypes

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

8.2.3 Abstract

returnsif the node type is abstract andotherwise (see §3.7.1.3Abstract).

8.2.4 Mixin

returnsif the node type is a mixin andif it is a primary type (see §3.7.1.4Mixin).

8.2.5 Queryable Node Type

returnsif the node type is queryable andotherwise (see §3.7.1.5Queryable Node Type).

8.2.6 Orderable Child Nodes

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).

8.2.7 Primary Item

returns the primaryitem of the node type, if any (see §3.7.1.7Primary Item).

8.2.8 Property Definitions

The set of propertydefinitions is represented by an array ofobjects, accessed through the following methods:

(see §3.7.1.8Property Definitions)

8.2.9 Child Node Definitions

The set of child nodedefinitions is represented by an array ofobjects, accessed through the following methods:

(see §3.7.1.8Property Definitions)

8.3 ItemDefinition Object

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:

8.3.1 Name

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).

8.3.2 Protected

returnsif the item is protected andotherwise (see §3.7.2.2Protected).

8.3.3 Auto-Created

returnsif the item is auto-created andotherwise (see §3.7.2.3Auto-Created).

8.3.4 Mandatory

returnsif the item is mandatory andotherwise (see §3.7.2.4Mandatory).

8.3.5 On-Parent-Version

returns theon-parent-version setting of the definition; one of the constants of(see §3.7.2.5On-Parent-Version).

8.3.6 Declaring Node Type

returns theobject that contains this definition (see §8.2NodeType Object).

8.4 PropertyDefinition Object

The attributesspecific to property definitions are accessed through theinterface, which is a subclass of:

8.4.1 Required Type

returns the propertytype setting of the definition, which must be one of the constantsof theinterface (see §3.7.3.1Property Type).

8.4.2 Default Values

returns the defaultvalues of the definition (see §3.7.3.2Default Values).

8.4.3 Available Query Operators

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.

8.4.4 Full-Text Searchable

returnsif the property is full-text searchable andotherwise (see §3.7.3.4Full-Text Searchable).

8.4.5 Query-Orderable

returnsif the property is query-orderable andotherwise (see §3.7.3.5Query-Orderable).

8.4.6 Value Constraints

returns the valueconstraints of the definition (see §3.7.3.6Value Constraints),

8.4.7 Multi-value

returnsif the definition defines a multi-value property andif it defines a single value property (see §3.7.3.7Multi-Value).

8.5 NodeDefinition Object

The attributesspecific to child node definitions are accessed through theinterface, which is a subclass of:

8.5.1 Required Primary Node Types

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.

8.5.2 Default Primary Node Type

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.

8.5.3 Same-Name Siblings

returnsif the definition allows same-name sibling nodes andotherwise (see §3.7.4.3Same-Name Siblings).

8.6 Node Type Information for Existing Nodes

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.

8.6.1.1 Discovery of Item Definitions

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).

8.6.1.2 Root Node 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:

8.6.1.3 Root Declaring Node Type

Callingon theof the root node must return a validobject. The values returned by the methods of this object must be asfollows:

All other methods either return(if they return a)or an empty array (if they return an array).


[8]ページ先頭

©2009-2025 Movatter.jp