Package com.adaptris.core.poi
Class XmlStyle
- java.lang.Object
-
- com.adaptris.core.poi.XmlStyle
-
public class XmlStyle extends java.lang.ObjectControls the XML look and feel for ExcelToXml.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXmlStyle.ElementNaming
-
Constructor Summary
Constructors Constructor Description XmlStyle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDateFormat()XmlStyle.ElementNaminggetElementNamingStyle()java.lang.BooleangetEmitCellPositionAttr()java.lang.BooleangetEmitDataTypeAttr()java.lang.BooleangetEmitRowNumberAttr()java.lang.IntegergetHeaderRow()java.lang.StringgetNumberFormat()java.lang.StringgetXmlEncoding()protected intheaderRow()voidsetDateFormat(java.lang.String dateFormat)Set the date format for date fields.voidsetElementNamingStyle(XmlStyle.ElementNaming s)Set how element names are generatedvoidsetEmitCellPositionAttr(java.lang.Boolean b)Whether or not to emit an absolute cell position attribute for each cell in a row.voidsetEmitDataTypeAttr(java.lang.Boolean b)Whether or not to emit a type attribute for each cell.voidsetEmitRowNumberAttr(java.lang.Boolean b)Whether or not to emit a row number attribute for each row.voidsetHeaderRow(java.lang.Integer i)If element name generation style isXmlStyle.ElementNaming.HEADER_ROWthen use this to specify which row is considered the header.voidsetNumberFormat(java.lang.String s)Set the format for numeric fieldsvoidsetXmlEncoding(java.lang.String encoding)Set the encoding for the resulting XML document.
-
-
-
Method Detail
-
getEmitDataTypeAttr
public java.lang.Boolean getEmitDataTypeAttr()
-
setEmitDataTypeAttr
public void setEmitDataTypeAttr(java.lang.Boolean b)
Whether or not to emit a type attribute for each cell.- Parameters:
b- true or false, default false.
-
getEmitRowNumberAttr
public java.lang.Boolean getEmitRowNumberAttr()
-
setEmitRowNumberAttr
public void setEmitRowNumberAttr(java.lang.Boolean b)
Whether or not to emit a row number attribute for each row.- Parameters:
b- true or false, default false
-
getEmitCellPositionAttr
public java.lang.Boolean getEmitCellPositionAttr()
-
setEmitCellPositionAttr
public void setEmitCellPositionAttr(java.lang.Boolean b)
Whether or not to emit an absolute cell position attribute for each cell in a row.- Parameters:
b- true or false, default false
-
getDateFormat
public java.lang.String getDateFormat()
-
setDateFormat
public void setDateFormat(java.lang.String dateFormat)
Set the date format for date fields.- Parameters:
dateFormat- the date format, default is "yyyy-MM-dd'T'HH:mm:ssZ"
-
getElementNamingStyle
public XmlStyle.ElementNaming getElementNamingStyle()
-
setElementNamingStyle
public void setElementNamingStyle(XmlStyle.ElementNaming s)
Set how element names are generated- Parameters:
s- the style; one of SIMPLE, CELL_POSITION, HEADER_ROW. Default is SIMPLE- See Also:
XmlStyle.ElementNaming
-
getXmlEncoding
public java.lang.String getXmlEncoding()
-
setXmlEncoding
public void setXmlEncoding(java.lang.String encoding)
Set the encoding for the resulting XML document.If not specified the following rules will be applied:
- If the
InterlokMessage.getContentEncoding()is non-null then that will be used. - UTF-8
As a result; the character encoding on the message is always set using
InterlokMessage.setContentEncoding(String). - If the
-
getNumberFormat
public java.lang.String getNumberFormat()
-
setNumberFormat
public void setNumberFormat(java.lang.String s)
Set the format for numeric fields- Parameters:
s- the format; default is null, which means to useString.valueOf(double)- See Also:
DecimalFormat
-
getHeaderRow
public java.lang.Integer getHeaderRow()
-
setHeaderRow
public void setHeaderRow(java.lang.Integer i)
If element name generation style isXmlStyle.ElementNaming.HEADER_ROWthen use this to specify which row is considered the header.If you specify a header row, then all rows preceding the header row will be skipped.
- Parameters:
i- the header row (starts from 1); default is 1.
-
headerRow
protected int headerRow()
-
-