- java.lang.Object
-
- org.jooq.XMLFormat
-
public final class XMLFormat extends Object
An XML formatting type, which can be used to configure XML imports / exports.- Author:
- Lukas Eder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XMLFormat.RecordFormat
The format of individual XML records.
-
Field Summary
Fields Modifier and Type Field Description static XMLFormat
DEFAULT_FOR_RECORDS
static XMLFormat
DEFAULT_FOR_RESULTS
-
Constructor Summary
Constructors Constructor Description XMLFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
format()
The formatting flag.XMLFormat
format(boolean newFormat)
The new value for the formatting flag, defaulting tofalse
.boolean
header()
The header.XMLFormat
header(boolean newHeader)
The new header value, defaulting totrue
.int
indent()
The indentation.XMLFormat
indent(int newIndent)
The new indentation value, defaulting to2
.String
indentString(int level)
Convenience method to get an indentation string at a given level.String
newline()
The formatting flag.XMLFormat
newline(String newNewline)
The new newline character, defaulting to\n
.boolean
quoteNested()
Whether nestedXML
content should be quoted like a string, or nested into XML formatted output.XMLFormat
quoteNested(boolean newQuoteNested)
Whether nestedXML
content should be quoted like a string, or nested into XML formatted output.XMLFormat.RecordFormat
recordFormat()
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE
.XMLFormat
recordFormat(XMLFormat.RecordFormat newRecordFormat)
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE
.boolean
xmlns()
The xmlns flag.XMLFormat
xmlns(boolean newXmlns)
The new value for the xmlns flag, defaulting totrue
.
-
-
-
Method Detail
-
xmlns
public final XMLFormat xmlns(boolean newXmlns)
The new value for the xmlns flag, defaulting totrue
.
-
xmlns
public final boolean xmlns()
The xmlns flag.
-
format
public final XMLFormat format(boolean newFormat)
The new value for the formatting flag, defaulting tofalse
.
-
format
public final boolean format()
The formatting flag.
-
newline
public final XMLFormat newline(String newNewline)
The new newline character, defaulting to\n
.
-
newline
public final String newline()
The formatting flag.
-
indent
public final XMLFormat indent(int newIndent)
The new indentation value, defaulting to2
.
-
indent
public final int indent()
The indentation.
-
indentString
public final String indentString(int level)
Convenience method to get an indentation string at a given level.
-
header
public final XMLFormat header(boolean newHeader)
The new header value, defaulting totrue
.This flag governs whether the
/result/fields element should be generated on export.
This flag is ignored on
Formattable.formatXML(XMLFormat)
and similar methods.
-
header
public final boolean header()
The header.
-
recordFormat
public final XMLFormat recordFormat(XMLFormat.RecordFormat newRecordFormat)
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE
.
-
recordFormat
public final XMLFormat.RecordFormat recordFormat()
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE
.
-
quoteNested
public final XMLFormat quoteNested(boolean newQuoteNested)
Whether nestedXML
content should be quoted like a string, or nested into XML formatted output.
-
quoteNested
public final boolean quoteNested()
Whether nestedXML
content should be quoted like a string, or nested into XML formatted output.
-
-