public class Interpreter
extends java.lang.Object
DefaultHandler
which invokes
various actions
according to predefined patterns.
Patterns are kept in a RuleStore
which is programmed to store and
then later produce the applicable actions for a given pattern.
The pattern corresponding to a top level <a> element is the string
The pattern corresponding to an element <b> embedded within a top level
<a> element is the string
The pattern corresponding to an <b> and any level of nesting is "*/b. Thus, the * character placed at the beginning of a pattern serves as a wildcard for the level of nesting. Conceptually, this is very similar to the API of commons-digester. Joran offers several small advantages. First and foremost, it offers support for implicit actions which result in a significant leap in flexibility. Second, in our opinion better error reporting capability. Third, it is self-reliant. It does not depend on other APIs, in particular commons-logging which is too unreliable. Last but not least, Joran is quite tiny and is expected to remain so.
Constructor and Description |
---|
Interpreter(Context context,
RuleStore rs,
ElementPath initialElementPath) |
Modifier and Type | Method and Description |
---|---|
void |
addImplicitAction(ImplicitAction ia) |
void |
characters(BodyEvent be) |
void |
endElement(EndEvent endEvent) |
EventPlayer |
getEventPlayer() |
InterpretationContext |
getExecutionContext()
Deprecated.
replaced by
getInterpretationContext() |
InterpretationContext |
getInterpretationContext() |
org.xml.sax.Locator |
getLocator() |
RuleStore |
getRuleStore() |
void |
setDocumentLocator(org.xml.sax.Locator l) |
void |
setInterpretationContextPropertiesMap(java.util.Map<java.lang.String,java.lang.String> propertiesMap) |
void |
startDocument() |
void |
startElement(StartEvent se) |
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath)
public EventPlayer getEventPlayer()
public void setInterpretationContextPropertiesMap(java.util.Map<java.lang.String,java.lang.String> propertiesMap)
public InterpretationContext getExecutionContext()
getInterpretationContext()
public InterpretationContext getInterpretationContext()
public void startDocument()
public void startElement(StartEvent se)
public void characters(BodyEvent be)
public void endElement(EndEvent endEvent)
public org.xml.sax.Locator getLocator()
public void setDocumentLocator(org.xml.sax.Locator l)
public void addImplicitAction(ImplicitAction ia)
public RuleStore getRuleStore()
Copyright © 2010 - 2023 Adobe. All Rights Reserved