javax.jcr.nodetype
Interface NodeType

All Superinterfaces:
NodeTypeDefinition

public interface NodeType
extends NodeTypeDefinition

A NodeType object represents a "live" node type that is registered in the repository.


Field Summary
static java.lang.String MIX_CREATED
          A constant for the node type name mix:created (in expanded form).
static java.lang.String MIX_LANGUAGE
          A constant for the node type name mix:language (in expanded form).
static java.lang.String MIX_LAST_MODIFIED
          A constant for the node type name mix:lastModified (in expanded form).
static java.lang.String MIX_LIFECYCLE
          A constant for the node type name mix:lifecycle (in expanded form).
static java.lang.String MIX_LOCKABLE
          A constant for the node type name mix:lockable (in expanded form).
static java.lang.String MIX_MIMETYPE
          A constant for the node type name mix:mimeType (in expanded form).
static java.lang.String MIX_REFERENCEABLE
          A constant for the node type name mix:referenceable (in expanded form).
static java.lang.String MIX_SHAREABLE
          A constant for the node type name mix:shareable (in expanded form).
static java.lang.String MIX_SIMPLE_VERSIONABLE
          A constant for the node type name mix:simpleVersionable (in expanded form).
static java.lang.String MIX_TITLE
          A constant for the node type name mix:title (in expanded form).
static java.lang.String MIX_VERSIONABLE
          A constant for the node type name mix:versionable (in expanded form).
static java.lang.String NT_ACTIVITY
          A constant for the node type name nt:activity (in expanded form).
static java.lang.String NT_ADDRESS
          A constant for the node type name nt:address (in expanded form).
static java.lang.String NT_BASE
          A constant for the node type name nt:base (in expanded form).
static java.lang.String NT_CHILD_NODE_DEFINITION
          A constant for the node type name nt:childNodeDefinition (in expanded form).
static java.lang.String NT_CONFIGURATION
          A constant for the node type name nt:configuration (in expanded form).
static java.lang.String NT_FILE
          A constant for the node type name nt:file (in expanded form).
static java.lang.String NT_FOLDER
          A constant for the node type name nt:folder (in expanded form).
static java.lang.String NT_FROZEN_NODE
          A constant for the node type name nt:frozenNode (in expanded form).
static java.lang.String NT_HIERARCHY_NODE
          A constant for the node type name nt:hierarchyNode (in expanded form).
static java.lang.String NT_LINKED_FILE
          A constant for the node type name nt:linkedFile (in expanded form).
static java.lang.String NT_NODE_TYPE
          A constant for the node type name nt:nodeType (in expanded form).
static java.lang.String NT_PROPERTY_DEFINITION
          A constant for the node type name nt:propertyDefinition (in expanded form).
static java.lang.String NT_QUERY
          A constant for the node type name nt:query (in expanded form).
static java.lang.String NT_RESOURCE
          A constant for the node type name nt:resource (in expanded form).
static java.lang.String NT_UNSTRUCTURED
          A constant for the node type name nt:unstructured (in expanded form).
static java.lang.String NT_VERSION
          A constant for the node type name nt:version (in expanded form).
static java.lang.String NT_VERSION_HISTORY
          A constant for the node type name nt:versionHistory (in expanded form).
static java.lang.String NT_VERSIONED_CHILD
          A constant for the node type name nt:versionedChild (in expanded form).
 
Method Summary
 boolean canAddChildNode(java.lang.String childNodeName)
          Returns true if this node type allows the addition of a child node called childNodeName without specific node type information (that is, given the definition of this parent node type, the child node name is sufficient to determine the intended child node type).
 boolean canAddChildNode(java.lang.String childNodeName, java.lang.String nodeTypeName)
          Returns true if this node type allows the addition of a child node called childNodeName of node type nodeTypeName.
 boolean canRemoveItem(java.lang.String itemName)
          Deprecated. As of JCR 2.0, clients should use canRemoveNode(String) and canRemoveProperty(String) instead.
 boolean canRemoveNode(java.lang.String nodeName)
          Returns true if removing the child node called nodeName is allowed by this node type.
 boolean canRemoveProperty(java.lang.String propertyName)
          Returns true if removing the property called propertyName is allowed by this node type.
 boolean canSetProperty(java.lang.String propertyName, Value value)
          Returns true if setting propertyName to value is allowed by this node type.
 boolean canSetProperty(java.lang.String propertyName, Value[] values)
          Returns true if setting propertyName to values is allowed by this node type.
 NodeDefinition[] getChildNodeDefinitions()
          Returns an array containing the child node definitions of this node type.
 NodeTypeIterator getDeclaredSubtypes()
          Returns the direct subtypes of this node type in the node type inheritance hierarchy, that is, those which actually declared this node type in their list of supertypes.
 NodeType[] getDeclaredSupertypes()
          Returns the direct supertypes of this node type in the node type inheritance hierarchy, that is, those actually declared in this node type.
 PropertyDefinition[] getPropertyDefinitions()
          Returns an array containing the property definitions of this node type.
 NodeTypeIterator getSubtypes()
          Returns all subtypes of this node type in the node type inheritance hierarchy.
 NodeType[] getSupertypes()
          Returns all supertypes of this node type in the node type inheritance hierarchy.
 boolean isNodeType(java.lang.String nodeTypeName)
          Returns true if the name of this node type or any of its direct or indirect supertypes is equal to nodeTypeName, otherwise returns false.
 
