mirror of https://github.com/apache/nifi.git
NIFI-7800: Provide an option to omit XML declaration for XMLRecordSetWriter
NIFI-7800: Mark new property as required Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #4520
This commit is contained in:
parent
f6d6e4adc9
commit
fd8b0b286f
|
@ -60,6 +60,7 @@ public class WriteXMLResult extends AbstractRecordSetWriter implements RecordSet
|
|||
private final SchemaAccessWriter schemaAccess;
|
||||
private final XMLStreamWriter writer;
|
||||
private final NullSuppression nullSuppression;
|
||||
private final boolean omitDeclaration;
|
||||
private final ArrayWrapping arrayWrapping;
|
||||
private final String arrayTagName;
|
||||
private final String recordTagName;
|
||||
|
@ -71,7 +72,7 @@ public class WriteXMLResult extends AbstractRecordSetWriter implements RecordSet
|
|||
private final Supplier<DateFormat> LAZY_TIME_FORMAT;
|
||||
private final Supplier<DateFormat> LAZY_TIMESTAMP_FORMAT;
|
||||
|
||||
public WriteXMLResult(final RecordSchema recordSchema, final SchemaAccessWriter schemaAccess, final OutputStream out, final boolean prettyPrint,
|
||||
public WriteXMLResult(final RecordSchema recordSchema, final SchemaAccessWriter schemaAccess, final OutputStream out, final boolean prettyPrint, final boolean omitDeclaration,
|
||||
final NullSuppression nullSuppression, final ArrayWrapping arrayWrapping, final String arrayTagName, final String rootTagName, final String recordTagName,
|
||||
final String charSet, final String dateFormat, final String timeFormat, final String timestampFormat) throws IOException {
|
||||
|
||||
|
@ -81,6 +82,8 @@ public class WriteXMLResult extends AbstractRecordSetWriter implements RecordSet
|
|||
this.schemaAccess = schemaAccess;
|
||||
this.nullSuppression = nullSuppression;
|
||||
|
||||
this.omitDeclaration = omitDeclaration;
|
||||
|
||||
this.arrayWrapping = arrayWrapping;
|
||||
this.arrayTagName = arrayTagName;
|
||||
|
||||
|
@ -131,7 +134,9 @@ public class WriteXMLResult extends AbstractRecordSetWriter implements RecordSet
|
|||
schemaAccess.writeHeader(recordSchema, out);
|
||||
|
||||
try {
|
||||
writer.writeStartDocument();
|
||||
if (!omitDeclaration) {
|
||||
writer.writeStartDocument();
|
||||
}
|
||||
|
||||
if (allowWritingMultipleRecords) {
|
||||
writer.writeStartElement(rootTagName);
|
||||
|
|
|
@ -80,6 +80,16 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
|
|||
.required(true)
|
||||
.build();
|
||||
|
||||
public static final PropertyDescriptor OMIT_XML_DECLARATION = new PropertyDescriptor.Builder()
|
||||
.name("omit_xml_declaration")
|
||||
.displayName("Omit XML Declaration")
|
||||
.description("Specifies whether or not to include XML declaration")
|
||||
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
|
||||
.allowableValues("true", "false")
|
||||
.defaultValue("false")
|
||||
.required(true)
|
||||
.build();
|
||||
|
||||
public static final PropertyDescriptor ROOT_TAG_NAME = new PropertyDescriptor.Builder()
|
||||
.name("root_tag_name")
|
||||
.displayName("Name of Root Tag")
|
||||
|
@ -132,6 +142,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
|
|||
final List<PropertyDescriptor> properties = new ArrayList<>(super.getSupportedPropertyDescriptors());
|
||||
properties.add(SUPPRESS_NULLS);
|
||||
properties.add(PRETTY_PRINT_XML);
|
||||
properties.add(OMIT_XML_DECLARATION);
|
||||
properties.add(ROOT_TAG_NAME);
|
||||
properties.add(RECORD_TAG_NAME);
|
||||
properties.add(ARRAY_WRAPPING);
|
||||
|
@ -178,6 +189,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
|
|||
}
|
||||
|
||||
final boolean prettyPrint = getConfigurationContext().getProperty(PRETTY_PRINT_XML).getValue().equals("true");
|
||||
final boolean omitDeclaration = getConfigurationContext().getProperty(OMIT_XML_DECLARATION).getValue().equals("true");
|
||||
|
||||
final String rootTagName = getConfigurationContext().getProperty(ROOT_TAG_NAME).isSet()
|
||||
? getConfigurationContext().getProperty(ROOT_TAG_NAME).getValue() : null;
|
||||
|
@ -204,7 +216,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
|
|||
final String charSet = getConfigurationContext().getProperty(CHARACTER_SET).getValue();
|
||||
|
||||
return new WriteXMLResult(schema, getSchemaAccessWriter(schema, variables),
|
||||
out, prettyPrint, nullSuppressionEnum, arrayWrappingEnum, arrayTagName, rootTagName, recordTagName, charSet,
|
||||
out, prettyPrint, omitDeclaration, nullSuppressionEnum, arrayWrappingEnum, arrayTagName, rootTagName, recordTagName, charSet,
|
||||
getDateFormat().orElse(null), getTimeFormat().orElse(null), getTimestampFormat().orElse(null));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class TestWriteXMLResult {
|
|||
|
||||
try {
|
||||
new WriteXMLResult(recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
} catch (IOException e) {
|
||||
actualMessage.append(e.getMessage());
|
||||
|
@ -99,7 +99,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult(recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -116,7 +116,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult(recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, null, "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, null, "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
final String expectedMessage = "The writer attempts to write multiple record although property \'Name of Root Tag\' " +
|
||||
"has not been set. If the XMLRecordSetWriter is supposed to write multiple records into one FlowFile, this property is required to be configured.";
|
||||
|
@ -136,7 +136,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSingleRecord();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, null, "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, null, "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -202,7 +202,7 @@ public class TestWriteXMLResult {
|
|||
final RecordSet rs = RecordSet.of(schema, record);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( rs.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "RECORD", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "RECORD", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(rs);
|
||||
writer.flush();
|
||||
|
@ -220,7 +220,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -236,7 +236,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -252,7 +252,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -268,7 +268,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -279,12 +279,44 @@ public class TestWriteXMLResult {
|
|||
assertThat(xmlResult, CompareMatcher.isIdenticalTo(out.toString()).ignoreWhitespace());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleRecordWithXMLDeclaration() throws IOException {
|
||||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, false, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
||||
String xmlResult = "<?xml version=\"1.0\" ?><ROOT><PERSON><NAME>Cleve Butler</NAME><AGE>42</AGE><COUNTRY>USA</COUNTRY></PERSON>" +
|
||||
"<PERSON><NAME>Ainslie Fletcher</NAME><AGE>33</AGE><COUNTRY>UK</COUNTRY></PERSON></ROOT>";
|
||||
|
||||
Assert.assertEquals(xmlResult, out.toString().trim());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleRecordWithOutXMLDeclaration() throws IOException {
|
||||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, false, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
||||
String xmlResult = "<ROOT><PERSON><NAME>Cleve Butler</NAME><AGE>42</AGE><COUNTRY>USA</COUNTRY></PERSON>" +
|
||||
"<PERSON><NAME>Ainslie Fletcher</NAME><AGE>33</AGE><COUNTRY>UK</COUNTRY></PERSON></ROOT>";
|
||||
|
||||
Assert.assertEquals(xmlResult, out.toString().trim());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEmptyRecordWithEmptySchema() throws IOException {
|
||||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getEmptyRecordsWithEmptySchema();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -299,7 +331,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -317,7 +349,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -333,7 +365,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -351,7 +383,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -371,7 +403,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getNestedRecordsWithOnlyNullValues();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -389,7 +421,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getNestedRecordsWithOnlyNullValues();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -409,7 +441,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getEmptyNestedRecordEmptyNestedSchema();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -427,7 +459,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getEmptyNestedRecordEmptyNestedSchema();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -445,7 +477,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getEmptyNestedRecordDefinedSchema();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -463,7 +495,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -483,7 +515,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -503,7 +535,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -523,7 +555,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -541,7 +573,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -559,7 +591,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -577,7 +609,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -595,7 +627,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -615,7 +647,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_FOR_ELEMENTS, "ELEM", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_FOR_ELEMENTS, "ELEM", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -635,7 +667,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -655,7 +687,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -675,7 +707,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -693,7 +725,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -713,7 +745,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -733,7 +765,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -749,7 +781,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithChoice();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -775,7 +807,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -799,7 +831,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -823,7 +855,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -847,7 +879,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getSimpleRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, SUPPRESS_MISSING, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -871,7 +903,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecords();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -897,7 +929,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -923,7 +955,7 @@ public class TestWriteXMLResult {
|
|||
OutputStream out = new ByteArrayOutputStream();
|
||||
RecordSet recordSet = getNestedRecordsWithNullValues();
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -951,7 +983,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getNestedRecordsWithOnlyNullValues();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -977,7 +1009,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getNestedRecordsWithOnlyNullValues();
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1005,7 +1037,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1033,7 +1065,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1061,7 +1093,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1089,7 +1121,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1115,7 +1147,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1141,7 +1173,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1167,7 +1199,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1193,7 +1225,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_AS_WRAPPER, "ARRAY", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1221,7 +1253,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleArray(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, USE_PROPERTY_FOR_ELEMENTS, "ELEM", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, USE_PROPERTY_FOR_ELEMENTS, "ELEM", "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1249,7 +1281,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.WITHOUT_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1277,7 +1309,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.write(recordSet);
|
||||
writer.flush();
|
||||
|
@ -1297,7 +1329,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.ONLY_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1323,7 +1355,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1349,7 +1381,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.HAS_NULL);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
@ -1377,7 +1409,7 @@ public class TestWriteXMLResult {
|
|||
RecordSet recordSet = getRecordWithSimpleMap(TestWriteXMLResultUtils.NullValues.EMPTY);
|
||||
|
||||
WriteXMLResult writer = new WriteXMLResult( recordSet.getSchema(), new SchemaNameAsAttribute(),
|
||||
out, true, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
out, true, false, NEVER_SUPPRESS, NO_WRAPPING, null, "ROOT", "PERSON", "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
|
||||
|
||||
writer.onBeginRecordSet();
|
||||
|
||||
|
|
Loading…
Reference in New Issue