|
||||||||||
| 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.xml.ExtensibleXmlParser
public class ExtensibleXmlParser
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.
| Nested Class Summary | |
|---|---|
static class |
ExtensibleXmlParser.Null
|
| Field Summary | |
|---|---|
static String |
ENTITY_RESOLVER_PROPERTY_NAME
|
static String |
RULES_NAMESPACE_URI
Namespace URI for the general tags. |
| Constructor Summary | |
|---|---|
ExtensibleXmlParser()
Construct. |
|
ExtensibleXmlParser(SAXParser parser)
Construct. |
|
| Method Summary | |
|---|---|
void |
characters(char[] chars,
int start,
int len)
|
void |
endElement(String uri,
String localName,
String qname)
|
Element |
endElementBuilder()
End a configuration node. |
void |
endPrefixMapping(String prefix)
|
void |
error(SAXParseException x)
|
void |
fatalError(SAXParseException x)
|
ClassLoader |
getClassLoader()
|
Object |
getCurrent()
|
Object |
getData()
|
Locator |
getLocator()
Get the Locator. |
Map |
getMetaData()
|
Object |
getParent()
|
Object |
getParent(Class parent)
|
Object |
getParent(int index)
|
LinkedList |
getParents()
|
Object |
getPeer()
|
int |
getTimeout()
Timeout for retrieving remote resources |
Object |
read(InputSource in)
Read a RuleSet from an InputSource. |
Object |
read(InputStream inputStream)
Read a RuleSet from an InputStream. |
Object |
read(Reader reader)
Read a RuleSet from a Reader. |
Object |
removeParent()
|
InputSource |
resolveEntity(String publicId,
String systemId)
|
void |
setClassLoader(ClassLoader classLoader)
|
void |
setData(Object data)
|
void |
setDocumentLocator(Locator locator)
|
void |
setSemanticModules(SemanticModules modules)
|
void |
setTimeout(int timeout)
Sets the timeout for retrieving remote resources, e.g. xsd schemas |
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qname,
Attributes attrs)
|
void |
startElementBuilder(String tagName,
Attributes attrs)
Start a configuration node. |
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 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.| Method Detail |
|---|
public void setSemanticModules(SemanticModules modules)
public Object read(Reader reader)
throws SAXException,
IOException
RuleSet from a Reader.
reader - The reader containing the rule-set.
ParserConfigurationException
SAXException
IOException
public Object read(InputStream inputStream)
throws SAXException,
IOException
RuleSet from an InputStream.
inputStream - The input-stream containing the rule-set.
ParserConfigurationException
SAXException
IOException
public Object read(InputSource in)
throws SAXException,
IOException
RuleSet from an InputSource.
in - The rule-set input-source.
ParserConfigurationException
SAXException
IOExceptionpublic 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 DefaultHandler
public void startElement(String uri,
String localName,
String qname,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandleruri - localName - qname - attrs -
SAXExceptionContentHandler
public void endElement(String uri,
String localName,
String qname)
throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandleruri - localName - qname -
SAXExceptionContentHandler
public 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 Object getParent(int index)
public Object removeParent()
public LinkedList getParents()
public Object getParent(Class parent)
public Object getPeer()
public Object getCurrent()
public InputSource resolveEntity(String publicId,
String systemId)
throws SAXException
resolveEntity in interface EntityResolverresolveEntity in class DefaultHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class DefaultHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class DefaultHandlerSAXExceptionpublic void warning(SAXParseException x)
warning in interface ErrorHandlerwarning in class DefaultHandlerpublic void error(SAXParseException x)
error in interface ErrorHandlererror in class DefaultHandler
public void fatalError(SAXParseException x)
throws SAXParseException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXParseExceptionpublic int getTimeout()
public void setTimeout(int timeout)
timeout -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||