Methods inherited from interface javax.jcr.nodetype.NodeTypeDefinition
getDeclaredChildNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypeNames, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin, isQueryable
 

Field Detail

NT_BASE

static final java.lang.String NT_BASE
A constant for the node type name nt:base (in expanded form). Constants for the names of the properties declared by nt:base are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_HIERARCHY_NODE

static final java.lang.String NT_HIERARCHY_NODE
A constant for the node type name nt:hierarchyNode (in expanded form).

Since:
JCR 2.0
See Also:
Constant Field Values

NT_FOLDER

static final java.lang.String NT_FOLDER
A constant for the node type name nt:folder (in expanded form).

Since:
JCR 2.0
See Also:
Constant Field Values

NT_FILE

static final java.lang.String NT_FILE
A constant for the node type name nt:file (in expanded form). A constant for the name of the child node declared by nt:file is:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_LINKED_FILE

static final java.lang.String NT_LINKED_FILE
A constant for the node type name nt:linkedFile (in expanded form). A constant for the name of the property declared by nt:linkedFile is:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_RESOURCE

static final java.lang.String NT_RESOURCE
A constant for the node type name nt:resource (in expanded form). A constant for the name of the property declared by nt:resource is:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_UNSTRUCTURED

static final java.lang.String NT_UNSTRUCTURED
A constant for the node type name nt:unstructured (in expanded form).

Since:
JCR 2.0
See Also:
Constant Field Values

NT_ADDRESS

static final java.lang.String NT_ADDRESS
A constant for the node type name nt:address (in expanded form). Constants for the names of the properties declared by nt:base are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_REFERENCEABLE

static final java.lang.String MIX_REFERENCEABLE
A constant for the node type name mix:referenceable (in expanded form). A constant for the name of the property declared by mix:referenceable is:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_TITLE

static final java.lang.String MIX_TITLE
A constant for the node type name mix:title (in expanded form). Constants for the names of the properties declared by mix:title are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_CREATED

static final java.lang.String MIX_CREATED
A constant for the node type name mix:created (in expanded form). Constants for the names of the properties declared by mix:created are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_LAST_MODIFIED

static final java.lang.String MIX_LAST_MODIFIED
A constant for the node type name mix:lastModified (in expanded form). Constants for the names of the properties declared by mix:lastModified are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_LANGUAGE

static final java.lang.String MIX_LANGUAGE
A constant for the node type name mix:language (in expanded form). A constant for the name of the property declared by mix:language is:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_MIMETYPE

static final java.lang.String MIX_MIMETYPE
A constant for the node type name mix:mimeType (in expanded form). Constants for the names of the properties declared by mix:mimeType are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_NODE_TYPE

static final java.lang.String NT_NODE_TYPE
A constant for the node type name nt:nodeType (in expanded form). Constants for the names of the child items declared by nt:nodeType are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_PROPERTY_DEFINITION

static final java.lang.String NT_PROPERTY_DEFINITION
A constant for the node type name nt:propertyDefinition (in expanded form). Constants for the names of the properties declared by nt:propertyDefinition are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_CHILD_NODE_DEFINITION

static final java.lang.String NT_CHILD_NODE_DEFINITION
A constant for the node type name nt:childNodeDefinition (in expanded form). Constants for the names of the properties declared by nt:childNodeDefinition are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_SHAREABLE

static final java.lang.String MIX_SHAREABLE
A constant for the node type name mix:shareable (in expanded form).

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_LOCKABLE

static final java.lang.String MIX_LOCKABLE
A constant for the node type name mix:lockable (in expanded form). Constants for the names of the properties declared by mix:lockable are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_LIFECYCLE

static final java.lang.String MIX_LIFECYCLE
A constant for the node type name mix:lifecycle (in expanded form). Constants for the names of the properties declared by mix:lifecycle are:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_SIMPLE_VERSIONABLE

static final java.lang.String MIX_SIMPLE_VERSIONABLE
A constant for the node type name mix:simpleVersionable (in expanded form). A constant for the name of the property declared by mix:simpleVersionable is:

Since:
JCR 2.0
See Also:
Constant Field Values

MIX_VERSIONABLE

static final java.lang.String MIX_VERSIONABLE
A constant for the node type name mix:versionable (in expanded form). Constants for the names of the properties declared by mix:versionable are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_VERSION_HISTORY

static final java.lang.String NT_VERSION_HISTORY
A constant for the node type name nt:versionHistory (in expanded form). Constants for the names of the child items declared by nt:versionHistory are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_VERSION

static final java.lang.String NT_VERSION
A constant for the node type name nt:version (in expanded form). Constants for the names of the child items declared by nt:version are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_FROZEN_NODE

static final java.lang.String NT_FROZEN_NODE
A constant for the node type name nt:frozenNode (in expanded form). Constants for the names of the properties declared by nt:frozenNode are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_VERSIONED_CHILD

