Class NodeCreateRuleProvider
java.lang.Object
org.apache.commons.digester3.binder.NodeCreateRuleProvider
- All Implemented Interfaces:
RuleProvider<NodeCreateRule>
Builder chained when invoking
LinkedRuleBuilder.createNode().- Since:
- 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration that wraps admittedNodenode constants. -
Method Summary
Modifier and TypeMethodDescriptionprotected NodeCreateRuleProvides an instance ofRule.final NodeCreateRuleget()Provides an instance ofRule.final StringReturns the namespace URI for which this Rule is relevant, if any.final StringReturns the rule pattern associated to this builder.ofType(NodeCreateRuleProvider.NodeType nodeType) NodeCreateRuleinstance will be created either a DOMElementor a DOMDocumentFragment, depending on the value of thenodeTypeparameter.protected final voidreportError(String methodChain, String message) final LinkedRuleBuilderthen()Come back to the mainLinkedRuleBuilder.usingDocumentBuilder(DocumentBuilder documentBuilder) NodeCreateRuleinstance will be created a DOMElement, but lets users specify the JAXPDocumentBuilderthat should be used when constructing the node tree.
-
Method Details
-
ofType
NodeCreateRuleinstance will be created either a DOMElementor a DOMDocumentFragment, depending on the value of thenodeTypeparameter.- Parameters:
nodeType- the type of node to create, which can be eitherNode.ELEMENT_NODEorNode.DOCUMENT_FRAGMENT_NODE- Returns:
- this builder instance
-
usingDocumentBuilder
NodeCreateRuleinstance will be created a DOMElement, but lets users specify the JAXPDocumentBuilderthat should be used when constructing the node tree.- Parameters:
documentBuilder- the JAXPDocumentBuilderto use- Returns:
- this builder instance
-
createRule
-
then
Come back to the mainLinkedRuleBuilder.- Returns:
- the main
LinkedRuleBuilder
-
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
Provides an instance ofRule. Must never return null.- Specified by:
getin interfaceRuleProvider<R extends Rule>- Returns:
- an instance of
Rule.
-
reportError
-
getPattern
Returns the rule pattern associated to this builder.- Returns:
- The rule pattern associated to this builder
-