|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--org.drools.io.RuleSetReader
RuleSet
loader.
Field Summary | |
static java.lang.String |
RULES_NAMESPACE_URI
Namespace URI for the general tags. |
Constructor Summary | |
RuleSetReader()
Construct. |
|
RuleSetReader(javax.xml.parsers.SAXParser parser)
Construct. |
|
RuleSetReader(SemanticsRepository repo)
Construct. |
|
RuleSetReader(SemanticsRepository repo,
javax.xml.parsers.SAXParser parser)
Construct. |
Method Summary | |
void |
characters(char[] chars,
int start,
int len)
|
protected void |
endCondition(SemanticModule module,
java.lang.String localName)
End a condition. |
protected Configuration |
endConfiguration()
End a configuration node. |
protected void |
endConsequence(SemanticModule module,
java.lang.String localName)
End a consequence. |
protected void |
endDeclaration()
End a <declaration>. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname)
|
protected void |
endExtraction(SemanticModule module,
java.lang.String localName)
End an extraction. |
protected void |
endObjectType(SemanticModule module,
java.lang.String localName)
End object-type. |
protected void |
endParameter()
End a <parameter>. |
protected void |
endRule()
End a <rule>. |
protected void |
endRuleSet()
End a <rule-set>. |
org.xml.sax.Locator |
getLocator()
Get the Locator . |
RuleSet |
read(org.xml.sax.InputSource in)
Read a RuleSet from an InputSource . |
RuleSet |
read(java.io.InputStream inputStream)
Read a RuleSet from an InputStream . |
RuleSet |
read(java.io.Reader reader)
Read a RuleSet from a Reader . |
RuleSet |
read(java.lang.String url)
Read a RuleSet from a URL. |
RuleSet |
read(java.net.URL url)
Read a RuleSet from a URL . |
void |
setLocator(org.xml.sax.Locator locator)
|
protected void |
startCondition(SemanticModule module,
java.lang.String name,
org.xml.sax.Attributes attrs)
Start a condition. |
protected void |
startConfiguration(java.lang.String name,
org.xml.sax.Attributes attrs)
Start a configuration node. |
protected void |
startConsequence(SemanticModule module,
java.lang.String name,
org.xml.sax.Attributes attrs)
Start a consequence. |
protected void |
startDeclaration(org.xml.sax.Attributes attrs)
Start a <declaration>. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attrs)
|
protected void |
startExtraction(SemanticModule module,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Start an extraction. |
protected void |
startObjectType(SemanticModule module,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Start an object-type. |
protected void |
startParameter(org.xml.sax.Attributes attrs)
Start a <parameter>. |
protected void |
startRule(Rule rule,
org.xml.sax.Attributes attrs)
|
protected void |
startRule(SemanticModule module,
java.lang.String localName,
org.xml.sax.Attributes attrs)
|
protected void |
startRuleSet(org.xml.sax.Attributes attrs)
Start a <rule-set>. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String RULES_NAMESPACE_URI
Constructor Detail |
public RuleSetReader()
Uses the default JAXP SAX parser and the default classpath-based
DefaultSemanticModule
.
public RuleSetReader(javax.xml.parsers.SAXParser parser)
Uses the default classpath-based DefaultSemanticModule
.
parser
- The SAX parser.public RuleSetReader(SemanticsRepository repo, javax.xml.parsers.SAXParser parser)
repo
- The semantics repository.parser
- The SAX parser.public RuleSetReader(SemanticsRepository repo)
repo
- The semantics repository.Method Detail |
public RuleSet read(java.net.URL url) throws java.lang.Exception
RuleSet
from a URL
.
url
- The rule-set URL.
java.lang.Exception
- If an error occurs during the parse.public RuleSet read(java.io.Reader reader) throws java.lang.Exception
RuleSet
from a Reader
.
reader
- The reader containing the rule-set.
java.lang.Exception
- If an error occurs during the parse.public RuleSet read(java.io.InputStream inputStream) throws java.lang.Exception
RuleSet
from an InputStream
.
inputStream
- The input-stream containing the rule-set.
java.lang.Exception
- If an error occurs during the parse.public RuleSet read(java.lang.String url) throws java.lang.Exception
RuleSet
from a URL.
url
- The rule-set URL.
java.lang.Exception
- If an error occurs during the parse.public RuleSet read(org.xml.sax.InputSource in) throws java.lang.Exception
RuleSet
from an InputSource
.
in
- The rule-set input-source.
java.lang.Exception
- If an error occurs during the parse.public void setLocator(org.xml.sax.Locator locator)
ContentHandler
public org.xml.sax.Locator getLocator()
Locator
.
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
ContentHandler
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
ContentHandler
protected void startRuleSet(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endRuleSet() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startRule(SemanticModule module, java.lang.String localName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void startRule(Rule rule, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endRule() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startParameter(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endParameter() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startDeclaration(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endDeclaration() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startObjectType(SemanticModule module, java.lang.String localName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
localName
- Tag name.attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endObjectType(SemanticModule module, java.lang.String localName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startExtraction(SemanticModule module, java.lang.String localName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
module
- Semantic module.localName
- Tag name.attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endExtraction(SemanticModule module, java.lang.String localName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startCondition(SemanticModule module, java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
module
- Semantic module.name
- Tag name.attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endCondition(SemanticModule module, java.lang.String localName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startConsequence(SemanticModule module, java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
module
- Semantic module.name
- Tag name.attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.protected void endConsequence(SemanticModule module, java.lang.String localName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- If an error occurs during parse.protected void startConfiguration(java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
name
- Tag name.attrs
- Tag attributes.
org.xml.sax.SAXException
- If an error occurs during parse.public void characters(char[] chars, int start, int len) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
ContentHandler
protected Configuration endConfiguration()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |