public class TemplateSourceBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TemplateSourceBuilder.BodyMode |
static class |
TemplateSourceBuilder.Context
The context for a sax template command.
|
static class |
TemplateSourceBuilder.VirtualChainContext
The context for a virtual chain method.
|
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
ATTRIBUTE_VALUE_TEMPLATE_PATTERN |
static java.lang.String |
BASE_TEMPLATE_NAME |
static java.lang.String |
DYNAMIC_PART_REGEX |
static java.util.regex.Pattern |
ENCODING_PATTERN |
static java.lang.String |
ENCODING_REGEX |
static java.lang.String |
FIXED_PART_REGEX |
static org.slf4j.Logger |
log |
static java.lang.String |
TEMPLATE_PACKAGE |
Constructor and Description |
---|
TemplateSourceBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
appendAttributeValueTemplate(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
java.lang.String attributeValueTemplate) |
void |
appendCharacters(java.lang.String characters)
Appends code to output a static string to the handler as a characters(char[], int, int) event to the handler.
|
void |
appendCommandCall() |
void |
appendContextEndPrefixMapping(java.lang.String prefix) |
void |
appendContextStartPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
void |
appendEndComment() |
void |
appendEndDynamicAttribute()
Appends code for the end of a
|
void |
appendEndDynamicElement()
Appends code for the end of a
|
void |
appendEndElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Appends code to send an end element event to the handler.
|
void |
appendEndExcludeResultPrefix(java.lang.String prefix) |
void |
appendEndPrefixMapping(java.lang.String prefix) |
void |
appendIgnorableWhitespace(java.lang.String ignorableWhitespace) |
void |
appendStartComment() |
void |
appendStartDynamicAttribute(java.lang.String name,
java.lang.String namespace)
Appends code for the start of a
|
void |
appendStartDynamicElement(java.lang.String name,
java.lang.String namespace)
Appends code for the start of a
|
void |
appendStartElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Appends code to send a start element event to the handler.
|
void |
appendStartExcludeResultPrefix(java.lang.String prefix) |
void |
appendStartPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
void |
appendValueOf(java.lang.String jxpath)
Appends code to output an xpath to the handler as a characters(char[], int, int) event to the handler.
|
void |
changeBodyMode(TemplateSourceBuilder.BodyMode newMode) |
void |
decrementIndent() |
void |
endEndElement() |
SourceResult |
endSource() |
void |
endStartElement() |
void |
endVirtualChain()
Signals the end of a virtual chain.
|
void |
incrementIndent() |
java.lang.StringBuilder |
indent(java.lang.StringBuilder builder) |
int |
nextCommandId() |
static java.util.List<java.lang.String> |
parseAttributeValueTemplate(java.lang.String attributeValueTemplate)
Parses an attribute value template into fixed and dynamic parts.
|
TemplateSourceBuilder.Context |
popContext() |
void |
pushContext(TemplateSourceBuilder.Context context) |
void |
startEndElement() |
void |
startSource(java.util.Map<java.lang.String,java.lang.String> transitionPrefixMapping,
java.util.Set<java.lang.String> transitionExcludeResultPrefixSet,
boolean excludeResultPrefixBoundary) |
void |
startStartElement() |
void |
startVirtualChain()
Signals the start of a new virtual command.
|
static java.lang.String |
stringConstant(java.lang.String source) |
public static org.slf4j.Logger log
public static final java.lang.String TEMPLATE_PACKAGE
public static final java.lang.String BASE_TEMPLATE_NAME
public static final java.lang.String FIXED_PART_REGEX
public static final java.lang.String DYNAMIC_PART_REGEX
public static final java.lang.String ENCODING_REGEX
public static java.util.regex.Pattern ATTRIBUTE_VALUE_TEMPLATE_PATTERN
public static java.util.regex.Pattern ENCODING_PATTERN
public void pushContext(TemplateSourceBuilder.Context context)
public TemplateSourceBuilder.Context popContext()
public int nextCommandId()
public void startSource(java.util.Map<java.lang.String,java.lang.String> transitionPrefixMapping, java.util.Set<java.lang.String> transitionExcludeResultPrefixSet, boolean excludeResultPrefixBoundary)
public SourceResult endSource()
public void startVirtualChain()
public void endVirtualChain()
public void appendCommandCall()
public void startStartElement()
public void endStartElement()
public void startEndElement()
public void endEndElement()
public void appendStartPrefixMapping(java.lang.String prefix, java.lang.String uri)
public void appendEndPrefixMapping(java.lang.String prefix)
public void appendStartExcludeResultPrefix(java.lang.String prefix)
public void appendEndExcludeResultPrefix(java.lang.String prefix)
public void appendContextStartPrefixMapping(java.lang.String prefix, java.lang.String uri)
public void appendContextEndPrefixMapping(java.lang.String prefix)
public void appendAttributeValueTemplate(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.String attributeValueTemplate) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void appendStartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
public void appendEndElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
public void appendCharacters(java.lang.String characters)
public void appendIgnorableWhitespace(java.lang.String ignorableWhitespace)
public void appendValueOf(java.lang.String jxpath)
public void appendStartComment()
public void appendEndComment()
public void appendStartDynamicElement(java.lang.String name, java.lang.String namespace)
name
- the required name attribute.namespace
- the optional namespace attribute.public void appendEndDynamicElement()
public void appendStartDynamicAttribute(java.lang.String name, java.lang.String namespace)
name
- the required name attribute.namespace
- the required namespace attribute.public void appendEndDynamicAttribute()
public void changeBodyMode(TemplateSourceBuilder.BodyMode newMode)
public java.lang.StringBuilder indent(java.lang.StringBuilder builder)
public void incrementIndent()
public void decrementIndent()
public static java.util.List<java.lang.String> parseAttributeValueTemplate(java.lang.String attributeValueTemplate) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public static java.lang.String stringConstant(java.lang.String source)
Copyright © 2013 XChain Framework. All Rights Reserved.