org.crosswire.common.xml
Enum FormatType

java.lang.Object
  extended by java.lang.Enum<FormatType>
      extended by org.crosswire.common.xml.FormatType
All Implemented Interfaces:
Serializable, Comparable<FormatType>

public enum FormatType
extends Enum<FormatType>

The PrettySerializingContentHandler uses a FormatType to control its output.

Author:
DM Smith
See Also:
The GNU Lesser General Public License for details.

Enum Constant Summary
ANALYSIS
           
ANALYSIS_INDENT
           
AS_IS
           
CLASSIC
           
CLASSIC_INDENT
           
 
Field Summary
private  boolean analytic
           
private  boolean classic
           
private  boolean indented
           
private  boolean multiline
           
 
Method Summary
 boolean isAnalytic()
          Whether added whitespace is inside tags.
 boolean isClassic()
          Whether added whitespace is between tags.
 boolean isIndented()
          Whether indents are introduced into the document.
 boolean isMultiline()
          Whether newlines are introduced into the document.
static FormatType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FormatType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AS_IS

public static final FormatType AS_IS

ANALYSIS

public static final FormatType ANALYSIS

CLASSIC

public static final FormatType CLASSIC

ANALYSIS_INDENT

public static final FormatType ANALYSIS_INDENT

CLASSIC_INDENT

public static final FormatType CLASSIC_INDENT
Field Detail

indented

private boolean indented

multiline

private boolean multiline

analytic

private boolean analytic

classic

private boolean classic
Method Detail

values

public static FormatType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FormatType c : FormatType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FormatType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isMultiline

public boolean isMultiline()
Whether newlines are introduced into the document.

Returns:
true if newlines are added to the document

isIndented

public boolean isIndented()
Whether indents are introduced into the document.

Returns:
true if indents are added to the document

isAnalytic

public boolean isAnalytic()
Whether added whitespace is inside tags. Note, this does not change the document.

Returns:
true if whitespace is added inside tags of document

isClassic

public boolean isClassic()
Whether added whitespace is between tags. Note, this does change the document as whitespace is added to either side of existing text.

Returns:
true if whitespace is added inside tags of document

Copyright ยจ 2003-2015