Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.xml
Class FormatType

    java.lang.Object
      org.crosswire.common.xml.FormatType

All Implemented Interfaces:
  Serializable

    public final class FormatType

extends Object
implements Serializable

The PrettySerializingContentHandler uses a FormatType to control its output.

Author:
  DM Smith [dmsmith555 at gmail dot com]
See Also:
  `for license details.
  The copyright to this program is held by it's authors.`, Serialized Form

Field Summary
`static FormatType` | `ANALYSIS`
`static FormatType` | `ANALYSIS_INDENT`
`private boolean` | `analytic`
`static FormatType` | `AS_IS`
`private boolean` | `classic`
`static FormatType` | `CLASSIC`
`static FormatType` | `CLASSIC_INDENT`
`private boolean` | `indented`
`private boolean` | `multiline`
`private String` | `name` The name of the FormatType
`private static int` | `nextObj`
`private int` | `obj`
`private static long` | `serialVersionUID` Serialization ID
`private static FormatType[]` | `VALUES`

Constructor Summary
`FormatType(String aName, boolean displayNewlines, boolean doIndenting, boolean classicLines)` Simple ctor

Method Summary
`boolean` | `equals(Object o)` Prevent subclasses from overriding canonical identity based Object methods
`static FormatType` | `fromInteger(int i)` Lookup method to convert from an integer
`static FormatType` | `fromString(String name)` Lookup method to convert from a String
`int` | `hashCode()` Prevent subclasses from overriding canonical identity based Object methods
`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.
`(package private) Object` | `readResolve()`
`int` | `toInteger()` Get an integer representation for this FormatType
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field 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

### name

    private String name

  The name of the FormatType

### indented

    private boolean indented

### multiline

    private boolean multiline

### analytic

    private boolean analytic

### classic

    private boolean classic

### nextObj

    private static int nextObj

### obj

    private final int obj

### VALUES

    private static final FormatType[] VALUES

### serialVersionUID

    private static final long serialVersionUID

  Serialization ID

  See Also:
    Constant Field Values

Constructor Detail

### FormatType

    public FormatType(String aName,
                      boolean displayNewlines,
                      boolean doIndenting,
                      boolean classicLines)

  Simple ctor

Method Detail

### 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

### toInteger

    public int toInteger()

  Get an integer representation for this FormatType

### fromString

    public static FormatType fromString(String name)

  Lookup method to convert from a String

### fromInteger

    public static FormatType fromInteger(int i)

  Lookup method to convert from an integer

### equals

    public boolean equals(Object o)

  Prevent subclasses from overriding canonical identity based Object methods

  Overrides:
    `equals` in class `Object`
  See Also:
    `Object.equals(java.lang.Object)`

### hashCode

    public int hashCode()

  Prevent subclasses from overriding canonical identity based Object methods

  Overrides:
    `hashCode` in class `Object`
  See Also:
    `Object.hashCode()`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### readResolve

    Object readResolve()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ? 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD