org.apache.jackrabbit.base.nodetype
Class BaseNodeType

java.lang.Object
  extended byorg.apache.jackrabbit.base.nodetype.BaseNodeType
All Implemented Interfaces:
NodeType

public class BaseNodeType
extends Object
implements NodeType

Node type base class.


Constructor Summary
protected BaseNodeType()
          Protected constructor.
 
Method Summary
 boolean canAddChildNode(String childNodeName)
          Implemented by finding the definition of the named child node (or the wildcard child node definition if the named child node definition is not found).
 boolean canAddChildNode(String childNodeName, String nodeTypeName)
          Not implemented.
 boolean canRemoveItem(String itemName)
          Implemented by finding the definition of the named item (property or child node) and checking that the defined item is not mandatory.
 boolean canSetProperty(String propertyName, Value value)
          Implemented by finding the definition of the named property (or the wildcard property definition if the named property definition is not found) and checking whether the defined property is single-valued.
 boolean canSetProperty(String propertyName, Value[] values)
          Implemented by finding the definition of the named property (or the wildcard property definition if the named property definition is not found) and checking whether the defined property is multi-valued.
 NodeDefinition[] getChildNodeDefinitions()
          Implemented by calling getDeclaredChildNodeDefinitions() on this node type and all supertypes returned by getSupertypes().
 NodeDefinition[] getDeclaredChildNodeDefinitions()
          Always returns an empty node definition array.
 PropertyDefinition[] getDeclaredPropertyDefinitions()
          Always returns an empty property definition array.
 NodeType[] getDeclaredSupertypes()
          Always returns an empty supertype array.
 String getName()
          Not implemented.
 String getPrimaryItemName()
          Not implemented.
 PropertyDefinition[] getPropertyDefinitions()
          Implemented by calling getDeclaredPropertyDefinitions() this node type and all supertypes returned by getSupertypes().
 NodeType[] getSupertypes()
          Implemented by calling getDeclaredSupertypes() and recursively collecting all supertypes.
 boolean hasOrderableChildNodes()
          Always returns false.
 boolean isMixin()
          Always returns false.
 boolean isNodeType(String nodeTypeName)
          Implemented by calling getName() and comparing the result to the given node type name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseNodeType

protected BaseNodeType()
Protected constructor. This class is only useful when extended.

Method Detail

getName

public String getName()
Not implemented.

Specified by:
getName in interface NodeType

isMixin

public boolean isMixin()
Always returns false.

Specified by:
isMixin in interface NodeType

hasOrderableChildNodes

public boolean hasOrderableChildNodes()
Always returns false.

Specified by:
hasOrderableChildNodes in interface NodeType

getPrimaryItemName

public String getPrimaryItemName()
Not implemented.

Specified by:
getPrimaryItemName in interface NodeType

getDeclaredSupertypes

public NodeType[] getDeclaredSupertypes()
Always returns an empty supertype array.

Specified by:
getDeclaredSupertypes in interface NodeType

getSupertypes

public NodeType[] getSupertypes()
Implemented by calling getDeclaredSupertypes() and recursively collecting all supertypes. The collected supertype set is returned as a node type array.

Specified by:
getSupertypes in interface NodeType

isNodeType

public boolean isNodeType(String nodeTypeName)
Implemented by calling getName() and comparing the result to the given node type name. If the match fails, recursively checks all declared supertypes.

Specified by:
isNodeType in interface NodeType

getDeclaredPropertyDefinitions

public PropertyDefinition[] getDeclaredPropertyDefinitions()
Always returns an empty property definition array.

Specified by:
getDeclaredPropertyDefinitions in interface NodeType

getPropertyDefinitions

public PropertyDefinition[] getPropertyDefinitions()
Implemented by calling getDeclaredPropertyDefinitions() this node type and all supertypes returned by getSupertypes(). The collected property definition set is returned as a property definition array.

Specified by:
getPropertyDefinitions in interface NodeType

getDeclaredChildNodeDefinitions

public NodeDefinition[] getDeclaredChildNodeDefinitions()
Always returns an empty node definition array.

Specified by:
getDeclaredChildNodeDefinitions in interface NodeType

getChildNodeDefinitions

public NodeDefinition[] getChildNodeDefinitions()
Implemented by calling getDeclaredChildNodeDefinitions() on this node type and all supertypes returned by getSupertypes(). The collected node definition set is returned as a node definition array.

Specified by:
getChildNodeDefinitions in interface NodeType

canSetProperty

public boolean canSetProperty(String propertyName,
                              Value value)
Implemented by finding the definition of the named property (or the wildcard property definition if the named property definition is not found) and checking whether the defined property is single-valued. More detailed value constraints are not implemented, but this method will simply return true instead of throwing an UnsupportedOperationException for all value constraint comparisons.

Specified by:
canSetProperty in interface NodeType

canSetProperty

public boolean canSetProperty(String propertyName,
                              Value[] values)
Implemented by finding the definition of the named property (or the wildcard property definition if the named property definition is not found) and checking whether the defined property is multi-valued. More detailed value constraints are not implemented, but this method will simply return true instead of throwing an UnsupportedOperationException for all value constraint comparisons.

Specified by:
canSetProperty in interface NodeType

canAddChildNode

public boolean canAddChildNode(String childNodeName)
Implemented by finding the definition of the named child node (or the wildcard child node definition if the named child node definition is not found). Returns true if a node definition is found, false otherwise.

Specified by:
canAddChildNode in interface NodeType

canAddChildNode

public boolean canAddChildNode(String childNodeName,
                               String nodeTypeName)
Not implemented. Implementing this method requires access to the node type manager in order to resolve the given node type name.

Specified by:
canAddChildNode in interface NodeType

canRemoveItem

public boolean canRemoveItem(String itemName)
Implemented by finding the definition of the named item (property or child node) and checking that the defined item is not mandatory.

Specified by:
canRemoveItem in interface NodeType


Copyright © 2004-2005 . All Rights Reserved.