|
||||||||||
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.xml.XmlPackageReader
public class XmlPackageReader
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 String |
ENTITY_RESOLVER_PROPERTY_NAME
|
static String |
RULES_NAMESPACE_URI
Namespace URI for the general tags. |
Constructor Summary | |
---|---|
XmlPackageReader()
Construct. |
|
XmlPackageReader(SAXParser parser)
Construct. |
Method Summary | |
---|---|
void |
characters(char[] chars,
int start,
int len)
|
protected Configuration |
endConfiguration()
End a configuration node. |
void |
endElement(String uri,
String localName,
String qname)
|
void |
endPrefixMapping(String prefix)
|
void |
error(SAXParseException x)
|
void |
fatalError(SAXParseException x)
|
Locator |
getLocator()
Get the Locator . |
PackageDescr |
getPackageDescr()
|
PackageDescr |
read(InputSource in)
Read a RuleSet from an InputSource . |
PackageDescr |
read(InputStream inputStream)
Read a RuleSet from an InputStream . |
PackageDescr |
read(Reader reader)
Read a RuleSet from a Reader . |
InputSource |
resolveEntity(String publicId,
String systemId)
|
void |
setDocumentLocator(Locator locator)
|
protected void |
startConfiguration(String name,
Attributes attrs)
Start a configuration node. |
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qname,
Attributes attrs)
|
void |
startPrefixMapping(String prefix,
String uri)
|
void |
warning(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 String ENTITY_RESOLVER_PROPERTY_NAME
public static final String RULES_NAMESPACE_URI
Constructor Detail |
---|
public XmlPackageReader()
Uses the default JAXP SAX parser and the default classpath-based
DefaultSemanticModule
.
public XmlPackageReader(SAXParser parser)
Uses the default classpath-based DefaultSemanticModule
.
parser
- The SAX parser.Method Detail |
---|
public PackageDescr read(Reader reader) throws SAXException, IOException
RuleSet
from a Reader
.
reader
- The reader containing the rule-set.
SAXException
IOException
public PackageDescr read(InputStream inputStream) throws SAXException, IOException
RuleSet
from an InputStream
.
inputStream
- The input-stream containing the rule-set.
SAXException
IOException
public PackageDescr read(InputSource in) throws SAXException, IOException
RuleSet
from an InputSource
.
in
- The rule-set input-source.
SAXException
IOException
public PackageDescr getPackageDescr()
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
ContentHandler
public Locator getLocator()
Locator
.
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
public void startElement(String uri, String localName, String qname, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
uri
- localName
- qname
- attrs
-
SAXException
ContentHandler
public void endElement(String uri, String localName, String qname) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
uri
- localName
- qname
-
SAXException
ContentHandler
protected void startConfiguration(String name, Attributes attrs)
name
- Tag name.attrs
- Tag attributes.public void characters(char[] chars, int start, int len)
characters
in interface ContentHandler
characters
in class DefaultHandler
chars
- start
- len
- ContentHandler
protected Configuration endConfiguration()
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class DefaultHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class DefaultHandler
SAXException
public void warning(SAXParseException x)
warning
in interface ErrorHandler
warning
in class DefaultHandler
public void error(SAXParseException x)
error
in interface ErrorHandler
error
in class DefaultHandler
public void fatalError(SAXParseException x) throws SAXParseException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |