org.apache.jackrabbit.core.nodetype
Class NodeTypeImpl

java.lang.Object
  extended byorg.apache.jackrabbit.core.nodetype.NodeTypeImpl
All Implemented Interfaces:
NodeType

public class NodeTypeImpl
extends Object
implements NodeType

A NodeTypeImpl ...


Method Summary
 boolean canAddChildNode(String childNodeName)
          
 boolean canAddChildNode(String childNodeName, String nodeTypeName)
          
 boolean canRemoveItem(String itemName)
          
 boolean canSetProperty(String propertyName, Value value)
          
 boolean canSetProperty(String propertyName, Value[] values)
          
 NodeDefinition[] getAutoCreatedNodeDefinitions()
          Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.
 PropertyDefinition[] getAutoCreatedPropertyDefinitions()
          Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.
 NodeDefinition[] getChildNodeDefinitions()
          
 NodeDefinition[] getDeclaredChildNodeDefinitions()
          
 PropertyDefinition[] getDeclaredPropertyDefinitions()
          
 NodeType[] getDeclaredSupertypes()
          
 NodeTypeDef getDefinition()
          Returns the definition of this node type.
 NodeType[] getInheritedSupertypes()
          Returns all inherited supertypes of this node type.
 NodeDefinition[] getMandatoryNodeDefinitions()
          Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.
 PropertyDefinition[] getMandatoryPropertyDefinitions()
          Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.
 String getName()
          
 String getPrimaryItemName()
          
 PropertyDefinition[] getPropertyDefinitions()
          
 QName getQName()
          Returns the 'internal', i.e.
 NodeType[] getSupertypes()
          
 boolean hasOrderableChildNodes()
          
 boolean isDerivedFrom(QName nodeTypeName)
          Checks if this node type is directly or indirectly derived from the specified node type.
 boolean isMixin()
          
 boolean isNodeType(String nodeTypeName)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isDerivedFrom

public boolean isDerivedFrom(QName nodeTypeName)
Checks if this node type is directly or indirectly derived from the specified node type.

Parameters:
nodeTypeName -
Returns:
true if this node type is directly or indirectly derived from the specified node type, otherwise false.

getDefinition

public NodeTypeDef getDefinition()
Returns the definition of this node type.

Returns:
the definition of this node type

getAutoCreatedNodeDefinitions

public NodeDefinition[] getAutoCreatedNodeDefinitions()
Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.

Returns:
an array of child node definitions.
See Also:
ItemDefinition.isAutoCreated()

getAutoCreatedPropertyDefinitions

public PropertyDefinition[] getAutoCreatedPropertyDefinitions()
Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.

Returns:
an array of property definitions.
See Also:
ItemDefinition.isAutoCreated()

getMandatoryPropertyDefinitions

public PropertyDefinition[] getMandatoryPropertyDefinitions()
Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.

Returns:
an array of property definitions.
See Also:
ItemDefinition.isMandatory()

getMandatoryNodeDefinitions

public NodeDefinition[] getMandatoryNodeDefinitions()
Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.

Returns:
an array of child node definitions.
See Also:
ItemDefinition.isMandatory()

getQName

public QName getQName()
Returns the 'internal', i.e. the fully qualified name.

Returns:
the qualified name

getInheritedSupertypes

public NodeType[] getInheritedSupertypes()
Returns all inherited supertypes of this node type.

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

getName

public String getName()

Specified by:
getName in interface NodeType

getPrimaryItemName

public String getPrimaryItemName()

Specified by:
getPrimaryItemName in interface NodeType

isMixin

public boolean isMixin()

Specified by:
isMixin in interface NodeType

isNodeType

public boolean isNodeType(String nodeTypeName)

Specified by:
isNodeType in interface NodeType

hasOrderableChildNodes

public boolean hasOrderableChildNodes()

Specified by:
hasOrderableChildNodes in interface NodeType

getSupertypes

public NodeType[] getSupertypes()

Specified by:
getSupertypes in interface NodeType

getChildNodeDefinitions

public NodeDefinition[] getChildNodeDefinitions()

Specified by:
getChildNodeDefinitions in interface NodeType

getPropertyDefinitions

public PropertyDefinition[] getPropertyDefinitions()

Specified by:
getPropertyDefinitions in interface NodeType

getDeclaredSupertypes

public NodeType[] getDeclaredSupertypes()

Specified by:
getDeclaredSupertypes in interface NodeType

getDeclaredChildNodeDefinitions

public NodeDefinition[] getDeclaredChildNodeDefinitions()

Specified by:
getDeclaredChildNodeDefinitions in interface NodeType

canSetProperty

public boolean canSetProperty(String propertyName,
                              Value value)

Specified by:
canSetProperty in interface NodeType

canSetProperty

public boolean canSetProperty(String propertyName,
                              Value[] values)

Specified by:
canSetProperty in interface NodeType

canAddChildNode

public boolean canAddChildNode(String childNodeName)

Specified by:
canAddChildNode in interface NodeType

canAddChildNode

public boolean canAddChildNode(String childNodeName,
                               String nodeTypeName)

Specified by:
canAddChildNode in interface NodeType

canRemoveItem

public boolean canRemoveItem(String itemName)

Specified by:
canRemoveItem in interface NodeType

getDeclaredPropertyDefinitions

public PropertyDefinition[] getDeclaredPropertyDefinitions()

Specified by:
getDeclaredPropertyDefinitions in interface NodeType


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.