- 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.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 XMLFormat xmlns(boolean newXmlns)
The new value for the xmlns flag, defaulting totrue.
-
xmlns
public boolean xmlns()
The xmlns flag.
-
format
public XMLFormat format(boolean newFormat)
The new value for the formatting flag, defaulting tofalse.
-
format
public boolean format()
The formatting flag.
-
newline
public String newline()
The formatting flag.
-
indent
public XMLFormat indent(int newIndent)
The new indentation value, defaulting to2.
-
indent
public int indent()
The indentation.
-
indentString
public String indentString(int level)
Convenience method to get an indentation string at a given level.
-
header
public 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 boolean header()
The header.
-
recordFormat
public XMLFormat recordFormat(XMLFormat.RecordFormat newRecordFormat)
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.
-
recordFormat
public XMLFormat.RecordFormat recordFormat()
The record format to be applied, defaulting toXMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.
-
-