static final java.lang.String NT_VERSIONED_CHILD
A constant for the node type name nt:versionedChild (in expanded form). A constant for the name of the property declared by nt:versionedChild is:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_ACTIVITY

static final java.lang.String NT_ACTIVITY
A constant for the node type name nt:activity (in expanded form). A constant for the name of the property declared by nt:activity is:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_CONFIGURATION

static final java.lang.String NT_CONFIGURATION
A constant for the node type name nt:configuration (in expanded form). A constant for the name of the property declared by nt:configuration are:

Since:
JCR 2.0
See Also:
Constant Field Values

NT_QUERY

static final java.lang.String NT_QUERY
A constant for the node type name nt:query (in expanded form). Constants for the names of the properties declared by nt:query are:

Since:
JCR 2.0
See Also:
Constant Field Values
Method Detail

getSupertypes

NodeType[] getSupertypes()
Returns all supertypes of this node type in the node type inheritance hierarchy. For primary types apart from nt:base, this list will always include at least nt:base. For mixin types, there is no required supertype.

Returns:
an array of NodeType objects.
See Also:
getDeclaredSupertypes()

getDeclaredSupertypes

NodeType[] getDeclaredSupertypes()
Returns the direct supertypes of this node type in the node type inheritance hierarchy, that is, those actually declared in this node type. In single-inheritance systems, this will always be an array of size 0 or 1. In systems that support multiple inheritance of node types this array may be of size greater than 1.

Returns:
an array of NodeType objects.
See Also:
getSupertypes()

getSubtypes

NodeTypeIterator getSubtypes()
Returns all subtypes of this node type in the node type inheritance hierarchy.

Returns:
a NodeTypeIterator.
Since:
JCR 2.0
See Also:
getDeclaredSubtypes()

getDeclaredSubtypes

NodeTypeIterator getDeclaredSubtypes()
Returns the direct subtypes of this node type in the node type inheritance hierarchy, that is, those which actually declared this node type in their list of supertypes.

Returns:
an NodeTypeIterator.
Since:
JCR 2.0
See Also:
getSubtypes()

isNodeType

boolean isNodeType(java.lang.String nodeTypeName)
Returns true if the name of this node type or any of its direct or indirect supertypes is equal to nodeTypeName, otherwise returns false.

Parameters:
nodeTypeName - the name of a node type.
Returns:
a boolean

getPropertyDefinitions

PropertyDefinition[] getPropertyDefinitions()
Returns an array containing the property definitions of this node type. This includes both those property definitions actually declared in this node type and those inherited from the supertypes of this type.

Returns:
an array containing the property definitions.
See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()

getChildNodeDefinitions

NodeDefinition[] getChildNodeDefinitions()
Returns an array containing the child node definitions of this node type. This includes both those child node definitions actually declared in this node type and those inherited from the supertypes of this node type.

Returns:
an array containing the child node definitions.
See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()

canSetProperty

boolean canSetProperty(java.lang.String propertyName,
                       Value value)
Returns true if setting propertyName to value is allowed by this node type. Otherwise returns false.

Parameters:
propertyName - The name of the property
value - A Value object.
Returns:
a boolean

canSetProperty

boolean canSetProperty(java.lang.String propertyName,
                       Value[] values)
Returns true if setting propertyName to values is allowed by this node type. Otherwise returns false.

Parameters:
propertyName - The name of the property
values - A Value array.
Returns:
a boolean

canAddChildNode

boolean canAddChildNode(java.lang.String childNodeName)
Returns true if this node type allows the addition of a child node called childNodeName without specific node type information (that is, given the definition of this parent node type, the child node name is sufficient to determine the intended child node type). Returns false otherwise.

Parameters:
childNodeName - The name of the child node.
Returns:
a boolean

canAddChildNode

boolean canAddChildNode(java.lang.String childNodeName,
                        java.lang.String nodeTypeName)
Returns true if this node type allows the addition of a child node called childNodeName of node type nodeTypeName. Returns false otherwise.

Parameters:
childNodeName - The name of the child node.
nodeTypeName - The name of the node type of the child node.
Returns:
a boolean

canRemoveItem

boolean canRemoveItem(java.lang.String itemName)
Deprecated. As of JCR 2.0, clients should use canRemoveNode(String) and canRemoveProperty(String) instead.

Returns true if removing the child item called itemName is allowed by this node type. Returns false otherwise.

Parameters:
itemName - The name of the child item
Returns:
a boolean

canRemoveNode

boolean canRemoveNode(java.lang.String nodeName)
Returns true if removing the child node called nodeName is allowed by this node type. Returns false otherwise.

Parameters:
nodeName - The name of the child node
Returns:
a boolean
Since:
JCR 2.0

canRemoveProperty

boolean canRemoveProperty(java.lang.String propertyName)
Returns true if removing the property called propertyName is allowed by this node type. Returns false otherwise.

Parameters:
propertyName - The name of the property
Returns:
a boolean
Since:
JCR 2.0


Copyright © 2009 Day Software. All Rights Reserved.