Class NodeCreateRuleProvider

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NodeCreateRuleProvider.NodeType
      Enumeration that wraps admitted Node node constants.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected NodeCreateRule createRule()
      Provides an instance of Rule.
      R get()
      Provides an instance of Rule.
      java.lang.String getNamespaceURI()
      Returns the namespace URI for which this Rule is relevant, if any.
      java.lang.String getPattern()
      Returns the rule pattern associated to this builder.
      NodeCreateRuleProvider ofType​(NodeCreateRuleProvider.NodeType nodeType)
      NodeCreateRule instance will be created either a DOM Element or a DOM DocumentFragment, depending on the value of the nodeType parameter.
      protected void reportError​(java.lang.String methodChain, java.lang.String message)  
      LinkedRuleBuilder then()
      Come back to the main LinkedRuleBuilder.
      NodeCreateRuleProvider usingDocumentBuilder​(javax.xml.parsers.DocumentBuilder documentBuilder)
      NodeCreateRule instance will be created a DOM Element, but lets users specify the JAXP DocumentBuilder that should be used when constructing the node tree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • ofType

        public NodeCreateRuleProvider ofType​(NodeCreateRuleProvider.NodeType nodeType)
        NodeCreateRule instance will be created either a DOM Element or a DOM DocumentFragment, depending on the value of the nodeType parameter.
        Parameters:
        nodeType - the type of node to create, which can be either Node.ELEMENT_NODE or Node.DOCUMENT_FRAGMENT_NODE
        Returns:
        this builder instance
      • usingDocumentBuilder

        public NodeCreateRuleProvider usingDocumentBuilder​(javax.xml.parsers.DocumentBuilder documentBuilder)
        NodeCreateRule instance will be created a DOM Element, but lets users specify the JAXP DocumentBuilder that should be used when constructing the node tree.
        Parameters:
        documentBuilder - the JAXP DocumentBuilder to use
        Returns:
        this builder instance
      • getNamespaceURI

        public final java.lang.String getNamespaceURI()
        Returns the namespace URI for which this Rule is relevant, if any.
        Returns:
        The namespace URI for which this Rule is relevant, if any
      • get

        public final R get()
        Provides an instance of Rule. Must never return null.
        Specified by:
        get in interface RuleProvider<R extends Rule>
        Returns:
        an instance of Rule.
      • reportError

        protected final void reportError​(java.lang.String methodChain,
                                         java.lang.String message)
      • getPattern

        public final java.lang.String getPattern()
        Returns the rule pattern associated to this builder.
        Returns:
        The rule pattern associated to this builder