public final class FormatStack
extends java.lang.Object
This class is intended as a working-class for in the various outputter implementations. It is only public so that people extending the Abstract*Processor classes can take advantage of its functionality.
The value this class adds is:
Constructor and Description |
---|
FormatStack(Format format)
Creates a new FormatStack seeded with the specified Format
|
Modifier and Type | Method and Description |
---|---|
Format.TextMode |
getDefaultMode() |
java.lang.String |
getEncoding() |
boolean |
getEscapeOutput()
The escapeOutput flag can be set or unset.
|
EscapeStrategy |
getEscapeStrategy() |
java.lang.String |
getIndent() |
java.lang.String |
getLevelEOL() |
java.lang.String |
getLevelIndent() |
java.lang.String |
getLineSeparator() |
java.lang.String |
getPadBetween()
Get the end-of-line indenting sequence for before the first item in an
Element, as well as between subsequent items (but not after the last item)
|
java.lang.String |
getPadLast()
Get the end-of-line indenting sequence for after the last item in an
Element
|
Format.TextMode |
getTextMode() |
boolean |
isExpandEmptyElements() |
boolean |
isIgnoreTrAXEscapingPIs() |
boolean |
isOmitDeclaration() |
boolean |
isOmitEncoding() |
boolean |
isSpecifiedAttributesOnly()
Indicate whether only those Attributes specified in the XML
should be output.
|
void |
pop()
Move back a level on the stack.
|
void |
push()
Create a new depth level on the stack.
|
void |
setEscapeOutput(boolean escape)
The escapeOutput flag can be set or unset.
|
void |
setIgnoreTrAXEscapingPIs(boolean ignoreTrAXEscapingPIs)
Set the current depth's
Format.getIgnoreTrAXEscapingPIs() |
void |
setLevelEOL(java.lang.String newline)
Set the current depth's End-Of-Line sequence
|
void |
setLevelIndent(java.lang.String indent)
Override the current depth's accumulated line indent.
|
void |
setTextMode(Format.TextMode mode)
Change the current level's TextMode
|
public FormatStack(Format format)
format
- the Format instance to seed the stack with.public java.lang.String getIndent()
Format.getIndent()
, may be nullpublic java.lang.String getLineSeparator()
Format.getLineSeparator()
public java.lang.String getEncoding()
Format.getEncoding()
public boolean isOmitDeclaration()
Format.getOmitDeclaration()
public boolean isSpecifiedAttributesOnly()
public boolean isOmitEncoding()
Format.getOmitEncoding()
public boolean isExpandEmptyElements()
Format.getExpandEmptyElements()
public EscapeStrategy getEscapeStrategy()
Format.getEscapeStrategy()
public boolean isIgnoreTrAXEscapingPIs()
Format.getIgnoreTrAXEscapingPIs()
public void setIgnoreTrAXEscapingPIs(boolean ignoreTrAXEscapingPIs)
Format.getIgnoreTrAXEscapingPIs()
ignoreTrAXEscapingPIs
- the boolean value to set.public boolean getEscapeOutput()
public void setEscapeOutput(boolean escape)
escape
- what to set the current level's escapeOutput flag to.public Format.TextMode getDefaultMode()
public java.lang.String getLevelIndent()
public java.lang.String getPadBetween()
public java.lang.String getPadLast()
public void setLevelIndent(java.lang.String indent)
indent
- the indent to set.public java.lang.String getLevelEOL()
public void setLevelEOL(java.lang.String newline)
newline
- the new End-Of-Line sequence to set.public Format.TextMode getTextMode()
Format.getTextMode()
public void setTextMode(Format.TextMode mode)
mode
- the new mode to set.public void push()
public void pop()
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.