Top Description Inners Fields Constructors Methods
org.jooq

public final Class XMLFormat

extends Object
Class Inheritance
Static Imports
org.jooq.tools.StringUtils.rightPad

An XML formatting type, which can be used to configure XML imports / exports.

The type is immutable, meaning calls to setters like header(boolean) do not modify the original reference, but return a new one instead.

Author
Lukas Eder

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
XMLFormat.RecordFormat

The format of individual XML records.

Field Summary

Modifier and TypeField and Description
public static final XMLFormat
public static final XMLFormat
pack-priv boolean
pack-priv int
pack-priv boolean
pack-priv int
pack-priv String[]
pack-priv final boolean
pack-priv String
pack-priv boolean
pack-priv XMLFormat.RecordFormat
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public
private
XMLFormat(boolean mutable, boolean xmlns, boolean format, String newline, int globalIndent, int indent, String[] indented, boolean header, XMLFormat.RecordFormat recordFormat, boolean quoteNested)

Method Summary

Modifier and TypeMethod and Description
public final @NotNull XMLFormat
format(boolean newFormat)

The new value for the formatting flag, defaulting to false.

public final boolean
format()

The formatting flag.

public final @NotNull XMLFormat
globalIndent(int newGlobalIndent)

The new global indentation size applied on all levels, defaulting to 0.

public final int
globalIndent()

The global indentation applied on all levels.

public final @NotNull XMLFormat
header(boolean newHeader)

The new header value, defaulting to true.

public final boolean
header()

The header.

public final @NotNull XMLFormat
indent(int newIndent)

The new indentation size per level value, defaulting to 2.

public final int
indent()

The indentation size per level.

public final @NotNull String
indentString(int level)

Convenience method to get an indentation string at a given level.

public final boolean
mutable()

Whether this configuration object is mutable.

public final @NotNull XMLFormat
mutable(boolean newMutable)

The new value for the mutable flag, defaulting to false.

public final @NotNull XMLFormat
newline(String newNewline)

The new newline character, defaulting to \n.

public final @NotNull String
newline()

The formatting flag.

public final @NotNull XMLFormat
quoteNested(boolean newQuoteNested)

Whether nested XML content should be quoted like a string, or nested into XML formatted output.

public final boolean
quoteNested()

Whether nested XML content should be quoted like a string, or nested into XML formatted output.

public final @NotNull XMLFormat
recordFormat(XMLFormat.RecordFormat newRecordFormat)

The record format to be applied, defaulting to RecordFormat#VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.

public final @NotNull XMLFormat.RecordFormat
recordFormat()

The record format to be applied, defaulting to RecordFormat#VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.

public final @NotNull XMLFormat
xmlns(boolean newXmlns)

The new value for the xmlns flag, defaulting to true.

public final boolean
xmlns()

The xmlns flag.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_FOR_RECORDSback to summary
public static final XMLFormat DEFAULT_FOR_RECORDS
DEFAULT_FOR_RESULTSback to summary
public static final XMLFormat DEFAULT_FOR_RESULTS
formatback to summary
pack-priv boolean format
globalIndentback to summary
pack-priv int globalIndent
indentback to summary
pack-priv int indent
indentedback to summary
pack-priv String[] indented
mutableback to summary
pack-priv final boolean mutable
newlineback to summary
pack-priv String newline
quoteNestedback to summary
pack-priv boolean quoteNested
recordFormatback to summary
pack-priv XMLFormat.RecordFormat recordFormat
xmlnsback to summary
pack-priv boolean xmlns

Constructor Detail

XMLFormatback to summary
public XMLFormat()
XMLFormatback to summary
private XMLFormat(boolean mutable, boolean xmlns, boolean format, String newline, int globalIndent, int indent, String[] indented, boolean header, XMLFormat.RecordFormat recordFormat, boolean quoteNested)

Method Detail

formatback to summary
public final @NotNull XMLFormat format(boolean newFormat)

