public class ExtensibleXmlParser extends DefaultHandler
RuleSet loader.
Note you can override the default entity resolver by setting the System property of:
org.kie.api.io.EntityResolve to your own custom entity resolver.
This can be done using -Dorg.drools.io.EntityResolver=YourClassHere on the command line, for instance.| Modifier and Type | Class and Description |
|---|---|
static class |
ExtensibleXmlParser.Null |
| Modifier and Type | Field and Description |
|---|---|
static String |
ENTITY_RESOLVER_PROPERTY_NAME |
protected static org.slf4j.Logger |
logger |
static String |
RULES_NAMESPACE_URI
Namespace URI for the general tags.
|
| Constructor and Description |
|---|
ExtensibleXmlParser()
Construct.
|
ExtensibleXmlParser(SAXParser parser)
Construct.
|
endDocument, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, unparsedEntityDeclprotected static final transient org.slf4j.Logger logger
public static final String ENTITY_RESOLVER_PROPERTY_NAME
public static final String RULES_NAMESPACE_URI
public ExtensibleXmlParser()
Uses the default JAXP SAX parser and the default classpath-based
DefaultSemanticModule.
public ExtensibleXmlParser(SAXParser parser)
Uses the default classpath-based DefaultSemanticModule.
parser - The SAX parser.public void setSemanticModules(SemanticModules modules)
public Object read(Reader reader) throws SAXException, IOException
RuleSet from a Reader.reader - The reader containing the rule-set.ParserConfigurationExceptionSAXExceptionIOExceptionpublic Object read(InputStream inputStream) throws SAXException, IOException
RuleSet from an InputStream.inputStream - The input-stream containing the rule-set.ParserConfigurationExceptionSAXExceptionIOExceptionpublic Object read(InputSource in) throws SAXException, IOException
RuleSet from an InputSource.in - The rule-set input-source.ParserConfigurationExceptionSAXExceptionIOExceptionpublic void setData(Object data)
public Object getData()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public Map getMetaData()
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class DefaultHandlerContentHandlerpublic Locator getLocator()
Locator.public void startDocument()
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerpublic void startElement(String uri, String localName, String qname, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandleruri - localName - qname - attrs - SAXExceptionContentHandlerpublic void endElement(String uri, String localName, String qname) throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandleruri - localName - qname - SAXExceptionContentHandlerpublic void startElementBuilder(String tagName, Attributes attrs)
tagName - Tag name.attrs - Tag attributes.public void characters(char[] chars,
int start,
int len)
characters in interface ContentHandlercharacters in class DefaultHandlerchars - start - len - ContentHandlerpublic Element endElementBuilder()
public Object getParent()
public SAXParser getParser()
public Object getParent(int index)
public Object removeParent()
public LinkedList getParents()
public Object getPeer()
public Object getCurrent()
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity in interface EntityResolverresolveEntity in class DefaultHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class DefaultHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class DefaultHandlerSAXExceptionprotected String buildPrintMessage(SAXParseException x)
public void warning(SAXParseException x)
warning in interface ErrorHandlerwarning in class DefaultHandlerpublic void error(SAXParseException x)
error in interface ErrorHandlererror in class DefaultHandlerpublic void fatalError(SAXParseException x) throws SAXParseException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXParseExceptionpublic int getTimeout()
public void setTimeout(int timeout)
timeout - public Attributes getAttrs()
public void setParser(SAXParser parser)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.