- 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 classXMLFormat.RecordFormatThe format of individual XML records.
-
Field Summary
Fields Modifier and Type Field Description static XMLFormatDEFAULT_FOR_RECORDSstatic XMLFormatDEFAULT_FOR_RESULTS
-
Constructor Summary
Constructors Constructor Description XMLFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanformat()The formatting flag.XMLFormatformat(boolean newFormat)The new value for the formatting flag, defaulting tofalse.booleanheader()The header.XMLFormatheader(boolean newHeader)The new header value, defaulting totrue.intindent()The indentation.XMLFormatindent(int newIndent)The new indentation value, defaulting to2.StringindentString(int level)Convenience method to get an indentation string at a given level.Stringnewline()The formatting flag.XMLFormatnewline(String newNewline)The new newline character, defaulting to\n.booleanquoteNested()Whether nestedXMLcontent should be quoted like a string, or nested into XML formatted output.XMLFormatquoteNested(boolean newQuoteNested)Whether nestedXMLcontent should be quoted like a string, or nested into XML formatted output.XMLFormat.RecordFormatrecordFormat()The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.XMLFormatrecordFormat(XMLFormat.RecordFormat newRecordFormat)The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.booleanxmlns()The xmlns flag.XMLFormatxmlns(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 nestedXMLcontent should be quoted like a string, or nested into XML formatted output.
-
quoteNested
public final boolean quoteNested()
Whether nestedXMLcontent should be quoted like a string, or nested into XML formatted output.
-
-