Class FromXmlRulesModule
- java.lang.Object
-
- org.apache.commons.digester3.binder.AbstractRulesModule
-
- org.apache.commons.digester3.xmlrules.FromXmlRulesModule
-
- All Implemented Interfaces:
RulesModule
public abstract class FromXmlRulesModule extends AbstractRulesModule
RulesModule
implementation that allows loading rules from XML files.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
DIGESTER_DTD_PATH
private static java.lang.String
DIGESTER_PUBLIC_ID
private java.util.List<org.xml.sax.InputSource>
inputSource
private java.lang.String
rootPath
private java.util.Set<java.lang.String>
systemIds
private java.net.URL
xmlRulesDtdUrl
-
Constructor Summary
Constructors Constructor Description FromXmlRulesModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
configure()
Configures aRulesBinder
via the exposed methods.java.util.Set<java.lang.String>
getSystemIds()
Returns the XML source SystemIds load by this module.protected abstract void
loadRules()
protected void
loadXMLRules(java.io.File file)
Opens a neworg.xml.sax.InputSource
given ajava.io.File
.protected void
loadXMLRules(java.io.InputStream input)
Opens a neworg.xml.sax.InputSource
given ajava.io.InputStream
.protected void
loadXMLRules(java.io.Reader reader)
Opens a neworg.xml.sax.InputSource
given ajava.io.Reader
.protected void
loadXMLRules(java.lang.String uri)
Opens a neworg.xml.sax.InputSource
given a URI in String representation.protected void
loadXMLRules(java.net.URL url)
Opens a neworg.xml.sax.InputSource
given ajava.net.URL
.protected void
loadXMLRules(org.xml.sax.InputSource inputSource)
Reads the XML rules from the givenorg.xml.sax.InputSource
.protected void
loadXMLRulesFromText(java.lang.String xmlText)
Opens a neworg.xml.sax.InputSource
given an XML document in textual form.protected void
useRootPath(java.lang.String rootPath)
Set the root path (will be used when composing modules).-
Methods inherited from class org.apache.commons.digester3.binder.AbstractRulesModule
addError, addError, configure, forPattern, install, rulesBinder
-
-
-
-
Field Detail
-
DIGESTER_PUBLIC_ID
private static final java.lang.String DIGESTER_PUBLIC_ID
- See Also:
- Constant Field Values
-
DIGESTER_DTD_PATH
private static final java.lang.String DIGESTER_DTD_PATH
- See Also:
- Constant Field Values
-
xmlRulesDtdUrl
private final java.net.URL xmlRulesDtdUrl
-
inputSource
private final java.util.List<org.xml.sax.InputSource> inputSource
-
systemIds
private final java.util.Set<java.lang.String> systemIds
-
rootPath
private java.lang.String rootPath
-
-
Method Detail
-
configure
protected void configure()
Configures aRulesBinder
via the exposed methods.- Specified by:
configure
in classAbstractRulesModule
-
loadRules
protected abstract void loadRules()
-
loadXMLRules
protected final void loadXMLRules(org.xml.sax.InputSource inputSource)
Reads the XML rules from the givenorg.xml.sax.InputSource
.- Parameters:
inputSource
- Theorg.xml.sax.InputSource
where reading the XML rules from.
-
loadXMLRules
protected final void loadXMLRules(java.io.InputStream input)
Opens a neworg.xml.sax.InputSource
given ajava.io.InputStream
.- Parameters:
input
- Thejava.io.InputStream
where reading the XML rules from.
-
loadXMLRules
protected final void loadXMLRules(java.io.Reader reader)
Opens a neworg.xml.sax.InputSource
given ajava.io.Reader
.- Parameters:
reader
- Thejava.io.Reader
where reading the XML rules from.
-
loadXMLRules
protected final void loadXMLRules(java.io.File file)
Opens a neworg.xml.sax.InputSource
given ajava.io.File
.- Parameters:
file
- Thejava.io.File
where reading the XML rules from.
-
loadXMLRules
protected final void loadXMLRules(java.lang.String uri)
Opens a neworg.xml.sax.InputSource
given a URI in String representation.- Parameters:
uri
- The URI in String representation where reading the XML rules from.
-
loadXMLRules
protected final void loadXMLRules(java.net.URL url)
Opens a neworg.xml.sax.InputSource
given ajava.net.URL
.- Parameters:
url
- Thejava.net.URL
where reading the XML rules from.
-
loadXMLRulesFromText
protected final void loadXMLRulesFromText(java.lang.String xmlText)
Opens a neworg.xml.sax.InputSource
given an XML document in textual form.- Parameters:
xmlText
- The XML document in textual form where reading the XML rules from.
-
useRootPath
protected final void useRootPath(java.lang.String rootPath)
Set the root path (will be used when composing modules).- Parameters:
rootPath
- The root path
-
getSystemIds
public final java.util.Set<java.lang.String> getSystemIds()
Returns the XML source SystemIds load by this module.- Returns:
- The XML source SystemIds load by this module
-
-