|
JDOM 2.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdom2.output.support.FormatStack
public final class FormatStack
FormatStack implements a mechanism where the formatting details can be changed mid-tree, but then get reverted when that tree segment is complete.
This class is intended as a working-class for in the various outputter implementations. It is inly public so that people extending the Abstract*Processor classes can take advantage of it's functionality.
The value this class adds is:
Constructor Summary | |
---|---|
FormatStack(Format format)
Creates a new FormatStack seeded with the specified Format |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormatStack(Format format)
format
- the Format instance to seed the stack with.Method Detail |
---|
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()
|
JDOM 2.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |