org.apache.jackrabbit.core.nodetype
Class NodeTypeDefinitionImpl

java.lang.Object
  extended by org.apache.jackrabbit.core.nodetype.NodeTypeDefinitionImpl
All Implemented Interfaces:
NodeTypeDefinition

public class NodeTypeDefinitionImpl
extends Object
implements NodeTypeDefinition

This class implements the NodeTypeDefinition interface. All method calls are delegated to the wrapped QNodeTypeDefinition, performing the translation from Names to JCR names (and vice versa) where necessary.


Constructor Summary
NodeTypeDefinitionImpl(QNodeTypeDefinition ntd, NamePathResolver resolver, ValueFactory valueFactory)
           
 
Method Summary
 NodeDefinition[] getDeclaredChildNodeDefinitions()
          
 PropertyDefinition[] getDeclaredPropertyDefinitions()
          
 String[] getDeclaredSupertypeNames()
          Returns the names of the supertypes actually declared in this node type.
 String getName()
          
 String getPrimaryItemName()
          
 boolean hasOrderableChildNodes()
          
 boolean isAbstract()
          Returns true if this is an abstract node type; returns false otherwise.
 boolean isMixin()
          
 boolean isQueryable()
          Returns true if the node type is queryable, meaning that the available-query-operators, full-text-searchable and query-orderable attributes of its property definitions take effect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeTypeDefinitionImpl

public NodeTypeDefinitionImpl(QNodeTypeDefinition ntd,
                              NamePathResolver resolver,
                              ValueFactory valueFactory)
Method Detail

getName

public String getName()

Specified by:
getName in interface NodeTypeDefinition

getDeclaredSupertypeNames

public String[] getDeclaredSupertypeNames()
Returns the names of the supertypes actually declared in this node type.

In implementations that support node type registration, if this NodeTypeDefinition object is actually a newly-created empty NodeTypeTemplate, then this method will return an array containing a single string indicating the node type nt:base.

Specified by:
getDeclaredSupertypeNames in interface NodeTypeDefinition
Returns:
an array of Strings
Since:
JCR 2.0

isAbstract

public boolean isAbstract()
Returns true if this is an abstract node type; returns false otherwise.

An abstract node type is one that cannot be assigned as the primary or mixin type of a node but can be used in the definitions of other node types as a superclass.

In implementations that support node type registration, if this NodeTypeDefinition object is actually a newly-created empty NodeTypeTemplate, then this method will return false.

Specified by:
isAbstract in interface NodeTypeDefinition
Returns:
a boolean
Since:
JCR 2.0

isQueryable

public boolean isQueryable()
Returns true if the node type is queryable, meaning that the available-query-operators, full-text-searchable and query-orderable attributes of its property definitions take effect. See PropertyDefinition.getAvailableQueryOperators(), PropertyDefinition.isFullTextSearchable() and PropertyDefinition.isQueryOrderable().

If a node type is declared non-queryable then these attributes of its property definitions have no effect.

Specified by:
isQueryable in interface NodeTypeDefinition
Returns:
a boolean
Since:
JCR 2.0

isMixin

public boolean isMixin()

Specified by:
isMixin in interface NodeTypeDefinition

hasOrderableChildNodes

public boolean hasOrderableChildNodes()

Specified by:
hasOrderableChildNodes in interface NodeTypeDefinition

getPrimaryItemName

public String getPrimaryItemName()

Specified by:
getPrimaryItemName in interface NodeTypeDefinition

getDeclaredChildNodeDefinitions

public NodeDefinition[] getDeclaredChildNodeDefinitions()

Specified by:
getDeclaredChildNodeDefinitions in interface NodeTypeDefinition

getDeclaredPropertyDefinitions

public PropertyDefinition[] getDeclaredPropertyDefinitions()

Specified by:
getDeclaredPropertyDefinitions in interface NodeTypeDefinition


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