public abstract class AbstractTemplateCommand extends ChainImpl implements Locatable, Registerable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.ThreadLocal<java.util.LinkedList<CommandExecutionState[]>> |
commandExecutionStateStackTL
The thread local stack of command execution state arrays.
|
static java.lang.ThreadLocal<java.lang.Integer> |
depthTl |
static java.lang.ThreadLocal<java.util.LinkedList<javax.xml.namespace.QName>> |
dynamicElementStackTL |
static java.lang.ThreadLocal<java.util.LinkedList<ElementOutputState[]>> |
elementOutputStateStackTL
The thread local stack of element output state arrays.
|
protected org.xml.sax.Locator |
locator |
protected javax.xml.namespace.QName |
qName |
static java.lang.ThreadLocal<org.xml.sax.SAXException> |
saxExceptionTl |
protected java.lang.String |
systemId |
protected int |
templateDepth |
commandList| Constructor and Description |
|---|
AbstractTemplateCommand(int elementCount) |
| Modifier and Type | Method and Description |
|---|---|
protected javax.xml.namespace.QName |
dynamicQName(org.apache.commons.jxpath.JXPathContext context,
java.lang.String nameXPath,
java.lang.String namespaceXPath,
boolean includeDefaultPrefix)
Uses the specified nameXPath and namespaceXPath to create a dynamic qName.
|
boolean |
execute(org.apache.commons.jxpath.JXPathContext context)
Initializes the internal state of this command and then calls executeTemplate( JXPathContext ).
|
protected boolean |
executeChildren(org.apache.commons.jxpath.JXPathContext context,
int[] childIndecies)
Calls the execute method of the children specified by childIndecies, passing it the supplied context.
|
abstract boolean |
executeTemplate(org.apache.commons.jxpath.JXPathContext context)
Generated templates implement this method to provide sax output.
|
protected static CommandExecutionState[] |
getCommandExecutionState()
Returns the command execute state array for the current thread.
|
protected CommandHandler |
getContentHandler() |
protected static java.util.LinkedList<javax.xml.namespace.QName> |
getDynamicElementStack() |
protected static ElementOutputState[] |
getElementOutputState() |
org.xml.sax.Locator |
getLocator()
Returns a Locator for Commands and Catalogs.
|
javax.xml.namespace.QName |
getQName()
If this command is registered, then the qname for this command is returned.
|
java.lang.String |
getSystemId()
If this command is registered, then the system id for the catalog it is registered in is returned.
|
protected boolean |
hasSaxExceptionFired() |
boolean |
isElementStarted(int elementIndex) |
boolean |
isRegistered()
Returns true if this command is registered with a catalog, false otherwise.
|
protected boolean |
postProcessChildren(org.apache.commons.jxpath.JXPathContext context,
java.lang.Exception exception,
int[] childIndecies)
Calls post process of the specified indices.
|
protected void |
registerSaxException(org.xml.sax.SAXException saxException) |
void |
setLocator(org.xml.sax.Locator locator) |
void |
setQName(javax.xml.namespace.QName qName)
Sets the registration qname for this command.
|
void |
setSystemId(java.lang.String systemId)
Sets the registration system id for this command.
|
protected static java.lang.String |
toPrefixedQName(javax.xml.namespace.QName qName)
Turns a QName into its prefixed string representation.
|
protected void |
trackEndElement(int elementIndex) |
protected void |
trackStartElement(int elementIndex) |
protected boolean |
virtualPostProcess(org.apache.commons.jxpath.JXPathContext context,
java.lang.Exception exception,
boolean result,
int[] childIndecies)
The post process command for virtual chains.
|
addCommand, getCommandListpublic static final java.lang.ThreadLocal<java.util.LinkedList<CommandExecutionState[]>> commandExecutionStateStackTL
public static final java.lang.ThreadLocal<java.util.LinkedList<ElementOutputState[]>> elementOutputStateStackTL
public static final java.lang.ThreadLocal<java.util.LinkedList<javax.xml.namespace.QName>> dynamicElementStackTL
public static final java.lang.ThreadLocal<org.xml.sax.SAXException> saxExceptionTl
public static final java.lang.ThreadLocal<java.lang.Integer> depthTl
protected org.xml.sax.Locator locator
protected java.lang.String systemId
protected javax.xml.namespace.QName qName
protected int templateDepth
protected static CommandExecutionState[] getCommandExecutionState()
protected static ElementOutputState[] getElementOutputState()
protected static java.util.LinkedList<javax.xml.namespace.QName> getDynamicElementStack()
public boolean isRegistered()
RegisterableisRegistered in interface Registerablepublic void setQName(javax.xml.namespace.QName qName)
RegisterablesetQName in interface RegisterableqName - the key for this command in the catalog.public javax.xml.namespace.QName getQName()
RegisterablegetQName in interface Registerablepublic void setSystemId(java.lang.String systemId)
RegisterablesetSystemId in interface RegisterablesystemId - the system id of the catalog where this command is registered.public java.lang.String getSystemId()
RegisterablegetSystemId in interface Registerableprotected javax.xml.namespace.QName dynamicQName(org.apache.commons.jxpath.JXPathContext context,
java.lang.String nameXPath,
java.lang.String namespaceXPath,
boolean includeDefaultPrefix)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionprotected void trackStartElement(int elementIndex)
protected void trackEndElement(int elementIndex)
public boolean isElementStarted(int elementIndex)
public void setLocator(org.xml.sax.Locator locator)
setLocator in interface Locatablepublic org.xml.sax.Locator getLocator()
LocatablegetLocator in interface Locatablepublic final boolean execute(org.apache.commons.jxpath.JXPathContext context)
throws java.lang.Exception
public abstract boolean executeTemplate(org.apache.commons.jxpath.JXPathContext context)
throws java.lang.Exception
java.lang.Exceptionprotected final boolean executeChildren(org.apache.commons.jxpath.JXPathContext context,
int[] childIndecies)
throws java.lang.Exception
java.lang.Exceptionprotected final boolean virtualPostProcess(org.apache.commons.jxpath.JXPathContext context,
java.lang.Exception exception,
boolean result,
int[] childIndecies)
throws java.lang.Exception
java.lang.Exceptionprotected final boolean postProcessChildren(org.apache.commons.jxpath.JXPathContext context,
java.lang.Exception exception,
int[] childIndecies)
protected static final java.lang.String toPrefixedQName(javax.xml.namespace.QName qName)
protected CommandHandler getContentHandler()
protected boolean hasSaxExceptionFired()
protected void registerSaxException(org.xml.sax.SAXException saxException)
Copyright © 2013 XChain Framework. All Rights Reserved.