@Test public void testCreateEmptyXml() throws Exception { L3Parameters l3Parameters = new L3Parameters(); l3ParameterXmlGenerator = new L3ParameterXmlGenerator(l3Parameters); assertThat(l3ParameterXmlGenerator.createXml(), equalTo("<parameters>\n" + "</parameters>")); }
public String createXml() { sb.append("<parameters>\n"); constructSingleElement("planetaryGrid", l3Parameters.getPlanetaryGrid()); constructSingleElement("numRows", l3Parameters.getNumRows() == 0 ? "" : "" + (l3Parameters.getNumRows())); constructSingleElement("compositingType", String.valueOf(l3Parameters.getCompositingType())); constructSingleElement("superSampling", String.valueOf(l3Parameters.getSuperSampling())); constructSingleElement("maskExpr", l3Parameters.getMaskExpr()); constructSingleElement("minDataHour", String.valueOf(l3Parameters.getMinDataHour())); constructSingleElement("metadataAggregatorName", l3Parameters.getMetadataAggregatorName()); constructSingleElement("startDateTime", l3Parameters.getStartDateTime()); constructSingleElement("periodDuration", String.valueOf(l3Parameters.getPeriodDuration())); constructSingleElement("timeFilterMethod", String.valueOf(l3Parameters.getTimeFilterMethod())); constructSingleElement("outputFile", l3Parameters.getOutputFile()); constructVariablesElement(); constructAggregatorsElement(); constructPostProcessorElement(); sb.append("</parameters>"); return sb.toString(); }
L3ParameterXmlGenerator { public String createXml() { sb.append("<parameters>\n"); constructSingleElement("planetaryGrid", l3Parameters.getPlanetaryGrid()); constructSingleElement("numRows", l3Parameters.getNumRows() == 0 ? "" : "" + (l3Parameters.getNumRows())); constructSingleElement("compositingType", String.valueOf(l3Parameters.getCompositingType())); constructSingleElement("superSampling", String.valueOf(l3Parameters.getSuperSampling())); constructSingleElement("maskExpr", l3Parameters.getMaskExpr()); constructSingleElement("minDataHour", String.valueOf(l3Parameters.getMinDataHour())); constructSingleElement("metadataAggregatorName", l3Parameters.getMetadataAggregatorName()); constructSingleElement("startDateTime", l3Parameters.getStartDateTime()); constructSingleElement("periodDuration", String.valueOf(l3Parameters.getPeriodDuration())); constructSingleElement("timeFilterMethod", String.valueOf(l3Parameters.getTimeFilterMethod())); constructSingleElement("outputFile", l3Parameters.getOutputFile()); constructVariablesElement(); constructAggregatorsElement(); constructPostProcessorElement(); sb.append("</parameters>"); return sb.toString(); } }
L3ParameterXmlGenerator { public String createXml() { sb.append("<parameters>\n"); constructSingleElement("planetaryGrid", l3Parameters.getPlanetaryGrid()); constructSingleElement("numRows", l3Parameters.getNumRows() == 0 ? "" : "" + (l3Parameters.getNumRows())); constructSingleElement("compositingType", String.valueOf(l3Parameters.getCompositingType())); constructSingleElement("superSampling", String.valueOf(l3Parameters.getSuperSampling())); constructSingleElement("maskExpr", l3Parameters.getMaskExpr()); constructSingleElement("minDataHour", String.valueOf(l3Parameters.getMinDataHour())); constructSingleElement("metadataAggregatorName", l3Parameters.getMetadataAggregatorName()); constructSingleElement("startDateTime", l3Parameters.getStartDateTime()); constructSingleElement("periodDuration", String.valueOf(l3Parameters.getPeriodDuration())); constructSingleElement("timeFilterMethod", String.valueOf(l3Parameters.getTimeFilterMethod())); constructSingleElement("outputFile", l3Parameters.getOutputFile()); constructVariablesElement(); constructAggregatorsElement(); constructPostProcessorElement(); sb.append("</parameters>"); return sb.toString(); } L3ParameterXmlGenerator(L3Parameters l3Parameters); }
L3ParameterXmlGenerator { public String createXml() { sb.append("<parameters>\n"); constructSingleElement("planetaryGrid", l3Parameters.getPlanetaryGrid()); constructSingleElement("numRows", l3Parameters.getNumRows() == 0 ? "" : "" + (l3Parameters.getNumRows())); constructSingleElement("compositingType", String.valueOf(l3Parameters.getCompositingType())); constructSingleElement("superSampling", String.valueOf(l3Parameters.getSuperSampling())); constructSingleElement("maskExpr", l3Parameters.getMaskExpr()); constructSingleElement("minDataHour", String.valueOf(l3Parameters.getMinDataHour())); constructSingleElement("metadataAggregatorName", l3Parameters.getMetadataAggregatorName()); constructSingleElement("startDateTime", l3Parameters.getStartDateTime()); constructSingleElement("periodDuration", String.valueOf(l3Parameters.getPeriodDuration())); constructSingleElement("timeFilterMethod", String.valueOf(l3Parameters.getTimeFilterMethod())); constructSingleElement("outputFile", l3Parameters.getOutputFile()); constructVariablesElement(); constructAggregatorsElement(); constructPostProcessorElement(); sb.append("</parameters>"); return sb.toString(); } L3ParameterXmlGenerator(L3Parameters l3Parameters); String createXml(); }
L3ParameterXmlGenerator { public String createXml() { sb.append("<parameters>\n"); constructSingleElement("planetaryGrid", l3Parameters.getPlanetaryGrid()); constructSingleElement("numRows", l3Parameters.getNumRows() == 0 ? "" : "" + (l3Parameters.getNumRows())); constructSingleElement("compositingType", String.valueOf(l3Parameters.getCompositingType())); constructSingleElement("superSampling", String.valueOf(l3Parameters.getSuperSampling())); constructSingleElement("maskExpr", l3Parameters.getMaskExpr()); constructSingleElement("minDataHour", String.valueOf(l3Parameters.getMinDataHour())); constructSingleElement("metadataAggregatorName", l3Parameters.getMetadataAggregatorName()); constructSingleElement("startDateTime", l3Parameters.getStartDateTime()); constructSingleElement("periodDuration", String.valueOf(l3Parameters.getPeriodDuration())); constructSingleElement("timeFilterMethod", String.valueOf(l3Parameters.getTimeFilterMethod())); constructSingleElement("outputFile", l3Parameters.getOutputFile()); constructVariablesElement(); constructAggregatorsElement(); constructPostProcessorElement(); sb.append("</parameters>"); return sb.toString(); } L3ParameterXmlGenerator(L3Parameters l3Parameters); String createXml();  }