Class NodeCreateRuleProvider
- java.lang.Object
-
- org.apache.commons.digester3.binder.NodeCreateRuleProvider
-
- All Implemented Interfaces:
RuleProvider<NodeCreateRule>
public final class NodeCreateRuleProvider extends java.lang.Object
Builder chained when invokingLinkedRuleBuilder.createNode().- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeCreateRuleProvider.NodeTypeEnumeration that wraps admittedNodenode constants.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NodeCreateRulecreateRule()Provides an instance ofRule.Rget()Provides an instance ofRule.java.lang.StringgetNamespaceURI()Returns the namespace URI for which this Rule is relevant, if any.java.lang.StringgetPattern()Returns the rule pattern associated to this builder.NodeCreateRuleProviderofType(NodeCreateRuleProvider.NodeType nodeType)NodeCreateRuleinstance will be created either a DOMElementor a DOMDocumentFragment, depending on the value of thenodeTypeparameter.protected voidreportError(java.lang.String methodChain, java.lang.String message)LinkedRuleBuilderthen()Come back to the mainLinkedRuleBuilder.NodeCreateRuleProviderusingDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)NodeCreateRuleinstance will be created a DOMElement, but lets users specify the JAXPDocumentBuilderthat should be used when constructing the node tree.
-
-
-
Method Detail
-
ofType
public NodeCreateRuleProvider ofType(NodeCreateRuleProvider.NodeType nodeType)
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
public NodeCreateRuleProvider usingDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
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
protected NodeCreateRule createRule()
Provides an instance ofRule. Must never return null.- Returns:
- an instance of
Rule. - See Also:
RuleProvider.get()
-
then
public final LinkedRuleBuilder then()
Come back to the mainLinkedRuleBuilder.- Returns:
- the main
LinkedRuleBuilder
-
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 ofRule. Must never return null.- Specified by:
getin interfaceRuleProvider<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
-
-