|
|||||||||
| Home >> All >> org >> jdom >> [ output overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdom.output
Class Format.TextMode

java.lang.Objectorg.jdom.output.Format.TextMode
- Enclosing class:
- Format
- public static class Format.TextMode
- extends java.lang.Object
Class to signify how text should be handled on output. The following table provides details.
| Text Mode | Resulting behavior. |
|---|---|
| PRESERVE (Default) | All content is printed in the format it was created, no whitespace or line separators are are added or removed. |
| TRIM_FULL_WHITE | Content between tags consisting of all whitespace is not printed. If the content contains even one non-whitespace character, it is printed verbatim, whitespace and all. |
| TRIM | Same as TrimAllWhite, plus leading/trailing whitespace are trimmed. |
| NORMALIZE | Same as TextTrim, plus addition interior whitespace is compressed to a single space. |
When a element has a xml:space attribute with the value of "preserve", all formating is turned off and reverts back to the default until the element and its contents have been printed. If a nested element contains another xml:space with the value "default" formatting is turned back on for the child element and then off for the remainder of the parent element.
| Field Summary | |
private java.lang.String |
name
|
static Format.TextMode |
NORMALIZE
Mode for text normalization (left and right trim plus internal whitespace is normalized to a single space. |
static Format.TextMode |
PRESERVE
Mode for literal text preservation. |
static Format.TextMode |
TRIM
Mode for text trimming (left and right trim). |
static Format.TextMode |
TRIM_FULL_WHITE
Mode for text trimming of content consisting of nothing but whitespace but otherwise not changing output. |
| Constructor Summary | |
private |
Format.TextMode(java.lang.String name)
|
| Method Summary | |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
PRESERVE
public static final Format.TextMode PRESERVE
- Mode for literal text preservation.
TRIM
public static final Format.TextMode TRIM
- Mode for text trimming (left and right trim).
NORMALIZE
public static final Format.TextMode NORMALIZE
- Mode for text normalization (left and right trim plus internal
whitespace is normalized to a single space.
TRIM_FULL_WHITE
public static final Format.TextMode TRIM_FULL_WHITE
- Mode for text trimming of content consisting of nothing but
whitespace but otherwise not changing output.
name
private final java.lang.String name
| Constructor Detail |
Format.TextMode
private Format.TextMode(java.lang.String name)
| Method Detail |
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> jdom >> [ output overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jdom.output.Format.TextMode