public class QNodeTypeDefinitionImpl extends Object implements QNodeTypeDefinition, Serializable
QNodeTypeDefinitionImpl implements a serializable SPI node
type definition.| Constructor and Description |
|---|
QNodeTypeDefinitionImpl()
Default constructor.
|
QNodeTypeDefinitionImpl(Name name,
Name[] supertypes,
Name[] supportedMixins,
boolean isMixin,
boolean isAbstract,
boolean isQueryable,
boolean hasOrderableChildNodes,
Name primaryItemName,
QPropertyDefinition[] declaredPropDefs,
QNodeDefinition[] declaredNodeDefs)
Creates a new serializable SPI node type definition.
|
QNodeTypeDefinitionImpl(NodeTypeDefinition def,
NamePathResolver resolver,
QValueFactory qValueFactory)
Create a a new
QNodeTypeDefinitionImpl from a JCR
NodeType definition. |
QNodeTypeDefinitionImpl(QNodeTypeDefinition nt)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
QNodeDefinition[] |
getChildNodeDefs()
Returns an array containing the child node definitions.
|
Collection<Name> |
getDependencies()
Returns a collection of node type
Names that are being
referenced by this node type definition (e.g. |
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()
Returns zero to satisfy the Object equals/hashCode contract.
|
boolean |
hasOrderableChildNodes()
Returns the value of the orderableChildNodes flag.
|
boolean |
isAbstract()
Returns
true if the definition is abstract; false otherwise. |
boolean |
isMixin()
Returns the value of the mixin flag.
|
boolean |
isQueryable()
Returns
true if the definition is queryable; false otherwise. |
public QNodeTypeDefinitionImpl()
public QNodeTypeDefinitionImpl(QNodeTypeDefinition nt)
nt - the node type definition.public QNodeTypeDefinitionImpl(Name name, Name[] supertypes, Name[] supportedMixins, boolean isMixin, boolean isAbstract, boolean isQueryable, boolean hasOrderableChildNodes, Name primaryItemName, QPropertyDefinition[] declaredPropDefs, QNodeDefinition[] declaredNodeDefs)
name - the name of the node typesupertypes - the names of the supertypessupportedMixins - the names of supported mixins (or null)isMixin - if this is a mixin node typeisAbstract - if this is an abstract node type definition.isQueryable - if this is a queryable node type definition.hasOrderableChildNodes - if this node type has orderable child
nodes.primaryItemName - the name of the primary item, or
null.declaredPropDefs - the declared property definitions.declaredNodeDefs - the declared child node definitions.public QNodeTypeDefinitionImpl(NodeTypeDefinition def, NamePathResolver resolver, QValueFactory qValueFactory) throws RepositoryException
QNodeTypeDefinitionImpl from a JCR
NodeType definition.def - node type definitionresolver - resolverqValueFactory - value factoryRepositoryException - if an error occurspublic Name getName()
null if not set.getName in interface QNodeTypeDefinitionnull if not set.public Name[] getSupertypes()
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.
getSupertypes in interface QNodeTypeDefinitionpublic boolean isMixin()
isMixin in interface QNodeTypeDefinitionpublic boolean isAbstract()
true if the definition is abstract; false otherwise.isAbstract in interface QNodeTypeDefinitiontrue if the definition is abstract; false otherwise.public boolean isQueryable()
true if the definition is queryable; false otherwise.isQueryable in interface QNodeTypeDefinitiontrue if the definition is queryable; false otherwise.public boolean hasOrderableChildNodes()
hasOrderableChildNodes in interface QNodeTypeDefinitionpublic Name getPrimaryItemName()
null if not set.getPrimaryItemName in interface QNodeTypeDefinitionnull if not set.public QPropertyDefinition[] getPropertyDefs()
getPropertyDefs in interface QNodeTypeDefinitionpublic QNodeDefinition[] getChildNodeDefs()
getChildNodeDefs in interface QNodeTypeDefinitionpublic Collection<Name> getDependencies()
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.
getDependencies in interface QNodeTypeDefinitionNamespublic Name[] getSupportedMixinTypes()
The returned array must not be modified by the application.
getSupportedMixinTypes in interface QNodeTypeDefinitionnull
when there are no known constraints.public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.