org.apache.jackrabbit.spi2dav
Class QNodeTypeDefinitionImpl

java.lang.Object
  extended by org.apache.jackrabbit.spi2dav.QNodeTypeDefinitionImpl
All Implemented Interfaces:
QNodeTypeDefinition, NodeTypeConstants

public class QNodeTypeDefinitionImpl
extends Object
implements QNodeTypeDefinition, NodeTypeConstants

A QNodeTypeDefinitionImpl holds the definition of a node type.


Field Summary
 
Fields inherited from interface org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeConstants
AUTOCREATED_ATTRIBUTE, CHILDNODEDEFINITION_ELEMENT, DECLARINGNODETYPE_ATTRIBUTE, DEFAULTPRIMARYTYPE_ATTRIBUTE, DEFAULTVALUE_ELEMENT, DEFAULTVALUES_ELEMENT, HASORDERABLECHILDNODES_ATTRIBUTE, ISMIXIN_ATTRIBUTE, MANDATORY_ATTRIBUTE, MULTIPLE_ATTRIBUTE, NAME_ATTRIBUTE, NAMESPACE, NODETYPE_ELEMENT, NODETYPES_ELEMENT, ONPARENTVERSION_ATTRIBUTE, PRIMARYITEMNAME_ATTRIBUTE, PROPERTYDEFINITION_ELEMENT, PROTECTED_ATTRIBUTE, REQUIREDPRIMARYTYPE_ELEMENT, REQUIREDPRIMARYTYPES_ELEMENT, REQUIREDTYPE_ATTRIBUTE, SAMENAMESIBLINGS_ATTRIBUTE, SUPERTYPE_ELEMENT, SUPERTYPES_ELEMENT, VALUECONSTRAINT_ELEMENT, VALUECONSTRAINTS_ELEMENT, XML_NODETYPE, XML_NODETYPENAME, XML_NODETYPES, XML_REPORT_ALLNODETYPES, XML_REPORT_MIXINNODETYPES, XML_REPORT_PRIMARYNODETYPES
 
Constructor Summary
QNodeTypeDefinitionImpl(Element ntdElement, NamePathResolver resolver, QValueFactory qValueFactory)
          Default constructor.
 
Method Summary
 boolean equals(Object obj)
           
 QNodeDefinition[] getChildNodeDefs()
          Returns an array containing the child node definitions.
 Collection getDependencies()
          Returns a collection of node type Names that are being referenced by this node type definition (e.g. as supertypes, as required/default primary types in child node definitions, as REFERENCE value constraints in property definitions).
 Name getName()
          Returns the name of the node type being defined or null if not set.
 Name getPrimaryItemName()
          Returns the name of the primary item (one of the child items of the node's of this node type) or null if not set.
 QPropertyDefinition[] getPropertyDefs()
          Returns an array containing the property definitions.
 Name[] getSupertypes()
          Returns an array containing the names of the supertypes.
 Name[] getSupportedMixinTypes()
          Returns an array containing the names of additional mixin types supported on this node type.
 int hashCode()
          Always returns 0
 boolean hasOrderableChildNodes()
          Returns the value of the orderableChildNodes flag.
 boolean isMixin()
          Returns the value of the mixin flag.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNodeTypeDefinitionImpl

public QNodeTypeDefinitionImpl(Element ntdElement,
                               NamePathResolver resolver,
                               QValueFactory qValueFactory)
                        throws RepositoryException
Default constructor.

Throws:
RepositoryException
Method Detail

getName

public Name getName()
Description copied from interface: QNodeTypeDefinition
Returns the name of the node type being defined or null if not set.

Specified by:
getName in interface QNodeTypeDefinition
Returns:
the name of the node type or null if not set.
See Also:
QNodeTypeDefinition.getName()

getSupertypes

public Name[] getSupertypes()
Description copied from interface: QNodeTypeDefinition
Returns an array containing the names of the supertypes. If no supertypes have been specified, then an empty array is returned for mixin types and the nt:base primary type and an array containing just nt:base for other primary types.

The returned array must not be modified by the application.

Specified by:
getSupertypes in interface QNodeTypeDefinition
Returns:
an array of supertype names
See Also:
QNodeTypeDefinition.getSupertypes()

getSupportedMixinTypes

public Name[] getSupportedMixinTypes()
Description copied from interface: QNodeTypeDefinition
Returns an array containing the names of additional mixin types supported on this node type.

The returned array must not be modified by the application.

Specified by:
getSupportedMixinTypes in interface QNodeTypeDefinition
Returns:
null since no restrictions are known.
See Also:
QNodeTypeDefinition.getSupportedMixinTypes()

isMixin

public boolean isMixin()
Description copied from interface: QNodeTypeDefinition
Returns the value of the mixin flag.

Specified by:
isMixin in interface QNodeTypeDefinition
Returns:
true if this is a mixin node type; false otherwise.
See Also:
QNodeTypeDefinition.isMixin()

hasOrderableChildNodes

public boolean hasOrderableChildNodes()
Description copied from interface: QNodeTypeDefinition
Returns the value of the orderableChildNodes flag.

Specified by:
hasOrderableChildNodes in interface QNodeTypeDefinition
Returns:
true if nodes of this node type can have orderable child nodes; false otherwise.
See Also:
QNodeTypeDefinition.hasOrderableChildNodes()

getPrimaryItemName

public Name getPrimaryItemName()
Description copied from interface: QNodeTypeDefinition
Returns the name of the primary item (one of the child items of the node's of this node type) or null if not set.

Specified by:
getPrimaryItemName in interface QNodeTypeDefinition
Returns:
the name of the primary item or null if not set.
See Also:
QNodeTypeDefinition.getPrimaryItemName()

getPropertyDefs

public QPropertyDefinition[] getPropertyDefs()
Description copied from interface: QNodeTypeDefinition
Returns an array containing the property definitions.

Specified by:
getPropertyDefs in interface QNodeTypeDefinition
Returns:
an array containing the property definitions.
See Also:
QNodeTypeDefinition.getPropertyDefs()

getChildNodeDefs

public QNodeDefinition[] getChildNodeDefs()
Description copied from interface: QNodeTypeDefinition
Returns an array containing the child node definitions.

Specified by:
getChildNodeDefs in interface QNodeTypeDefinition
Returns:
an array containing the child node definitions.
See Also:
QNodeTypeDefinition.getChildNodeDefs()

getDependencies

public Collection getDependencies()
Description copied from interface: QNodeTypeDefinition
Returns a collection of node type Names that are being referenced by this node type definition (e.g. as supertypes, as required/default primary types in child node definitions, as REFERENCE value constraints in property definitions).

Note that self-references (e.g. a child node definition that specifies the declaring node type as the default primary type) are not considered dependencies.

Specified by:
getDependencies in interface QNodeTypeDefinition
Returns:
a collection of node type Names
See Also:
QNodeTypeDefinition.getDependencies()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Always returns 0

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


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