Class AbstractNodeType
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeType
-
- All Implemented Interfaces:
NodeType
,NodeTypeDefinition
- Direct Known Subclasses:
NodeTypeImpl
,NodeTypeImpl
public abstract class AbstractNodeType extends Object implements NodeType
AbstractNodeType
...
-
-
Field Summary
Fields Modifier and Type Field Description protected QNodeTypeDefinition
ntd
protected AbstractNodeTypeManager
ntMgr
protected NamePathResolver
resolver
-
Fields inherited from interface javax.jcr.nodetype.NodeType
MIX_CREATED, MIX_LANGUAGE, MIX_LAST_MODIFIED, MIX_LIFECYCLE, MIX_LOCKABLE, MIX_MIMETYPE, MIX_REFERENCEABLE, MIX_SHAREABLE, MIX_SIMPLE_VERSIONABLE, MIX_TITLE, MIX_VERSIONABLE, NT_ACTIVITY, NT_ADDRESS, NT_BASE, NT_CHILD_NODE_DEFINITION, NT_CONFIGURATION, NT_FILE, NT_FOLDER, NT_FROZEN_NODE, NT_HIERARCHY_NODE, NT_LINKED_FILE, NT_NODE_TYPE, NT_PROPERTY_DEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSION_HISTORY, NT_VERSIONED_CHILD
-
-
Constructor Summary
Constructors Constructor Description AbstractNodeType(QNodeTypeDefinition ntd, AbstractNodeTypeManager ntMgr, NamePathResolver resolver)
Create a newAbstractNodeType
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description NodeDefinition[]
getDeclaredChildNodeDefinitions()
PropertyDefinition[]
getDeclaredPropertyDefinitions()
NodeTypeIterator
getDeclaredSubtypes()
String[]
getDeclaredSupertypeNames()
NodeType[]
getDeclaredSupertypes()
QNodeTypeDefinition
getDefinition()
Returns the node type definition.String
getName()
String
getPrimaryItemName()
NodeTypeIterator
getSubtypes()
NodeTypeIterator
getSubtypes(boolean directOnly)
Returns the node types derived from this node type.boolean
isAbstract()
boolean
isMixin()
boolean
isNodeType(String nodeTypeName)
abstract boolean
isNodeType(Name nodeTypeName)
Test if this nodetype equals or is directly or indirectly derived from the node type with the specifiednodeTypeName
, without checking of a node type of that name really exists.boolean
isQueryable()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.nodetype.NodeType
canAddChildNode, canAddChildNode, canRemoveItem, canRemoveNode, canRemoveProperty, canSetProperty, canSetProperty, getChildNodeDefinitions, getPropertyDefinitions, getSupertypes
-
Methods inherited from interface javax.jcr.nodetype.NodeTypeDefinition
hasOrderableChildNodes
-
-
-
-
Field Detail
-
ntMgr
protected final AbstractNodeTypeManager ntMgr
-
ntd
protected final QNodeTypeDefinition ntd
-
resolver
protected final NamePathResolver resolver
-
-
Constructor Detail
-
AbstractNodeType
public AbstractNodeType(QNodeTypeDefinition ntd, AbstractNodeTypeManager ntMgr, NamePathResolver resolver)
Create a newAbstractNodeType
.- Parameters:
ntd
- the underlying node type definition.ntMgr
- the node type manager.resolver
- the name/path resolver of the session that created this node type instance.
-
-
Method Detail
-
getDefinition
public QNodeTypeDefinition getDefinition()
Returns the node type definition.- Returns:
- the internal node type definition.
-
getName
public String getName()
- Specified by:
getName
in interfaceNodeTypeDefinition
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceNodeTypeDefinition
-
isMixin
public boolean isMixin()
- Specified by:
isMixin
in interfaceNodeTypeDefinition
-
isQueryable
public boolean isQueryable()
- Specified by:
isQueryable
in interfaceNodeTypeDefinition
-
getDeclaredSupertypeNames
public String[] getDeclaredSupertypeNames()
- Specified by:
getDeclaredSupertypeNames
in interfaceNodeTypeDefinition
-
getDeclaredSupertypes
public NodeType[] getDeclaredSupertypes()
- Specified by:
getDeclaredSupertypes
in interfaceNodeType
-
getDeclaredSubtypes
public NodeTypeIterator getDeclaredSubtypes()
- Specified by:
getDeclaredSubtypes
in interfaceNodeType
- See Also:
NodeType.getDeclaredSubtypes()
-
getSubtypes
public NodeTypeIterator getSubtypes()
- Specified by:
getSubtypes
in interfaceNodeType
- See Also:
NodeType.getSubtypes()
-
getDeclaredChildNodeDefinitions
public NodeDefinition[] getDeclaredChildNodeDefinitions()
- Specified by:
getDeclaredChildNodeDefinitions
in interfaceNodeTypeDefinition
-
getPrimaryItemName
public String getPrimaryItemName()
- Specified by:
getPrimaryItemName
in interfaceNodeTypeDefinition
-
getDeclaredPropertyDefinitions
public PropertyDefinition[] getDeclaredPropertyDefinitions()
- Specified by:
getDeclaredPropertyDefinitions
in interfaceNodeTypeDefinition
- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
isNodeType
public boolean isNodeType(String nodeTypeName)
- Specified by:
isNodeType
in interfaceNodeType
-
isNodeType
public abstract boolean isNodeType(Name nodeTypeName)
Test if this nodetype equals or is directly or indirectly derived from the node type with the specifiednodeTypeName
, without checking of a node type of that name really exists.- Parameters:
nodeTypeName
- A node type name.- Returns:
- true if this node type represents the type with the given
nodeTypeName
or if it is directly or indirectly derived from it; otherwisefalse
. If no node type exists with the specified name this method will also returnfalse
.
-
getSubtypes
public NodeTypeIterator getSubtypes(boolean directOnly)
Returns the node types derived from this node type.- Parameters:
directOnly
- iftrue
only direct subtypes will be considered- Returns:
- an
NodeTypeIterator
. - See Also:
NodeType.getSubtypes()
,NodeType.getDeclaredSubtypes()
-
-