org.priha.nodetype
Class QNodeType

java.lang.Object
  extended by org.priha.nodetype.QNodeType

public class QNodeType
extends java.lang.Object

QNodeType provides non-Session -specific things of NodeTypes.


Nested Class Summary
 class QNodeType.Impl
          The session-specific parts of the node type.
 
Field Summary
protected  QNodeDefinition[] m_childNodeDefinitions
           
protected  QPropertyDefinition[] m_declaredPropertyDefinitions
           
protected  boolean m_hasOrderableChildNodes
           
protected  boolean m_ismixin
           
protected  QNodeType[] m_parents
           
protected  QPropertyDefinition[] m_propertyDefinitions
           
 
Constructor Summary
QNodeType(QName name)
           
 
Method Summary
 boolean canAddChildNode(QName childNodeName)
           
 boolean canAddChildNode(QName childNodeName, QName type)
          Determines whether a child Node can be added of a predeterminate type.
 boolean canRemoveItem(QName itemName)
           
 boolean canSetProperty(QName propertyName, javax.jcr.Value value)
           
 boolean canSetProperty(QName propertyName, javax.jcr.Value[] values)
           
 QNodeDefinition findNodeDefinition(QName name)
          Find a NodeDefinition from the children of this NodeType.
 QPropertyDefinition findPropertyDefinition(QName name, boolean multiple)
          Finds a property definition for a child property.
 QName getPrimaryItemQName()
           
 QName getQName()
           
 QPropertyDefinition[] getQPropertyDefinitions()
           
 boolean hasOrderableChildNodes()
           
 boolean isNodeType(QName qn)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_parents

protected QNodeType[] m_parents

m_propertyDefinitions

protected QPropertyDefinition[] m_propertyDefinitions

m_declaredPropertyDefinitions

protected QPropertyDefinition[] m_declaredPropertyDefinitions

m_childNodeDefinitions

protected QNodeDefinition[] m_childNodeDefinitions

m_ismixin

protected boolean m_ismixin

m_hasOrderableChildNodes

protected boolean m_hasOrderableChildNodes
Constructor Detail

QNodeType

public QNodeType(QName name)
Method Detail

hasOrderableChildNodes

public boolean hasOrderableChildNodes()

getQName

public QName getQName()

getPrimaryItemQName

public QName getPrimaryItemQName()

canAddChildNode

public boolean canAddChildNode(QName childNodeName)

canAddChildNode

public boolean canAddChildNode(QName childNodeName,
                               QName type)
Determines whether a child Node can be added of a predeterminate type.

Parameters:
childNodeName - Name of the new child.
type - Type to check.
Returns:
True, if this node type allows adding this child of this type.

canRemoveItem

public boolean canRemoveItem(QName itemName)

canSetProperty

public boolean canSetProperty(QName propertyName,
                              javax.jcr.Value value)

canSetProperty

public boolean canSetProperty(QName propertyName,
                              javax.jcr.Value[] values)

findNodeDefinition

public QNodeDefinition findNodeDefinition(QName name)
Find a NodeDefinition from the children of this NodeType. It will also check the generic types (marked with "*").

Parameters:
name -
Returns:

findPropertyDefinition

public QPropertyDefinition findPropertyDefinition(QName name,
                                                  boolean multiple)
Finds a property definition for a child property. If the child property definition for this node has a generic type ("*"), then that will be found as a last resort.

Parameters:
name - The name of the property to look for.
multiple - If true, checks only multi properties; if false, checks only single properties.
Returns:
A valid PropertyDefinition, or null, if no such beast can be located.

isNodeType

public boolean isNodeType(QName qn)

getQPropertyDefinitions

public QPropertyDefinition[] getQPropertyDefinitions()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object