Class QNodeDefinitionImpl
- java.lang.Object
 - 
- org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
 - 
- org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,QItemDefinition,QNodeDefinition
public class QNodeDefinitionImpl extends QItemDefinitionImpl implements QNodeDefinition
QNodeDefinitionImplimplements aQNodeDefinition.- See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
- 
Fields inherited from interface org.apache.jackrabbit.spi.QItemDefinition
EMPTY_ARRAY 
- 
Fields inherited from interface org.apache.jackrabbit.spi.QNodeDefinition
EMPTY_ARRAY 
 - 
 
- 
Constructor Summary
Constructors Constructor Description QNodeDefinitionImpl(NodeDefinition nodeDef, NamePathResolver resolver)Creates a new node definition based on a JCRNodeDefinition.QNodeDefinitionImpl(Name name, Name declaringNodeType, boolean isAutoCreated, boolean isMandatory, int onParentVersion, boolean isProtected, Name defaultPrimaryType, Name[] requiredPrimaryTypes, boolean allowsSameNameSiblings)Creates a new SPI node definition based on a JCR NodeDefinition.QNodeDefinitionImpl(QNodeDefinition nodeDef)Copy constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowsSameNameSiblings()Reports whether this node can have same-name siblings.booleandefinesNode()Determines whether this item definition defines a node.booleanequals(java.lang.Object obj)Compares two node definitions for equality.NamegetDefaultPrimaryType()Returns the name of the default primary type.Name[]getRequiredPrimaryTypes()Returns the array of names of the required primary types.inthashCode()OverwritesQItemDefinitionImpl.hashCode().- 
Methods inherited from class org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected 
- 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.jackrabbit.spi.QItemDefinition
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
QNodeDefinitionImpl
public QNodeDefinitionImpl(QNodeDefinition nodeDef)
Copy constructor.- Parameters:
 nodeDef- some other node definition.
 
- 
QNodeDefinitionImpl
public QNodeDefinitionImpl(Name name, Name declaringNodeType, boolean isAutoCreated, boolean isMandatory, int onParentVersion, boolean isProtected, Name defaultPrimaryType, Name[] requiredPrimaryTypes, boolean allowsSameNameSiblings)
Creates a new SPI node definition based on a JCR NodeDefinition.- Parameters:
 name- the name of the child item.declaringNodeType- the declaring node typeisAutoCreated- if this item is auto created.isMandatory- if this is a mandatory item.onParentVersion- the on parent version behaviour.isProtected- if this item is protected.defaultPrimaryType- the default primary type namerequiredPrimaryTypes- the required primary type nameallowsSameNameSiblings- if this node allows SNS
 
- 
QNodeDefinitionImpl
public QNodeDefinitionImpl(NodeDefinition nodeDef, NamePathResolver resolver) throws NameException, NamespaceException
Creates a new node definition based on a JCRNodeDefinition.- Parameters:
 nodeDef- the node definition.resolver- the name/path resolver of the session that provided the node definition- Throws:
 NameException- ifnodeDefcontains an illegal name.NamespaceException- ifnodeDefcontains a name with an namespace prefix that is unknown toresolver.
 
 - 
 
- 
Method Detail
- 
getDefaultPrimaryType
public Name getDefaultPrimaryType()
Returns the name of the default primary type.- Specified by:
 getDefaultPrimaryTypein interfaceQNodeDefinition- Returns:
 - the name of the default primary type.
 
 
- 
getRequiredPrimaryTypes
public Name[] getRequiredPrimaryTypes()
Returns the array of names of the required primary types.- Specified by:
 getRequiredPrimaryTypesin interfaceQNodeDefinition- Returns:
 - the array of names of the required primary types.
 
 
- 
allowsSameNameSiblings
public boolean allowsSameNameSiblings()
Reports whether this node can have same-name siblings.- Specified by:
 allowsSameNameSiblingsin interfaceQNodeDefinition- Returns:
 - the 'allowsSameNameSiblings' flag.
 
 
- 
definesNode
public boolean definesNode()
Determines whether this item definition defines a node.- Specified by:
 definesNodein interfaceQItemDefinition- Returns:
 - always 
true 
 
- 
equals
public boolean equals(java.lang.Object obj)
Compares two node definitions for equality. Returnstrueif the given object is a node definition and has the same attributes as this node definition.- Overrides:
 equalsin classQItemDefinitionImpl- Parameters:
 obj- the object to compare this node definition with- Returns:
 trueif the object is equal to this node definition,falseotherwise- See Also:
 Object.equals(Object)
 
- 
hashCode
public int hashCode()
OverwritesQItemDefinitionImpl.hashCode().- Overrides:
 hashCodein classQItemDefinitionImpl- Returns:
 - the hash code
 
 
 - 
 
 -