|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.drools.io.RuleSetReader
public class RuleSetReader
RuleSet loader.
Note you can override the default entity resolver by setting the System property of:
org.drools.io.EntityResolve to your own custom entity resolver.
This can be done using -Dorg.drools.io.EntityResolver=YourClassHere on the command line, for instance.
| Field Summary | |
|---|---|
static java.lang.String |
ENTITY_RESOLVER_PROPERTY_NAME
|
static java.lang.String |
RULES_NAMESPACE_URI
Namespace URI for the general tags. |
| Constructor Summary | |
|---|---|
RuleSetReader()
Construct. |
|
RuleSetReader(RuleBaseContext factoryContext)
Construct. |
|
RuleSetReader(javax.xml.parsers.SAXParser parser)
Construct. |
|
RuleSetReader(javax.xml.parsers.SAXParser parser,
RuleBaseContext context)
Construct. |
|
RuleSetReader(javax.xml.parsers.SAXParser parser,
SemanticsRepository repo)
Construct. |
|
RuleSetReader(SemanticsRepository repo)
Construct. |
|
RuleSetReader(SemanticsRepository repo,
RuleBaseContext context)
Construct. |
|
RuleSetReader(SemanticsRepository repo,
javax.xml.parsers.SAXParser parser)
Construct. |
|
RuleSetReader(SemanticsRepository repo,
javax.xml.parsers.SAXParser parser,
RuleBaseContext context)
Construct. |
|
| Method Summary | |
|---|---|
void |
characters(char[] chars,
int start,
int len)
|
protected Configuration |
endConfiguration()
End a configuration node. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname)
|
void |
endPrefixMapping(java.lang.String prefix)
|
void |
error(org.xml.sax.SAXParseException x)
|
void |
fatalError(org.xml.sax.SAXParseException x)
|
RuleBaseContext |
getFactoryContext()
|
org.xml.sax.Locator |
getLocator()
Get the Locator. |
RuleSet |
getRuleSet()
|
SemanticsRepository |
getSemanticsRepository()
|
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. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
protected void |
startConfiguration(java.lang.String name,
org.xml.sax.Attributes attrs)
Start a configuration node. |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attrs)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
void |
warning(org.xml.sax.SAXParseException x)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, unparsedEntityDecl |
| 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 ENTITY_RESOLVER_PROPERTY_NAME
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)
repo - The semantics repository.public RuleSetReader(RuleBaseContext factoryContext)
factoryContext -
public RuleSetReader(SemanticsRepository repo,
javax.xml.parsers.SAXParser parser)
repo - The semantics repository.parser - The SAX parser.
public RuleSetReader(SemanticsRepository repo,
RuleBaseContext context)
repo - The semantics repository.
public RuleSetReader(javax.xml.parsers.SAXParser parser,
SemanticsRepository repo)
parser - repo - The semantics repository.
public RuleSetReader(javax.xml.parsers.SAXParser parser,
RuleBaseContext context)
parser - context -
public RuleSetReader(SemanticsRepository repo,
javax.xml.parsers.SAXParser parser,
RuleBaseContext context)
repo - The semantics repository.parser - The SAX parser.| Method Detail |
|---|
public RuleSet read(java.net.URL url)
throws org.xml.sax.SAXException,
java.io.IOException
RuleSet from a URL.
url - The rule-set URL.
org.xml.sax.SAXException
java.io.IOException
public RuleSet read(java.io.Reader reader)
throws org.xml.sax.SAXException,
java.io.IOException
RuleSet from a Reader.
reader - The reader containing the rule-set.
org.xml.sax.SAXException
java.io.IOException
public RuleSet read(java.io.InputStream inputStream)
throws org.xml.sax.SAXException,
java.io.IOException
RuleSet from an InputStream.
inputStream - The input-stream containing the rule-set.
org.xml.sax.SAXException
java.io.IOException
public RuleSet read(java.lang.String url)
throws org.xml.sax.SAXException,
java.io.IOException
RuleSet from a URL.
url - The rule-set URL.
org.xml.sax.SAXException
java.io.IOException
public RuleSet read(org.xml.sax.InputSource in)
throws org.xml.sax.SAXException,
java.io.IOException
RuleSet from an InputSource.
in - The rule-set input-source.
org.xml.sax.SAXException
java.io.IOExceptionpublic SemanticsRepository getSemanticsRepository()
public RuleSet getRuleSet()
public RuleBaseContext getFactoryContext()
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerContentHandlerpublic org.xml.sax.Locator getLocator()
Locator.
public void startDocument()
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandler
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.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - localName - qname - attrs -
org.xml.sax.SAXExceptionContentHandler
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.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - localName - qname -
org.xml.sax.SAXExceptionContentHandler
protected void startConfiguration(java.lang.String name,
org.xml.sax.Attributes attrs)
name - Tag name.attrs - Tag attributes.
public void characters(char[] chars,
int start,
int len)
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerchars - start - len - ContentHandlerprotected Configuration endConfiguration()
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerendPrefixMapping in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void warning(org.xml.sax.SAXParseException x)
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlerpublic void error(org.xml.sax.SAXParseException x)
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandler
public void fatalError(org.xml.sax.SAXParseException x)
throws org.xml.sax.SAXParseException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||