Class QNodeTypeDefinitionBuilder


  • public class QNodeTypeDefinitionBuilder
    extends java.lang.Object
    A builder for QNodeTypeDefinition.
    • Constructor Detail

      • QNodeTypeDefinitionBuilder

        public QNodeTypeDefinitionBuilder()
    • Method Detail

      • setName

        public void setName​(Name name)
        Set the name of the node type definition being built
        Parameters:
        name - the name
        See Also:
        NodeTypeDefinition.getName()
      • getName

        public Name getName()
        Returns:
        the name of the node type definition being built or null if not set.
        See Also:
        NodeTypeDefinition.getName()
      • setSupertypes

        public void setSupertypes​(Name[] supertypes)
        Specifies the supertypes of the node type definition being built
        Parameters:
        supertypes - the supertypes
        See Also:
        NodeTypeDefinition.getDeclaredSupertypeNames()
      • getSuperTypes

        public Name[] getSuperTypes()
        Returns an array containing the names of the supertypes of the node type definition being built.
        Returns:
        an array of supertype names
        See Also:
        NodeTypeDefinition.getDeclaredSupertypeNames()
      • setMixin

        public void setMixin​(boolean isMixin)
        Parameters:
        isMixin - true if building a mixin node type definition; false otherwise.
        See Also:
        NodeTypeDefinition.isMixin()
      • isMixin

        public boolean isMixin()
        Returns:
        true if building a mixin node type definition; false otherwise.
        See Also:
        NodeTypeDefinition.isMixin()
      • setSupportedMixinTypes

        public void setSupportedMixinTypes​(Name[] names)
        Sets the names of additional mixin types supported on this node type.
        Parameters:
        names - an array of mixin type names, or null when there are no known constraints
      • getSupportedMixinTypes

        public Name[] getSupportedMixinTypes()
        Returns an array containing the names of additional mixin types supported on this node type.
        Returns:
        an array of mixin type names, or null when there are no known constraints.
      • setOrderableChildNodes

        public void setOrderableChildNodes​(boolean isOrderable)
        Parameters:
        isOrderable - true if building a node type having orderable child nodes; false otherwise.
        See Also:
        NodeTypeDefinition.hasOrderableChildNodes()
      • hasOrderableChildNodes

        public boolean hasOrderableChildNodes()
        Returns:
        true if building a node type having orderable child nodes; false otherwise.
        See Also:
        NodeTypeDefinition.hasOrderableChildNodes()
      • setPrimaryItemName

        public void setPrimaryItemName​(Name primaryItemName)
        Parameters:
        primaryItemName - the name of the primary item or null if not set.
        See Also:
        NodeTypeDefinition.getPrimaryItemName()
      • getPrimaryItemName

        public Name getPrimaryItemName()
        Returns:
        the name of the primary item or null if not set.
        See Also:
        NodeTypeDefinition.getPrimaryItemName()
      • isAbstract

        public boolean isAbstract()
        Returns:
        true if the node type is abstract.
        See Also:
        NodeTypeDefinition.isAbstract()
      • setAbstract

        public void setAbstract​(boolean isAbstract)
        Parameters:
        isAbstract - true if building a node type that is abstract.
        See Also:
        NodeTypeDefinition.isAbstract()
      • isQueryable

        public boolean isQueryable()
        Returns:
        true if the node type is queryable
        See Also:
        NodeTypeDefinition.isQueryable()
      • setQueryable

        public void setQueryable​(boolean queryable)
        Parameters:
        queryable - true if building a node type that is queryable
        See Also:
        NodeTypeDefinition.isQueryable()
      • setPropertyDefs

        public void setPropertyDefs​(QPropertyDefinition[] propDefs)
        Parameters:
        propDefs - an array containing the property definitions of the node type definition being built.
        See Also:
        NodeTypeDefinition.getDeclaredPropertyDefinitions()
      • getPropertyDefs

        public QPropertyDefinition[] getPropertyDefs()
        Returns:
        an array containing the property definitions of the node type definition being built.
        See Also:
        NodeTypeDefinition.getDeclaredPropertyDefinitions()
      • setChildNodeDefs

        public void setChildNodeDefs​(QNodeDefinition[] childDefs)
        Parameters:
        childDefs - an array containing the child node definitions of the node type definition being.
        See Also:
        NodeTypeDefinition.getDeclaredChildNodeDefinitions()
      • getChildNodeDefs

        public QNodeDefinition[] getChildNodeDefs()
        Returns:
        an array containing the child node definitions of the node type definition being built.
        See Also:
        NodeTypeDefinition.getDeclaredChildNodeDefinitions()
      • build

        public QNodeTypeDefinition build()
                                  throws java.lang.IllegalStateException
        Creates a new QNodeTypeDefinition instance based on the state of this builder.
        Returns:
        a new QNodeTypeDefinition instance.
        Throws:
        java.lang.IllegalStateException - if the instance has not the necessary information to build the QNodeTypeDefinition instance.