Class QNodeTypeDefinitionImpl

    • Constructor Detail

      • QNodeTypeDefinitionImpl

        public QNodeTypeDefinitionImpl()
        Default constructor.
      • QNodeTypeDefinitionImpl

        public QNodeTypeDefinitionImpl​(QNodeTypeDefinition nt)
        Copy constructor.
        Parameters:
        nt - the node type definition.
      • QNodeTypeDefinitionImpl

        public 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.
        Parameters:
        name - the name of the node type
        supertypes - the names of the supertypes
        supportedMixins - the names of supported mixins (or null)
        isMixin - if this is a mixin node type
        isAbstract - 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.
    • Method Detail

      • getName

        public Name getName()
        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.
      • getSupertypes

        public Name[] getSupertypes()
        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
      • isMixin

        public boolean isMixin()
        Returns the value of the mixin flag.
        Specified by:
        isMixin in interface QNodeTypeDefinition
        Returns:
        true if this is a mixin node type; false otherwise.
      • isAbstract

        public boolean isAbstract()
        Returns true if the definition is abstract; false otherwise.
        Specified by:
        isAbstract in interface QNodeTypeDefinition
        Returns:
        true if the definition is abstract; false otherwise.
      • isQueryable

        public boolean isQueryable()
        Returns true if the definition is queryable; false otherwise.
        Specified by:
        isQueryable in interface QNodeTypeDefinition
        Returns:
        true if the definition is queryable; false otherwise.
      • hasOrderableChildNodes

        public boolean hasOrderableChildNodes()
        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.
      • getPrimaryItemName

        public 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.
        Specified by:
        getPrimaryItemName in interface QNodeTypeDefinition
        Returns:
        the name of the primary item or null if not set.
      • getDependencies

        public Collection<Name> 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).

        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
      • getSupportedMixinTypes

        public Name[] getSupportedMixinTypes()
        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:
        an array of mixin type names, or null when there are no known constraints.
      • hashCode

        public int hashCode()
        Returns zero to satisfy the Object equals/hashCode contract. This class is mutable and not meant to be used as a hash key.
        Overrides:
        hashCode in class Object
        Returns:
        always zero
        See Also:
        Object.hashCode()