The new value for the formatting flag, defaulting to false.

Annotations
@NotNull
formatback to summary
public final boolean format()

The formatting flag.

globalIndentback to summary
public final @NotNull XMLFormat globalIndent(int newGlobalIndent)

The new global indentation size applied on all levels, defaulting to 0.

Annotations
@NotNull
globalIndentback to summary
public final int globalIndent()

The global indentation applied on all levels.

headerback to summary
public final @NotNull XMLFormat header(boolean newHeader)

The new header value, defaulting to true.

This flag governs whether the /result/fields element should be generated on export.

This flag is ignored on Record#formatXML(XMLFormat) and similar methods.

Annotations
@NotNull
headerback to summary
public final boolean header()

The header.

indentback to summary
public final @NotNull XMLFormat indent(int newIndent)

The new indentation size per level value, defaulting to 2.

Annotations
@NotNull
indentback to summary
public final int indent()

The indentation size per level.

indentStringback to summary
public final @NotNull String indentString(int level)

Convenience method to get an indentation string at a given level.

Annotations
@NotNull
mutableback to summary
public final boolean mutable()

Whether this configuration object is mutable.

mutableback to summary
public final @NotNull XMLFormat mutable(boolean newMutable)

The new value for the mutable flag, defaulting to false.

Annotations
@NotNull
newlineback to summary
public final @NotNull XMLFormat newline(String newNewline)

The new newline character, defaulting to \n.

Annotations
@NotNull
newlineback to summary
public final @NotNull String newline()

The formatting flag.

Annotations
@NotNull
quoteNestedback to summary
public final @NotNull XMLFormat quoteNested(boolean newQuoteNested)

Whether nested XML content should be quoted like a string, or nested into XML formatted output.

Annotations
@NotNull
quoteNestedback to summary
public final boolean quoteNested()

Whether nested XML content should be quoted like a string, or nested into XML formatted output.

recordFormatback to summary
public final @NotNull XMLFormat recordFormat(XMLFormat.RecordFormat newRecordFormat)

The record format to be applied, defaulting to RecordFormat#VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.

Annotations
@NotNull
recordFormatback to summary
public final @NotNull XMLFormat.RecordFormat recordFormat()

The record format to be applied, defaulting to RecordFormat#VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.

Annotations
@NotNull
xmlnsback to summary
public final @NotNull XMLFormat xmlns(boolean newXmlns)

The new value for the xmlns flag, defaulting to true.

Annotations
@NotNull
xmlnsback to summary
public final boolean xmlns()

The xmlns flag.

org.jooq back to summary

public final Enum XMLFormat.RecordFormat

extends Enum<XMLFormat.RecordFormat>
Class Inheritance

The format of individual XML records.

Field Summary

Modifier and TypeField and Description
public static final XMLFormat.RecordFormat
COLUMN_NAME_ELEMENTS

Simplified: /record/colname/text().

public static final XMLFormat.RecordFormat
VALUE_ELEMENTS

Simplified: /record/value/text().

public static final XMLFormat.RecordFormat
VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE

The default: /record/value[@field="colname"]/text().

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static XMLFormat.RecordFormat
public static XMLFormat.RecordFormat[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COLUMN_NAME_ELEMENTSback to summary
public static final XMLFormat.RecordFormat COLUMN_NAME_ELEMENTS

Simplified: /record/colname/text().

VALUE_ELEMENTSback to summary
public static final XMLFormat.RecordFormat VALUE_ELEMENTS

Simplified: /record/value/text().

VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTEback to summary
public static final XMLFormat.RecordFormat VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE

The default: /record/value[@field="colname"]/text().

Constructor Detail

RecordFormatback to summary
private RecordFormat()

Method Detail

valueOfback to summary
public static XMLFormat.RecordFormat valueOf(String name)
valuesback to summary
public static XMLFormat.RecordFormat[] values()